-
Notifications
You must be signed in to change notification settings - Fork 27
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
Add OpenVINO AI Plugins to Preview Track #325
Conversation
…-plugins feature: integrate OpenVINO AI plugins
fix: remove arch hard-coding
readme: remove section for manually connecting plugs
fix: minor plug-in and extension errors from logs
Thank you for this! My only question is whether we should maintain a separate branch for this - I don't know that we want to ship openvino bits to every device, even when they may not support it. We could go forward with an openvino/* track or similar? WDYT? Perhaps @merlijn-sebrechts has an opinion? Keeping it all in the same branch is certainly simpler for us 🤷♂️ but I'm not sure what that would like like in the future if we were to integrate toolkits from other vendors? |
My preference is to not use a dedicated branch/track, primarily for broader reach but also to minimize the maintenance cost (with separate tracks someone will need to keep everything in sync, build everything twice, etc). I also intentionally designed the packaging of the plugins to minimize the maintenance burden to the GIMP snap itself, i.e. I used snapd's content interface to allow the plugins to be maintained and updated independently from GIMP. The risk of the plugins somehow breaking GIMP I think is also low. In terms of hardware support, it's true that not all devices will support acceleration available only through Intel NPUs and GPUs; however, I'm publishing the OpenVINO snaps built for both AMD64 and ARM64 (I'm currently enlisting a colleague to test on ARM64) so the coverage for CPU support is fairly large! That's my two cents - admittedly I'm somewhat biased. :) |
Heads up: my coworker uncovered a small issue on ARM64 that I'm fixing now. I'll update here when it's done. |
+1 for adding this to the regular snap |
Give me a shout when you've had a chance to test the new changes and I'll get this merged - thank you! |
It seems I was a bit too optimistic here. While the OpenVINO runtime supports ARM64, the plugins themselves do not, sadly. In fact, they only support Intel silicon (CPU, GPU, and NPU). We've tested a bit and I'm fairly certain two of the three plugins will run fine on ARM64 or an AMD CPU, but I don't think that's something we want to commit to supporting without testing/validation upstream. I still think there is a case to including the plugins in
|
You could also use an advanced grammar is a bunch of places to ensure we don't ship bits to arm64 machines... |
I really like this, and that you have abstracted the vino dependency libraries to a separate snap so it isn't restricted to just gimp's consumption - I can foresee a usecase to have an openvino extension in snapcraft (similar to the gnome extension) aside: if canonical can get the licensing agreements with nVidia it would also be handy to have a CUDA runtime snap and snapcraft extension to utilise it in other snaps. |
Thanks! The extension is definitely something we've considered.
Completely agree. I know there are a fair number of NVIDIA snaps floating around but I am not so familiar with them. |
@jnsgruk Just a heads up that I've been updating a few of the content producer snaps to better handle some of the Intel hardware detection. I should have an update on this PR in the next few days. |
8e28c56
to
da1cc9d
Compare
da1cc9d
to
eed97f2
Compare
Ok - this is now ready for re-review. Here are some updates I made to try to clarify hardware requirements and ensure a good user experience:
|
if [ $(uname -m) != "x86_64" ]; then | ||
echo 'exec "$@"' > ${CRAFT_PART_INSTALL}/command-chain/openvino-launch | ||
fi |
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.
Would it be better to just include this check in the script itself and keep the snapcraft.yaml simple? In the end - what matters most is what happens at runtime, so having the command-chain script itself check the arch feels appropriate?
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.
For the openvino-launch
command-chain script, my goal is to keep the door open for ARM64 support in the future since the snap itself does support ARM64, even though there is not an existing snap that consumes the ARM64 version. However, we will soon be providing similar plugin support for a few consumer snaps (Audacity and OBS) which may need ARM64 support.
For the openvino-ai-plugins-gimp-launch
command-chain script, there is an Intel CPU check so we don't necessarily need the uname -m
block in snapcraft.yaml
but I chose to keep it there for consistency with the other command-chain section above. I could remove it if you prefer.
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.
Makes sense, thanks
if [ $(uname -m) != "x86_64" ]; then | ||
echo 'exec "$@"' > ${CRAFT_PART_INSTALL}/command-chain/openvino-ai-plugins-gimp-launch | ||
fi |
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.
As above :)
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.
Commented above
This merges in the OpenVINO AI plugins to the
preview
branch. Until recently the plugins only supported GIMP 2.99 and therefore we published the snaps in a dedicated2.99-openvino
branch and track. Now that the plugins support GIMP 3.0 I propose putting them intopreview
for broader reach.Note about the
3.0-openvino
branch: I created this from the current2.99-openvino
branch, then merged in thepreview
branch, and finally added a handful of commits for 3.0 support.I've tested on a few different devices (each with a different generation of Intel Core Ultra CPU) and verified that the plugins all work as expected (including with GPU and NPU acceleration).