Skip to content
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

Enhance querying kernels preferred wgsize #16186

Open
wants to merge 1 commit into
base: sycl
Choose a base branch
from

Conversation

omarahmed1111
Copy link
Contributor

Work-group sizes currently rely on device maximum rather than the max from a kernel query. This could result in an error raised as the device maximum could be more than what the kernel is actually allowed to use.

This PR uses an approach to make choosing the wgsize more safer for the kernels. The approach used composed of 2 sides:

  • if the reduction kernel was given a name by the user parallel_for<class Name> then we use this name to query the best wgsize for this kernel.
  • If the reduction kernel is not name defined by the user, we use an approximate safe approach where we query all the reduction kernels in the sycl application for their best wgsize, and we pick the minimum wgsize and use it for the kernel.

The second approximate approach part could be more accurate by using this PR that would give each reduction kernel a unique name that would make querying them possible at runtime.

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

Successfully merging this pull request may close these issues.

1 participant