Skip to content
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

Add buffer read/write commands to command-buffer extension #1281

Open
EwanC opened this issue Nov 6, 2024 · 2 comments
Open

Add buffer read/write commands to command-buffer extension #1281

EwanC opened this issue Nov 6, 2024 · 2 comments
Labels
cl_khr_command_buffer Relating to the command-buffer family of extension

Comments

@EwanC
Copy link
Contributor

EwanC commented Nov 6, 2024

The SYCL-Graph vendor extension in SYCL is layered on top of the cl_khr_command_buffer OpenCL extension. It currently cannot support the following graph nodes on OpenCL backends as there is no clCommandReadBuffer / clCommandWriteBuffer commands defined by cl_khr_command_buffer.

  • handler::copy(src, dest) - Where src is an accessor and dest is a pointer. This corresponds to a memory buffer read command.
  • handler::copy(src, dest) - Where src is an pointer and dest is an accessor. This corresponds to a memory buffer write command.

This is a feature request to add command append entry-points to cl_khr_command_buffer to support this, which could be optional to support if desired. PoCL vendor extension cl_pocl_command_buffer_host_buffer already exists to support this, so cc @pjaaskel

@EwanC EwanC added the cl_khr_command_buffer Relating to the command-buffer family of extension label Nov 6, 2024
@pjaaskel
Copy link
Contributor

pjaaskel commented Nov 6, 2024

+1. Notifying @franz .

@bashbaug
Copy link
Contributor

bashbaug commented Nov 6, 2024

Confirming: this feature would support reading into and writing from arbitrary host pointers, correct? The pointers would not need to be SVM or USM pointers?

I agree this is useful, but it also brings a surprising amount of complexity. For example, when is the host allowed to read from or write to the host pointers? When is the host allowed to free memory? Are there any requirements (e.g. alignment) for the host pointers?

If we relax this behavior then we should also consider relaxing the restriction on clCommandSVMMemcpyKHR (and clCommandSVMFillKHR?) to allow them to use arbitrary host pointers also.

One more question: Are these copy nodes required for SYCL-Graph? If so, this support would be required to support SYCL-Graph, even if it's optional in cl_khr_command_buffer, correct?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cl_khr_command_buffer Relating to the command-buffer family of extension
Projects
None yet
Development

No branches or pull requests

3 participants