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
Fixed and updated OpenCL-VA interoperability #18410
Conversation
272b7b3
to
387d217
Compare
387d217
to
862fc06
Compare
@@ -137,7 +141,13 @@ Context& initializeContextFromVA(VADisplay display, bool tryInterop) | |||
contextInitialized = true; | |||
|
|||
cl_platform_id platform = platforms[found]; | |||
std::string platformName = PlatformInfo(platform).name(); |
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.
Please replace platform
=> &platform
.
With verbose replacements it is better to keep original code (to avoid replacement back):
#if 0 // code doesn't works due to ...
original code
#else
... verbose code ...
#endif
Thanks for this @mshabunin, still couldn't figure out how to fix it. Please also is there anyway to support if someone has OpenCL 2.2 installed? I think the the only issue was the version was not specified somewhere or something. You guys are the best |
@Odianosen25 , OpenCL 2.2 should be backward compatible with 1.x. For example, I tested it with 2.1 runtime. |
Thanks for the response, and yes it actually is. Just gives out a warning
But its no show stopper. Kind regards |
resolves #18307
supersedes #18318
WITH_VA_INTEL
handlingclGePlatformInfo
directly to read device nameHow to enable the feature:
# prerequisite: libva-dev cmake -DWITH_VA=ON -DWITH_VA_INTEL=ON ../opencv
Checked in
--privileged
Ubuntu 20.04 container with systemlibva2
and OpenCL runtime 20.37.17906:Note: device name reading have been replaced due to an error with
PlatformInfo
constructor