Skip to content

[SYCL] Implement sycl_khr_queue_empty_query #18308

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

Merged
merged 7 commits into from
May 9, 2025
Merged

Conversation

HPS-1
Copy link
Contributor

@HPS-1 HPS-1 commented May 5, 2025

Implement khr_empty() under sycl_khr_queue_empty_query (see KhronosGroup/SYCL-Docs#700), which is essentially the same as ext_oneapi_empty() under sycl_ext_oneapi_queue_empty (https://github.com/intel/llvm/blob/sycl/sycl/doc/extensions/supported/sycl_ext_oneapi_queue_empty.asciidoc), and create respective test cases.

Note: the change of adding __DPCPP_ENABLE_UNFINISHED_KHR_EXTENSIONS in sycl/source/CMakeLists.txt is to make sure khr_empty's implementation get successfully compiled when compiling runtime. (Otherwise there will be a "no declaration matches" error since the declaration for khr_empty in sycl/include/sycl/queue.hpp is guarded under #ifdef __DPCPP_ENABLE_UNFINISHED_KHR_EXTENSIONS)

@HPS-1 HPS-1 temporarily deployed to WindowsCILock May 5, 2025 04:10 — with GitHub Actions Inactive
@HPS-1 HPS-1 temporarily deployed to WindowsCILock May 5, 2025 04:22 — with GitHub Actions Inactive
@HPS-1 HPS-1 temporarily deployed to WindowsCILock May 5, 2025 04:22 — with GitHub Actions Inactive
Signed-off-by: Hu, Peisen <[email protected]>
@HPS-1 HPS-1 temporarily deployed to WindowsCILock May 5, 2025 21:42 — with GitHub Actions Inactive
@HPS-1 HPS-1 temporarily deployed to WindowsCILock May 5, 2025 22:07 — with GitHub Actions Inactive
@HPS-1 HPS-1 temporarily deployed to WindowsCILock May 5, 2025 22:07 — with GitHub Actions Inactive
@HPS-1 HPS-1 temporarily deployed to WindowsCILock May 6, 2025 06:29 — with GitHub Actions Inactive
@HPS-1 HPS-1 temporarily deployed to WindowsCILock May 6, 2025 06:55 — with GitHub Actions Inactive
@HPS-1 HPS-1 temporarily deployed to WindowsCILock May 6, 2025 06:55 — with GitHub Actions Inactive
@HPS-1 HPS-1 marked this pull request as ready for review May 6, 2025 14:44
@HPS-1 HPS-1 requested a review from a team as a code owner May 6, 2025 14:44
@HPS-1 HPS-1 requested a review from againull May 6, 2025 14:44
@againull
Copy link
Contributor

againull commented May 6, 2025

@HPS-1 overall looks good, but should we wait for khronos specification to be merged first?

Signed-off-by: Hu, Peisen <[email protected]>
@HPS-1 HPS-1 temporarily deployed to WindowsCILock May 7, 2025 17:54 — with GitHub Actions Inactive
@HPS-1 HPS-1 temporarily deployed to WindowsCILock May 7, 2025 18:19 — with GitHub Actions Inactive
@HPS-1 HPS-1 temporarily deployed to WindowsCILock May 7, 2025 18:19 — with GitHub Actions Inactive
@HPS-1 HPS-1 temporarily deployed to WindowsCILock May 8, 2025 16:14 — with GitHub Actions Inactive
@HPS-1 HPS-1 temporarily deployed to WindowsCILock May 8, 2025 17:18 — with GitHub Actions Inactive
@HPS-1 HPS-1 temporarily deployed to WindowsCILock May 8, 2025 17:18 — with GitHub Actions Inactive
@HPS-1
Copy link
Contributor Author

HPS-1 commented May 8, 2025

@HPS-1 overall looks good, but should we wait for khronos specification to be merged first?

As suggested by Alexey, there's actually a 'deadlock' here, because the SYCL-Docs PR won't be merged until we implement that. So as described in https://github.com/intel/llvm/blob/sycl/sycl/doc/developer/KHRExtensions.md, we need to put our implementation under macro __DPCPP_ENABLE_UNFINISHED_KHR_EXTENSIONS and then proceed with the merge. I've added the needed macros in this PR.

@HPS-1 HPS-1 temporarily deployed to WindowsCILock May 8, 2025 17:35 — with GitHub Actions Inactive
@HPS-1 HPS-1 temporarily deployed to WindowsCILock May 8, 2025 18:27 — with GitHub Actions Inactive
@HPS-1 HPS-1 temporarily deployed to WindowsCILock May 8, 2025 18:27 — with GitHub Actions Inactive
@againull againull merged commit a30775d into intel:sycl May 9, 2025
20 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.

3 participants