-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Intel OpenVINO backend #2332
Intel OpenVINO backend #2332
Conversation
4703992
to
83b9c42
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the contribution! I have a few preliminary comments below. I'm not very familiar with OpenVINO so some general information about its use cases and more documentation and tests would be very helpful for us to be able to maintain this as a feature.
@rbharath, Hi! Thanks for review! I fully agree with your comments and going to resolve them soon. |
Codecov Report
@@ Coverage Diff @@
## master #2332 +/- ##
==========================================
+ Coverage 85.00% 85.08% +0.07%
==========================================
Files 292 294 +2
Lines 26018 26191 +173
==========================================
+ Hits 22116 22284 +168
- Misses 3902 3907 +5
Continue to review full report at Codecov.
|
Failed test:
Not sure that it's because of the changes in this PR |
35715ae
to
d5c5548
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks better! Thanks for adding in some unit tests :). I've done a more detailed review pass now
As a first comment, I think we need some more work on the docstrings to match the rest of the codebase.
A second comment is whether we should consider making OpenVINOModel
a private class.
My other major comment is about maintainability. If OpenVINO is experimental, I want to make sure that we can maintain it. If you have bandwidth to commit to maintaining I think we can make this work :)
Also, tagging in @peastman @nd-02110114 who might be interested to follow along. Please feel free to chime in if you have thoughts!
I'm also concerned about this point. On the other hand, this PR depends on your published PyPI package and it is personalized. |
@nd-02110114, Thanks for feedback! Despite that OpenVINO was initially designed for computer vision tasks, it's a universal engine and from PR's description you can see that there is a benefit even for networks without convolutions at all (x1.7 improvement for tox21_tf_progressive which consists of GEMM layers only).
I see you point. I'll try to switch to an official package. |
@dkurt I'm sorry for a late response 🙇♂️
I understood the inference performance for tox21_tf_progressive improved. However, as I mentioned, our users like chemists rarely face the situation that requires such inference performance improvements. So, I seem that most of our users don't feel benchmark improvments as a benefit. Generally, our users require train or preprocess performance improvements rather than inference. When making an inference, the bottleneck of the performance is mainly the preprocess in my experience. If you know the good usecases of OpenVINO in the area of chemistry, I want to know. |
One possible application that comes to mind is if a user wants to run inference against a large chemical or materials library. For example, users sometimes want to run a graph conv model against a large database of compounds like Enamine REAL (~1 billion compounds). In that case, it might be useful to have inference speedups. Could OpenVINO help for this case? If so a small benchmark might really help establish the advantage. @dkurt Seconding @nd-02110114 that it would be great to hear about any other use cases you have in mind :). |
@nd-02110114, @rbharath, Thanks for comments! You're absolutely right that the best benefit of using such kind of optimizations is large volume data.
May I ask to point to a model so we can do benchmarking? |
My apologies for the slow response here! This fell behind due to the DeepChem 2.4.0 release work. As a suggestion for a benchmark model, could you try running |
Closing this old PR for cleanup |
Pull Request Template
Description
Add Intel OpenVINO backend for prediction. Backend optimizes only predictions, not training.
To enable OpenVINO, add
use_openvino=True
when create a model:Efficiency measurements (not final, working on improvement):
benchmark code
Tested models:
Type of change
Please check the option that is related to your PR.
Checklist
yapf -i <modified file>
and check no errors (yapf version must be 0.22.0)mypy -p deepchem
and check no errorsflake8 <modified file> --count
and check no errors