[SYCL] Promote KHR extensions to supported status#21750
[SYCL] Promote KHR extensions to supported status#21750dyniols wants to merge 4 commits intointel:syclfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR promotes several SYCL KHR extensions from “unfinished” to supported status by removing the __DPCPP_ENABLE_UNFINISHED_KHR_EXTENSIONS gating, updating the generated feature-test macros accordingly, and adjusting end-to-end tests to no longer require the guard macro for these now-supported APIs.
Changes:
- Remove
__DPCPP_ENABLE_UNFINISHED_KHR_EXTENSIONSguards from supported KHR APIs (address space casts, work item queries, group interface, queue empty query). - Update
feature_test.hpp.inso the promoted KHR feature-test macros are unconditionally defined, and moveSYCL_KHR_FREE_FUNCTION_COMMANDSunder the unfinished guard. - Update e2e tests to stop defining
__DPCPP_ENABLE_UNFINISHED_KHR_EXTENSIONSfor the promoted extensions.
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| sycl/test-e2e/GroupInterface/work_group.cpp | Removes unfinished-extension guard macro from Group Interface e2e coverage. |
| sycl/test-e2e/GroupInterface/sub_group.cpp | Removes unfinished-extension guard macro from Group Interface e2e coverage. |
| sycl/test-e2e/GroupInterface/leader_of.cpp | Removes unfinished-extension guard macro from Group Interface-related e2e coverage. |
| sycl/test-e2e/Basic/work_item_queries/work_item_queries.cpp | Removes unfinished-extension guard macro from KHR work-item-queries e2e coverage. |
| sycl/test-e2e/Basic/out_of_order_queue_status_khr_empty.cpp | Removes unfinished-extension guard macro from queue::khr_empty() e2e coverage. |
| sycl/test-e2e/Basic/in_order_queue_status_khr_empty.cpp | Removes unfinished-extension guard macro from queue::khr_empty() e2e coverage. |
| sycl/test-e2e/AddressCast/khr_static_addrspace_cast.cpp | Removes unfinished-extension guard macro from KHR static addrspace cast e2e coverage. |
| sycl/test-e2e/AddressCast/khr_dynamic_addrspace_cast.cpp | Removes unfinished-extension guard macro from KHR dynamic addrspace cast e2e coverage. |
| sycl/source/feature_test.hpp.in | Promotes KHR feature-test macros to unconditional definitions; guards SYCL_KHR_FREE_FUNCTION_COMMANDS. |
| sycl/include/sycl/queue.hpp | Makes queue::khr_empty() declaration unconditional (supported). |
| sycl/include/sycl/khr/work_item_queries.hpp | Removes unfinished-extension gating so the KHR work-item-queries API is always available. |
| sycl/include/sycl/khr/static_addrspace_cast.hpp | Removes unfinished-extension gating so the KHR static addrspace cast API is always available. |
| sycl/include/sycl/khr/group_interface.hpp | Removes per-header SYCL_KHR_GROUP_INTERFACE define (macro now comes from feature-test header). |
| sycl/include/sycl/khr/dynamic_addrspace_cast.hpp | Removes unfinished-extension gating so the KHR dynamic addrspace cast API is always available. |
|
|
||
| #ifdef __DPCPP_ENABLE_UNFINISHED_KHR_EXTENSIONS | ||
|
|
||
| #include <sycl/ext/oneapi/free_function_queries.hpp> |
There was a problem hiding this comment.
I think it's valid I will do it in separate PR.
|
Regarding that issue with usage of deprecated query. I have opened separate PR. |
iclsrc
left a comment
There was a problem hiding this comment.
Round 2 review of the KHR extension promotion changes. The header guards and test macro removals look correct. One important issue: SYCL_KHR_FREE_FUNCTION_COMMANDS is being demoted (moved into the unfinished guard), which is a breaking change that warrants explicit callout.
| #define SYCL_KHR_STATIC_ADDRSPACE_CAST 1 | ||
| #define SYCL_KHR_DYNAMIC_ADDRSPACE_CAST 1 | ||
| #define SYCL_KHR_INCLUDES 1 | ||
| #define SYCL_KHR_FREE_FUNCTION_COMMANDS 1 |
There was a problem hiding this comment.
🟡 Important: SYCL_KHR_FREE_FUNCTION_COMMANDS is being demoted, not promoted
In the previous state of this file, SYCL_KHR_FREE_FUNCTION_COMMANDS 1 was defined unconditionally (alongside SYCL_KHR_QUEUE_EMPTY_QUERY and other stable macros). This PR moves it into the #ifdef __DPCPP_ENABLE_UNFINISHED_KHR_EXTENSIONS block, meaning it will no longer be defined by default.
This is a breaking change for any existing code that uses #ifdef SYCL_KHR_FREE_FUNCTION_COMMANDS or relies on the macro being present in a standard build. The PR title claims to only promote extensions; this is an intentional demotion that should be called out explicitly in the commit message and PR description so that users are aware of the regression.
|
Nice! Can you also update the list in README.md? |
Yes will do :) |
This PR removes
__DPCPP_ENABLE_UNFINISHED_KHR_EXTENSIONSguard from KHR extensionsthat are supported:
Guard
sycl_khr_free_function_commandswith__DPCPP_ENABLE_UNFINISHED_KHR_EXTENSIONS.