Skip to content

Add support for batching #241

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 2 commits into from
Feb 13, 2020
Merged

Add support for batching #241

merged 2 commits into from
Feb 13, 2020

Conversation

lantiga
Copy link
Contributor

@lantiga lantiga commented Nov 5, 2019

Addresses #67

  • Batching infrastructure
  • ONNX batching support
  • TF batching support
  • TORCH batching support
  • TFLITE batching support
  • MODELSET batching argument(s)
  • Add test modality to force batching (either add MINBATCH argument to MODELSET, or HOLD argument to MODELRUN; the former could have a use outside testing)
  • Batching heuristics
  • Add tests
  • Make batching zero-cost (so just bypass memory copies) when number of batches equals 1
  • Documentation
    [WONTFIX] Update clients

NOTE: we will update clients after this one is merged

@lantiga lantiga force-pushed the batching branch 3 times, most recently from 0aaccda to 7893e65 Compare December 9, 2019 21:45
@lantiga lantiga changed the title Add support for batching [WIP] Add support for batching Dec 17, 2019
@lantiga lantiga requested review from filipecosta90, hhsecond, MeirShpilraien and K-Jo and removed request for filipecosta90 December 17, 2019 22:07
@lantiga
Copy link
Contributor Author

lantiga commented Dec 17, 2019

Phew, so it looks like I finally finished this one - it took a while. It's ready for review, I'm available for clarifications.

@K-Jo K-Jo requested a review from rafie December 23, 2019 12:55
@filipecosta90
Copy link
Collaborator

@lantiga lgtm. Really minor comments but since we're with the hands on the code we migh as well change it :)

Add support for inspection and eviction to queue

Mock run info batching

Mock run info batching

Make TF tests work

Add batching for ONNX and ONNX-ML

Fix torch API, still WIP

Fix torch backend

Fixes after rebasing

Add auto-batching to TFLite backend

Fix from rebase

Add batching args to command and change API accordingly

Add batching heuristics [WIP]

Fix TFLite test by accessing first tensor in first batch safely

Temporarily comment out wrong_bg test check

Implement batching heuristics

Introduce autobatch tests, tflite still fails

Fix segfault when error was generated from the backend

Fix tflite autobatch test

Updated documentation with auto batching

Remove stale comments

Avoid making extra copies of inputs and outputs when batch count is 1
@lantiga lantiga merged commit 4a4a52a into master Feb 13, 2020
lantiga added a commit that referenced this pull request Feb 15, 2020
lantiga added a commit that referenced this pull request Feb 15, 2020
lantiga added a commit that referenced this pull request May 6, 2020
 
Add support for batching (#241)

* Add support for automated batching

Add support for inspection and eviction to queue

Mock run info batching

Mock run info batching

Make TF tests work

Add batching for ONNX and ONNX-ML

Fix torch API, still WIP

Fix torch backend

Fixes after rebasing

Add auto-batching to TFLite backend

Fix from rebase

Add batching args to command and change API accordingly

Add batching heuristics [WIP]

Fix TFLite test by accessing first tensor in first batch safely

Temporarily comment out wrong_bg test check

Implement batching heuristics

Introduce autobatch tests, tflite still fails

Fix segfault when error was generated from the backend

Fix tflite autobatch test

Updated documentation with auto batching

Remove stale comments

Avoid making extra copies of inputs and outputs when batch count is 1

* Address review comments re const-correctness
lantiga added a commit that referenced this pull request May 6, 2020
 
Revert "Add support for batching (#241)" (#269)

This reverts commit 4a4a52a.
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants