- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is there a way to determine GPU availability, using the API? Alternatively, is there a way to use HETERO plugin in a way that won't lead to exception when GPU isn't available?
At present, creating a HETERO plugin (HETERO: GPU, CPU), and then calling plugin.loadNetwork leads to an exception being thrown:
Exception in loadNetwork Cannot find plugin to use :Tried load plugin : clDNNPlugin, error: Plugin clDNNPlugin cannot be loaded: cannot load plugin: clDNNPlugin from : Cannot load library 'libclDNNPlugin.so': /usr/lib/x86_64-linux-gnu/libOpenCL.so.1: version `OPENCL_2.0' not fou
Ideally, we wouldn't event attempt to use HETERO plugin, if there's no GPU available; but there's no API to detect that, as far as I can see. Better yet, HETERO plugin should be able to deal with GPU not being there, and fall back to CPU-only.
Thanks for any ideas/direction.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear Alex A.,
All you have to do is check the result of executableNetwork = ie.LoadNetwork(network, deviceName);. If there is a problem with your GPU, then this API will return an error.
Thanks,
Shubha
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
That is exactly what we're doing now, however, it is suboptimal: there's no way (to the best of my understanding) to distinguish "no GPU" error from any other errors, so any debug/error logging when GPU isn't present will be similar to that of legitimate errors.
Additionally, it seems that LoadNetwork dumps quite a bit of output to stdout -
"layer1 is GPU
layer2 is CPU
etc"
which happens before LoadNetwork errors out.
Shubha R. (Intel) wrote:Dear Alex A.,
All you have to do is check the result of executableNetwork = ie.LoadNetwork(network, deviceName);. If there is a problem with your GPU, then this API will return an error.
Thanks,
Shubha
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear Alex A.,
OpenCL APIs undoubtedly have a better way to detect GPUs. You might check on the OpenCL forum
But within OpenVino, what I suggested is really the only way. The developers are working on API enhancements though, so in the future this might change.
Thanks for your patience,
Shubha
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Alex,
We had a similar request and decided to use OpenCL to detect GPU.
It still needs to have something (like API ncDeviceCreate in NCS SDK) to detect unplugged Myriad.
I agree with you that an exception generation during ie.LoadNetwork is not acceptable way.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear om77,
Yep, we hear you. The OpenVino developers do realize that the API needs enhancement. But glad you found the OpenCL method to help you out (as I suggested also to Alex).
Thanks,
Shubha
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page