-
Notifications
You must be signed in to change notification settings - Fork 2.6k
[GPU] choose kernel compile option for work_group_(OPS) #30162
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?
[GPU] choose kernel compile option for work_group_(OPS) #30162
Conversation
kernel_string->options += " -cl-std=CL3.0"; | ||
#elif CL_TARGET_OPENCL_VERSION >= 200 | ||
kernel_string->options += " -cl-std=CL2.0"; | ||
#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.
Should we keep checking CL Version > 200 ? It looks lost now
@@ -72,6 +72,7 @@ struct device_info { | |||
bool supports_queue_families; ///< Does engine support cl_intel_command_queue_families extension. | |||
bool supports_image; ///< Does engine support images (CL_DEVICE_IMAGE_SUPPORT cap). | |||
bool supports_intel_planar_yuv; ///< Does engine support cl_intel_planar_yuv extension. | |||
bool supports_work_group; ///< Does engine support CL_DEVICE_OPENCL_C_FEATURES(__opencl_c_work_group_collective_functions). |
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.
I think this name might be confusing, how about using the full name supports_work_group_collective_functions
?
if (engine_info.supports_work_group) | ||
kernel_string->options += " -cl-std=CL3.0"; | ||
else | ||
kernel_string->options += " -cl-std=CL2.0"; |
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.
Why should the support/implementation of some feature affect the kernel's OpenCL version?
@@ -388,6 +388,7 @@ struct EngineInfo { | |||
bool enable_sub_groups_emulation = false; | |||
bool bOptHintsSupport = false; | |||
bool supports_microkernels = false; | |||
bool supports_work_group = false; |
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.
[random spot]
We have KernelBase::get_required_device_features_key()
function, I suppose this work_group functions should be exposed as an independent option and considering during kernel selection
Tickets: