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

SYCL currently does not support associating USM with a specific queue #1546

Open
jinz2014 opened this issue Dec 20, 2023 · 1 comment
Open
Labels
enhancement New feature or request

Comments

@jinz2014
Copy link
Contributor

It is a feature request due to the SYCL support.

The call to cudaStreamAttachMemAsync was replaced with 0 because SYCL currently does not support associating USM with a specific queue.

I am not sure if the CUDA support is required to run the example successfully. Thanks.

Reference
https://github.com/NVIDIA/cuda-samples/tree/master/Samples/0_Introduction/UnifiedMemoryStreams

@jinz2014 jinz2014 added the enhancement New feature or request label Dec 20, 2023
@tomflinda
Copy link
Contributor

tomflinda commented Dec 26, 2023

@jinz2014 for cudaStreamAttachMemAsync, attached devPtr has three kind of memory:

  1. managed memory declared using the managed keyword or allocated with cudaMallocManaged, which is mapped into shared memory in SYCL side, the memory is accessible by all the queues in the same context as default.
  2. host-accessible region of system-allocated pageable memory, which has two scenarios.
    2.1. the memory is allocated by cudaHostAlloc(), which is mapped to sycl::malloc_host(), the memory is accessible by all the queues in the same context as default..
    2.2. the memory is allocated by cudaHostRegister(), which is not support in SYCL side.

In cuda side, the memory should be attached before used on device, while in SYCL side, which is not needed, or not supported.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants