[SYCL] Embed fsycl-id-queries-range in device image as property.#21979
Draft
uditagarwal97 wants to merge 6 commits into
Draft
[SYCL] Embed fsycl-id-queries-range in device image as property.#21979uditagarwal97 wants to merge 6 commits into
uditagarwal97 wants to merge 6 commits into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR shifts -fsycl-id-queries-range enforcement from a host-side header check to an enqueue-time runtime check by embedding the selected mode into the device image as a binary property and reading it during kernel submission.
Changes:
- Add an
idQueriesRangemisc property to SYCL device images (emitted bysycl-post-link, driven by a new post-link option forwarded from clang). - Validate launch ranges at enqueue time in the scheduler using the embedded property; remove the old header-based
checkValueRangemechanism and associated include-deps expectations. - Remove the dedicated
sycl/unittests/range/*unit tests and their CMake wiring.
Reviewed changes
Copilot reviewed 25 out of 25 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
sycl/source/detail/scheduler/commands.cpp |
Fetches idQueriesRange property from the device image and performs enqueue-time range validation. |
sycl/source/detail/ndrange_desc.hpp |
Adds getNumGlobalWorkGroups() helper used by the new validation logic. |
sycl/source/detail/device_binary_image.cpp |
Adjusts dynamic image merge behavior for misc properties (now also mentions idQueriesRange). |
llvm/tools/sycl-post-link/sycl-post-link.cpp |
Introduces -id-queries-range= option and emits the property via GlobalBinImageProps. |
llvm/lib/SYCLPostLink/ComputeModuleRuntimeInfo.cpp |
Emits idQueriesRange into the device image misc property set. |
llvm/include/llvm/SYCLPostLink/ComputeModuleRuntimeInfo.h |
Extends GlobalBinImageProps with IdQueriesRange. |
clang/lib/Driver/ToolChains/Clang.cpp |
Forwards -fsycl-id-queries-range= to sycl-post-link as -id-queries-range=. |
sycl/include/sycl/queue.hpp |
Removes host-side checkValueRange usage and the dependency on the deleted header. |
sycl/include/sycl/handler.hpp |
Removes host-side checkValueRange usage and the dependency on the deleted header. |
sycl/include/sycl/detail/id_queries_fit_in_int.hpp |
Deletes the old header implementing host-side range validation. |
sycl/test/include_deps/sycl_khr_includes_*.hpp.cpp and sycl/test/include_deps/sycl_detail_core.hpp.cpp |
Updates include dependency expectations after removing id_queries_fit_in_int.hpp. |
sycl/unittests/CMakeLists.txt |
Removes add_subdirectory(range) from the SYCL unit test suite. |
sycl/unittests/range/** |
Deletes the -fsycl-id-queries-range range validation unit tests and their CMake glue. |
| "recompile the kernel with -fsycl-id-queries-range=[uint|size_t]."; | ||
| } | ||
|
|
||
| if (NDRDesc.getNumGlobalWorkGroups() > MaxRange) { |
| @@ -63,5 +63,4 @@ if (SYCL_ENABLE_XPTI_TRACING AND NOT WIN32) | |||
| endif() | |||
| add_subdirectory(sampler) | |||
| add_subdirectory(reduction) | |||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.