Skip to content

[SYCL] Promote KHR extensions to supported status#21750

Open
dyniols wants to merge 4 commits intointel:syclfrom
dyniols:remove_redundant_macro_guard_from_supported_khr_extensions
Open

[SYCL] Promote KHR extensions to supported status#21750
dyniols wants to merge 4 commits intointel:syclfrom
dyniols:remove_redundant_macro_guard_from_supported_khr_extensions

Conversation

@dyniols
Copy link
Copy Markdown
Contributor

@dyniols dyniols commented Apr 13, 2026

This PR removes __DPCPP_ENABLE_UNFINISHED_KHR_EXTENSIONS guard from KHR extensions
that are supported:

- khr_dynamic_addrspace_cast
- khr_static_addrspace_cast  
- khr_work_item_queries
- khr_group_interface
- khr_queue_empty

Guard sycl_khr_free_function_commands with __DPCPP_ENABLE_UNFINISHED_KHR_EXTENSIONS.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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_EXTENSIONS guards from supported KHR APIs (address space casts, work item queries, group interface, queue empty query).
  • Update feature_test.hpp.in so the promoted KHR feature-test macros are unconditionally defined, and move SYCL_KHR_FREE_FUNCTION_COMMANDS under the unfinished guard.
  • Update e2e tests to stop defining __DPCPP_ENABLE_UNFINISHED_KHR_EXTENSIONS for 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>
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I think it's valid I will do it in separate PR.

@dyniols dyniols marked this pull request as ready for review April 13, 2026 15:10
@dyniols dyniols requested a review from a team as a code owner April 13, 2026 15:10
@dyniols dyniols requested a review from uditagarwal97 April 13, 2026 15:10
@dyniols
Copy link
Copy Markdown
Contributor Author

dyniols commented Apr 13, 2026

Regarding that issue with usage of deprecated query. I have opened separate PR.
#21751

Copy link
Copy Markdown
Collaborator

@iclsrc iclsrc left a comment

Choose a reason for hiding this comment

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

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
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

🟡 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.

@gmlueck
Copy link
Copy Markdown
Contributor

gmlueck commented Apr 13, 2026

Nice! Can you also update the list in README.md?

@dyniols
Copy link
Copy Markdown
Contributor Author

dyniols commented Apr 13, 2026

Nice! Can you also update the list in README.md?

Yes will do :)

@dyniols dyniols requested a review from a team as a code owner April 13, 2026 16:39
@dyniols dyniols closed this Apr 13, 2026
@dyniols dyniols reopened this Apr 13, 2026
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.

5 participants