-
Notifications
You must be signed in to change notification settings - Fork 787
[SYCL] Fix handling of host-side memory in 2D memops #8359
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] Fix handling of host-side memory in 2D memops #8359
Conversation
The current implementation of 2D USM memory operations will launch a kernel as a fallback mechanism. However, these interfaces are also intended to accept pointers USM and non-USM host memory. To allow this, the implementation now picks different fallback mechanisms depending on the type of pointer passed. For fill/memset this means: 1. Always use backend-defined interface if available. 2. Use auxiliary fill kernel if pointer is to device memory. 3. Use a host-task with a fill per row if the pointer is to host memory. For memcpy/copy this means: 1. Always use backend-defined interface if available. 2. Use auxiliary copy kernel if both pointers are to device memory. 3. Use a host-task with a copy per row if both pointer are to host memory. 4. Enqueue a USM memcpy per row if one pointer is to in host memory and the other pointer is in device memory. Signed-off-by: Larsen, Steffen <steffen.larsen@intel.com>
Signed-off-by: Larsen, Steffen <steffen.larsen@intel.com>
/verify with intel/llvm-test-suite#1597 |
/verify with intel/llvm-test-suite#1597 |
Signed-off-by: Larsen, Steffen <steffen.larsen@intel.com>
Signed-off-by: Larsen, Steffen <steffen.larsen@intel.com>
/verify with intel/llvm-test-suite#1597 |
Signed-off-by: Larsen, Steffen <steffen.larsen@intel.com>
/verify with intel/llvm-test-suite#1597 |
@intel/llvm-reviewers-runtime - Friendly ping. |
@steffenlarsen there is ABI test failure on Windows: https://github.com/intel/llvm/actions/runs/4344793318/jobs/7588612300, can you please take a look? |
Thank you, @dm-vodopyanov ! Fixed in #8547. |
|
||
// Do the following: | ||
// 1. If both are host, use host_task to copy. | ||
// 2. If either pointer is host or of the backend supports native memcpy2d, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo: "or OF the backend"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in #8553.
The current implementation of 2D USM memory operations will launch a kernel as a fallback mechanism. However, these interfaces are also intended to accept pointers to USM and non-USM host memory. To allow this, the implementation now picks different fallback mechanisms depending on the type of pointer passed.
For fill/memset this means:
For memcpy/copy this means: