-
Notifications
You must be signed in to change notification settings - Fork 787
[SYCL][L0] Support buffer migration for contexts with multiple devices #5966
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
Conversation
Being fixed in intel/llvm-test-suite#976 |
/verify with intel/llvm-test-suite#976 |
Signed-off-by: Sergey V Maslov <[email protected]>
Signed-off-by: Sergey V Maslov <[email protected]>
Signed-off-by: Sergey V Maslov <[email protected]>
Signed-off-by: Sergey V Maslov <[email protected]>
/verify with intel/llvm-test-suite#976 |
Signed-off-by: Sergey V Maslov <[email protected]>
Signed-off-by: Sergey V Maslov <[email protected]>
/verify with intel/llvm-test-suite#976 |
PI_CALL(USMFreeHelper(Context, ZeHandle, true)); | ||
break; | ||
case allocation_t::free_native: | ||
ZE_CALL(zeMemFree, (Context->ZeContext, ZeHandle)) |
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.
Please use helper which takes into account an option of tracking indirectly accessed memory.
ZE_CALL(zeMemFree, (Context->ZeContext, ZeHandle)) | |
if (auto Res = ZeMemFreeHelper(Context, ZeHandle, true)) | |
return Res; |
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.
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.
Thank you.
Signed-off-by: Sergey V Maslov <[email protected]>
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.
Looks good to me.
The changes make SYCL buffer to work properly in contexts with multiple devices.
Instead of creating a single host allocation and using it from all devices (which is slow, at least) it is now maintaining device allocations in all used devices, and maintains migration of valid buffer data across these multiple device allocations.
E2E test is in intel/llvm-test-suite#976
Signed-off-by: Sergey V Maslov [email protected]