-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Nano] OpenVINO API for Async Inference #5507
Comments
Why do we need two different sets of APIs? Make it consistent for this specific feature. |
Because they are for different frameworks actually. trainer.predict(ov_model, dataloader) For Keras: ov_model.predict(dataloader) For OpenVINO without pytorch/tf: ov_model.predict(data) They seem to be kind of consistent. |
I think we can then have all cases to use |
Sure we can do this. This will introduce a new API for Pytorch users,
Is it necessary to support sync mode? seems that async mode can always obtain better performance in this case. |
|
Problem
Nano has enabled
OpenVINOModel.forward
with sync mode. For example:This will get the results batch by batch. As for async mode in https://docs.openvino.ai/latest/openvino_docs_OV_UG_Python_API_exclusives.html#asyncinferqueue, we didn't enable this for Nano. With async inference, we can obtain better performance.
API Design
For raw OpenVINO:
OpenVINOModel.precit(...)
will be the function to enable async inference loop.For Pytorch OpenVINO"
Trainer.predict()
will be overridden to run async inference loop.Tasks
assigned to @hjzin
The text was updated successfully, but these errors were encountered: