Skip to content

how to use sycl_cuda_pi usm manage memory? #7281

Answered by JackAKirk
wangzy0327 asked this question in Q&A
Discussion options

You must be logged in to vote

cuda Managed Memory maps to USM shared memory in the cuda sycl backend as described in the SYCL 2020 spec https://github.com/intel/llvm-test-suite/blob/intel/SYCL/USM/memadvise_cuda.cpp.

For basic usage see for example this test, https://github.com/intel/llvm-test-suite/blob/intel/SYCL/USM/depends_on.cpp, which allocates shared memory, operates on it on device, then checks results on host.

You can also use memory advice hints on shared usm in the cuda backend as in this test: https://github.com/intel/llvm-test-suite/blob/intel/SYCL/USM/memadvise_cuda.cpp . Choosing good memory advice can improve performance is some cases as discussed e.g. here: https://developer.nvidia.com/blog/maximizing…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by AlexeySachkov
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
bug Something isn't working
2 participants
Converted from issue

This discussion was converted from issue #7219 on November 04, 2022 12:54.