Skip to content

[SYCL][Graph][OpenCL] Map copy/fill to SVM #18177

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 1 commit into from
Apr 28, 2025

Conversation

EwanC
Copy link
Contributor

@EwanC EwanC commented Apr 24, 2025

There is currently no cl_khr_command_buffer or cl_intel_unified_shared_memory entry-point for appending USM copy or fill commands to a command-buffer. This prevents these commands from being added to a graph for the OpenCL backend.

The long term solution to this is the OpenCL USVM extension which will align USM and SVM, allowing the existing SVM entry-points to be used. To prepare for this, map the UR entry-points to the cl_khr_command_buffer SVM copy/fill commands.

This will work on OpenCL implementations that share an implementation for USM and SVM.

@EwanC EwanC temporarily deployed to WindowsCILock April 24, 2025 13:00 — with GitHub Actions Inactive
@EwanC EwanC temporarily deployed to WindowsCILock April 24, 2025 13:14 — with GitHub Actions Inactive
@EwanC EwanC temporarily deployed to WindowsCILock April 24, 2025 13:24 — with GitHub Actions Inactive
@EwanC EwanC force-pushed the ewan/graph_ocl_svm_fill branch from 7617e70 to b995e2f Compare April 24, 2025 13:45
@EwanC EwanC temporarily deployed to WindowsCILock April 24, 2025 13:46 — with GitHub Actions Inactive
@EwanC EwanC temporarily deployed to WindowsCILock April 24, 2025 14:22 — with GitHub Actions Inactive
@EwanC EwanC temporarily deployed to WindowsCILock April 24, 2025 14:33 — with GitHub Actions Inactive
@EwanC EwanC temporarily deployed to WindowsCILock April 24, 2025 14:33 — with GitHub Actions Inactive
@EwanC EwanC force-pushed the ewan/graph_ocl_svm_fill branch from b995e2f to 5c9635f Compare April 24, 2025 14:49
@EwanC EwanC temporarily deployed to WindowsCILock April 24, 2025 14:50 — with GitHub Actions Inactive
@EwanC EwanC temporarily deployed to WindowsCILock April 24, 2025 15:10 — with GitHub Actions Inactive
@EwanC EwanC temporarily deployed to WindowsCILock April 24, 2025 15:21 — with GitHub Actions Inactive
@EwanC EwanC temporarily deployed to WindowsCILock April 24, 2025 15:21 — with GitHub Actions Inactive
@EwanC EwanC force-pushed the ewan/graph_ocl_svm_fill branch from 5c9635f to e7c3ed7 Compare April 24, 2025 15:38
@EwanC EwanC temporarily deployed to WindowsCILock April 24, 2025 15:38 — with GitHub Actions Inactive
@EwanC EwanC temporarily deployed to WindowsCILock April 24, 2025 15:54 — with GitHub Actions Inactive
@EwanC EwanC temporarily deployed to WindowsCILock April 24, 2025 16:05 — with GitHub Actions Inactive
@EwanC EwanC temporarily deployed to WindowsCILock April 25, 2025 07:35 — with GitHub Actions Inactive
@EwanC EwanC marked this pull request as ready for review April 25, 2025 07:43
@EwanC EwanC requested review from a team as code owners April 25, 2025 07:43
Copy link
Contributor

@aarongreig aarongreig left a comment

Choose a reason for hiding this comment

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

CL LGTM

Copy link
Contributor

@Bensuo Bensuo left a comment

Choose a reason for hiding this comment

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

LGTM just a minor comment.

steffenlarsen pushed a commit that referenced this pull request Apr 25, 2025
There are currently limitations on what commands can be added to a
SYCL-Graph that we document in the [design
doc](https://github.com/intel/llvm/blob/sycl/sycl/doc/design/CommandGraph.md#opencl)
and mark as unsupported in Graph E2E tests.

However, we never marked the equivalent UR command-buffer commands as
unsupported in the CTS, so they will currently fail when testing against
an OpenCL backend with support for the extension. Address this by
marking CTS tests which use these commands as unsupported.

Note that this will conflict with
#18177 in that some CTS tests can be
re-enabled, but I can resolve that based on whatever merges first.
@EwanC EwanC force-pushed the ewan/graph_ocl_svm_fill branch from e7c3ed7 to ad932f0 Compare April 25, 2025 12:25
@EwanC EwanC temporarily deployed to WindowsCILock April 25, 2025 12:25 — with GitHub Actions Inactive
@EwanC EwanC temporarily deployed to WindowsCILock April 25, 2025 12:41 — with GitHub Actions Inactive
@EwanC EwanC temporarily deployed to WindowsCILock April 25, 2025 12:52 — with GitHub Actions Inactive
There is currently no cl_khr_command_buffer or cl_intel_unified_shared_memory
entry-point for appending USM copy or fill commands to a command-buffer.
This prevents these commands from being added to a graph for the OpenCL
backend.

The long term solution to this is the OpenCL USVM extension which will
align USM and SVM, allowing the existing SVM entry-points to be used.
To prepare for this, map the UR entry-points to the
cl_khr_command_buffer SVM copy/fill commands.

This will work on OpenCL implementations that share an implementation
for USM and SVM.

Signed-off-by: Ewan Crawford <[email protected]>
@EwanC EwanC force-pushed the ewan/graph_ocl_svm_fill branch from ad932f0 to 5f06c13 Compare April 25, 2025 14:36
@EwanC EwanC temporarily deployed to WindowsCILock April 25, 2025 14:36 — with GitHub Actions Inactive
@EwanC EwanC temporarily deployed to WindowsCILock April 25, 2025 14:53 — with GitHub Actions Inactive
@EwanC EwanC temporarily deployed to WindowsCILock April 25, 2025 15:04 — with GitHub Actions Inactive
@EwanC EwanC temporarily deployed to WindowsCILock April 25, 2025 15:04 — with GitHub Actions Inactive
@EwanC
Copy link
Contributor Author

EwanC commented Apr 28, 2025

@intel/llvm-gatekeepers This is good to merge, thanks

@sommerlukas sommerlukas merged commit 4ed8534 into intel:sycl Apr 28, 2025
48 of 49 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.

5 participants