OpenVino: Confusion with CPU extension

OpenVino: Confusion with CPU extension

Dear all,

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/
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?


  • If I link the library given by the -l flag to my application and leave out the additional code lines to add the extension it still does not work.
  • If I link the IE::ie_cpu_extension instead and leave out the additional code lines it still does not work

Thank you very much in advance.



6 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

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,


Dear Seib, Viktor,

But you'll be happy to know that due to the issues of inconsistency and "ugly" factor I have filed a bug on your behalf.


Dear Shubha R,

thank you for your reply and for filing a bug report.



Dear Seib, Viktor,

Of course. I will report back findings on this forum.




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.





Leave a Comment

Please sign in to add a comment. Not a member? Join today