-
Notifications
You must be signed in to change notification settings - Fork 599
Add onnx-openvino #2264
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
base: master
Are you sure you want to change the base?
Add onnx-openvino #2264
Conversation
| #if __has_include("CL/opencl.hpp") | ||
| #include "CL/opencl.hpp" | ||
| #elif __has_include("OpenCL/opencl.hpp") | ||
| #include "OpenCL/opencl.hpp" | ||
| #else | ||
| #include "opencl.hpp" | ||
| #endif |
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.
This should be guarded by a #if __has_include("CL/opencl.h") and should define a USE_OPENVINO or USE_OPECL symbol to exclude the code that will fail to build otherwise.
Also OpenCL/opencl.hpp is only for apple systems AFAIK, does openvino support them?
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.
Yes, it should be supported by apple but that was not my intent here.
src/neural/backends/network_onnx.cc
Outdated
| } | ||
| case OnnxProvider::OPENVINO: { | ||
| auto ocl_instance = std::make_shared<OpenCL>(); | ||
| cl_context opencl_context = ocl_instance->context_.get(); |
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.
Is this necessary or optional?
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.
No. its optional. When you don't want to use cl_context that is.
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.
Then make it conditional on USE_OPENCL defined earlier in the file if __has_include("CL/opencl.h") is true.
This pr adds openvino for intel igpu's, may be useful for igpu's that don't support sycl(e,g intel 10th gen and below).
This supports: