-
Notifications
You must be signed in to change notification settings - Fork 8
Support loading extension #4
Comments
@huningxin, there are plans to remove GPU extensions from the distribution as well (there were PriorBoxClustered and something else) - they will be a part of the plugin. But supporting of extensions mechanism is a critical feature for some of the customers, thank you! |
@dkurt , thanks for your sharing! It is very helpful. |
@huningxin Hi, Ningxin, the APIs has been implemented. But I do not test the API |
@dkurt , do you know any test cases that @lionkunonly can test CPU and GPU extensions? Thanks! |
For GPU you may try the .cl files from OpenVINO (but they can be merged in the future release). Or just create own CPU extensions library and test (check extgen.py script that generates CPU extensions template). |
Thanks for your suggestions, I will try. |
Hi, @dkurt . I have used to the method in this link https://docs.openvinotoolkit.org/latest/extension_build.html to create a simple template extension named The But I also try to use the |
@lionkunonly, Hi! As far as I remember @ilya-lavrenov, @ilyachur, can you add something about AddExtension behavior? |
@lionkunonly Hi, @dkurt is right. Did you try to use |
Hi @i lyachur. |
@lionkunonly Ok, thank you for clarrification. @vladimir-paramuzov Can you take a look to this issue? |
@lionkunonly Do I get it correctly that you tried something like: std::string e = "libcpu_extensions.so";
ie.SetConfig({{ CONFIG_KEY(CONFIG_FILE), e }}, "GPU"); and didn't get any errors? I checked this code and it throws an exception like: Applying such config to CPU plugin leads to So if you use SetConfig in some other manner, could you please share code snippet, so we can check it? |
@vladimir-paramuzov The code snippet looks like:
The implementation is coded by C++ with the N-API of Node.js. The |
@lionkunonly OK, I see. As I understand, this happens because ie.SetConfig() call doesn't trigger plugin creation, it just saves the config for not loaded plugins and passes it to the corresponding plugin later (on creation). To my mind this is expected behavior, but cc @ilya-lavrenov to confirm it. |
Right, behavior of |
Thanks for your help, I got your idea. |
@vladimir-paramuzov Hi. Is there any existing native CPU extension or GPU extension to test the API |
@huningxin after you build OpenVINO tests, there is a test extension library |
@ilya-lavrenov I give the comment for the error of building OpenVINO on Linux. openvinotoolkit/openvino#844. Cloud you give me some suggestions about it? |
@ilyachur I wonder why template extensions cannot find libraries.. |
Hi @lionkunonly @ilya-lavrenov I faced with this issue when I had another version of OpenVINO in my environment. For example if your environment (LD_LIBRARY_PATH, PATH or something like that) contains a path to old Inference Engine release which doesn't contain some libraries it can be a root cause of this issue. @lionkunonly Could you please check that you don't have other version of OpenVINO in your environment?
|
But all libraries are taken as is from this config file. So, if old |
@ilya-lavrenov It is just a proposal... We need to check it. If I remember right someone has the such problem with cmake, and he resolved it when removed other version of OpenVINO from the environment. Maybe I am wrong and forgot the root cause of the original problem, but it really easy to check. I guess that problem can be because we build documentation together with the OpenVINO and in this case we get such target conflicts because IE CMake registries some targets, but found Inference Engine package doesn't contain such dependencies. |
Hi @ilya-lavrenov, does the |
Hi @ilyachur . I downloaded and installed a openvino 2020.1 in the path But the |
@lionkunonly, There is no extensions library since 2019R4 if I'm not mistaken. But there is an option in all the demos and apps to specify any custom CPU library (flag |
@lionkunonly |
How to load default CPU extensions now? Previously I added it like
in is this thing would be enough in
I don't get this from documentation. Also in all examples i see something like
pretty understandable samples where FLAGS_l not even defined in any of the files, what the hell is that FLAGS_l, seems that this is some path to If i make something like
i'm getting error
|
@ysolovyov, you don't need to load extensions manually after 2019.3 release if you have not compiled them. So now |
It includes loading CPU extensions by AddExtension and GPU extensions by SetConfig.
The native sample code could be found at https://github.com/opencv/dldt/blob/2020/inference-engine/samples/classification_sample_async/main.cpp#L83 for CPU extension and https://github.com/opencv/dldt/blob/2020/inference-engine/samples/classification_sample_async/main.cpp#L89 for GPU extension.
Please check out more details of extension mechanism at: https://docs.openvinotoolkit.org/latest/_docs_IE_DG_Extensibility_DG_Intro.html
For 2020 release, according to comment, all ops are supported by MKLDNNPlugin, so there is no built-in CPU extension. GPU extension is still there.
The text was updated successfully, but these errors were encountered: