neuralmagic / deepsparse

Sparsity-aware deep learning inference runtime for CPUs
https://neuralmagic.com/deepsparse/
Other
2.98k stars 172 forks source link

[Continuous Batching] Executor thread for running continuous batching #1374

Closed bfineran closed 10 months ago

bfineran commented 10 months ago

This PR adds a helper class for executing EngineOperators using batches popped from ContinuousBatchingQueues.

The idea is that this thread can run indefinitely, waiting for a new batch from the ContinuousBatchingQueues and running them as available.

The ContinuousBatchingScheduler will spin up num_workers of these threads and run them indefinitely

test_plan: unit test included