-
Notifications
You must be signed in to change notification settings - Fork 123
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
OpenVINO backend for Intel Architectures #52
Conversation
Thanks @dkurt - I have tested on a Skylake 8168 and see a >20X speed up over PyTorch on the CPU 🔥
To include OpenVino this patch would require my users to -
I'd like to find a better way to include OpenVino if possible. Ideally, prebuilt wheels on pypi.org. The package size limit of 60MB would restrict including everything but the inference engine development kit + CPU runtime or GPU runtime would fit |
@iiSeymour, thanks for testing it! OpenVINO team currently works on PyPi wheels publication so I believe it will be available next coming release. Going to try test package and update PR. |
Pushed a commit with test OpenVINO package. Now installation requires only export LD_LIBRARY_PATH=$(pwd)/venv3/lib:$LD_LIBRARY_PATH but still users have to convert model to OpenVINO IR (once). |
Perfect - with supporting wheels on PyPI my intention will be the make the default the CPU backend OpenVINO, so I would package the required files and avoid the conversion step. Do you intend to stick with dynamic library loading? Check out auditwheel https://github.com/pypa/auditwheel |
Just pushed a commit with runtime OpenVINO model creation (without Model Optimizer call or model serialization). There is some weak point with residual connection - had to wrap it to |
5e9752e
to
702b671
Compare
Comparing formulas from my script (see #52 (comment)) pads = 498
out_size = chunksize // 3
length = out_size - 2 * pads
num = 2 + (inp.shape[-1] - chunksize) // (3 * length)
num = 2 + (inp.shape[-1] - chunksize) // (chunksize - 6 * pads) with num_chunks = raw_data.shape[0] // (chunksize - overlap) + 1 we can say that output for different chunk size
As you may see only difference in the last chunk when total length is not divided by 3 and last chunk is shifted. |
@iiSeymour, OpenVINO 2021.1 is now available officially: https://pypi.org/project/openvino-python/. I've pushed commit with update |
@dkurt that's great - I will aim to evaluate before the end of the week. |
840fd7a
to
c8bf72c
Compare
60e1ccd
to
a7c1cfa
Compare
2b9c89d
to
b20f4c0
Compare
Hi, @iiSeymour! I just added OpenVINO dependency which is built with |
0190ff4
to
1cd1bcb
Compare
I'm happy to say that this PR is finally depends on the official OpenVINO PyPI package. It's based on |
Hey @dkurt really great to see an official release of OpenVINO on PyPI! The latest release of Bonito today drops support for Python 3.5 with the move to PyTorch 1.8 so this a good time to revisit this. There are a few minor conflicts from the release and the latest models freeze all blank scores to a single fixed value. |
91e05a7
to
86b437d
Compare
@dkurt It would be great to see a full tutorial on how to use OpenVino with bonito sometime. There would be a lot of interest. |
@colindaven, Hi! Thanks for feedback! Actually, you may just follow README: https://github.com/dkurt/bonito/blob/openvino/README.md. Everything you need is just specify |
Hi, @iiSeymour! I've updated proposal to make integration smoother for you. OpenVINO is now optional backend and regular setup won't have extra deps. For users who want use it from source, So with such changes proposed code can live in the master branch without any overhead 😊. Also, I see that number of Bonito users have CPU only environment. This PR also helps them to unblock such configurations. |
Hey @dkurt, that's great, I've been tied up with the v0.5.0 release this last couple of weeks but let's look at getting this merged next week. |
@iiSeymour, great news, thanks! Will resolve merge conflicts as fast as possible ;) |
2d2564a
to
f6652a6
Compare
@iiSeymour, I'd like to add a config for GitHub Actions to test install and evaluate steps (on CPU). Should I try it in this PR or by a separate one? |
Hi, @iiSeymour! Just a reminder 😃 |
To test this branch,