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

[SYCL] Enable checking the result of max_num_work_groups query with exceeded launch limits on more backends (hip and opencl) #15369

Merged

Conversation

GeorgeWeb
Copy link
Contributor

@GeorgeWeb GeorgeWeb commented Sep 12, 2024

The HIP and OpenCL backend implementations of the query had a default return 1 group implementation, which is an incorrect assumptions. They will now be marked as Unsupported with the accompanying UR chagnes (see oneapi-src/unified-runtime#2038), so for these cases the kernel_queue_specific::max_num_work_groups launch query will rely on the fallback that returns either 1 or 0 groups based on hardware resource limitation checks for the kernel.

@GeorgeWeb
Copy link
Contributor Author

See related oneapi-src/unified-runtime#2038 change.

…xceeded launch limits on more backends (hip and opencl)
@GeorgeWeb GeorgeWeb force-pushed the georgi/unsupported-max-coop-wgs-ur-api branch from 15a5ccf to b5d35b0 Compare September 20, 2024 13:10
@GeorgeWeb GeorgeWeb marked this pull request as ready for review September 23, 2024 17:10
@GeorgeWeb GeorgeWeb requested review from a team as code owners September 23, 2024 17:10
@@ -116,14 +116,14 @@ if(SYCL_UR_USE_FETCH_CONTENT)
CACHE PATH "Path to external '${name}' adapter source dir" FORCE)
endfunction()

set(UNIFIED_RUNTIME_REPO "https://github.com/oneapi-src/unified-runtime.git")
set(UNIFIED_RUNTIME_REPO "https://github.com/GeorgeWeb/unified-runtime.git")
Copy link
Contributor

@cperkinsintel cperkinsintel Sep 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this right? That the sycl product depends on your personal fork of the UR?

Copy link
Contributor Author

@GeorgeWeb GeorgeWeb Sep 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is a temp change for testing with oneapi-src/unified-runtime#2038. Of course it isn't intended to land like this. It will be modified back to https://github.com/oneapi-src/unified-runtime.git with the correct merged commit in oneapi-src/unified-runtime:main after the UR portion gets merged.

if (dev.get_backend() == sycl::backend::ext_oneapi_cuda) {
// Note: Level-Zero currently always returns a non-zero value.
// TODO: Remove the backend condition once the Level-Zero API issue is fixed.
if (dev.get_backend() != sycl::backend::ext_oneapi_level_zero) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a small thing, but can we improve the assert message? It seems that the message we want some other developer in the future to understand is that the query SHOULD have failed (but didn't).

@aarongreig
Copy link
Contributor

@intel/llvm-gatekeepers please merge

@martygrant martygrant merged commit 87cce87 into intel:sycl Oct 10, 2024
12 checks passed
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.

4 participants