Skip to content

[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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

sungeunk
Copy link
Contributor

Tickets:

  • 165719

@github-actions github-actions bot added the category: GPU OpenVINO GPU plugin label Apr 15, 2025
@sungeunk sungeunk marked this pull request as ready for review April 17, 2025 01:55
@sungeunk sungeunk requested review from a team as code owners April 17, 2025 01:55
kernel_string->options += " -cl-std=CL3.0";
#elif CL_TARGET_OPENCL_VERSION >= 200
kernel_string->options += " -cl-std=CL2.0";
#endif
Copy link
Contributor

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).
Copy link
Contributor

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?

Comment on lines +180 to +183
if (engine_info.supports_work_group)
kernel_string->options += " -cl-std=CL3.0";
else
kernel_string->options += " -cl-std=CL2.0";
Copy link
Contributor

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;
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: GPU OpenVINO GPU plugin
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants