I am using Ubuntu 18.04 with OpenVino 2019.2.275.
With the new release of OpenVino, Intel introduced a new API that is now "Core centered" in contrast to the older, "Plugin Centered" API. I like the new API very much! In the current OpenVino release Intel provides some sample applications. The application "hello_classification" demonstrated the use of the new Core centered API. This sample application works fine for me with the MYRIAD and the CPU plugin.
However, when I use the same code in my application to load a model for object detection (SSD_mobilenet_v2) I can use the MYRIAD plugin, but loading the CPU plugin fails with the error:
Unsupported primitive of type: PriorBoxClustered name: PriorBoxClustered_5
I found this forum post:
that suggests using the following flag: -l ~/temp/samples/build/intel64/Release/lib/libcpu_extension.so
when starting the application. Inside the application this boils down to these lines:
Core ie; IExtensionPtr extension_ptr = make_so_pointer<IExtension>(l_flag_with_path_to_libcpu_extension); ie.AddExtension(extension_ptr, "CPU"); ExecutableNetwork executable_network = ie.LoadNetwork(network, device_name);
With this fix my object detection application works also with the CPU plugin. However, the sample application "hello_classification" works with the CPU plugin without that additional extension, only using that code:
Core ie; ExecutableNetwork executable_network = ie.LoadNetwork(network, device_name);
Does anyone know why this is the case?
How can I make my application work without the additional (and in my eyes ugly) plugin loading?
Thank you very much in advance.
Dear Seib, Viktor,
I agree on the ugliness of it all. Unfortunately it's a design choice. It's most likely because when you load the CPU plugin the cpu_extension.dll (or *.so) is being linked automatically before execution. Whereas with the MYRIAD plugin it's not. You can actually prove this to yourself by running a tool like ldd .
Hope it helps,
The reason why you need to load CPU extensions for some topolpogies is that CPU plugin has limited number of supported layers. All other needed layers are extensions which we need to load explicitly. For other plugins like GPU, MYRIAD there is no needs to preload extensions since all layers implementations are located inside the plugins itself.
So, we dislike the way to explicitly load extensions and merged extensions into CPU plugin and since 2019 R4 release we don't have to deal with extensions.