Skip to content

[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

Merged
merged 7 commits into from
Apr 12, 2022

Conversation

smaslov-intel
Copy link
Contributor

@smaslov-intel smaslov-intel commented Apr 5, 2022

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]

@smaslov-intel
Copy link
Contributor Author

Failed Tests (1):
SYCL :: Basic/buffer/buffer_create.cpp

Being fixed in intel/llvm-test-suite#976

@smaslov-intel
Copy link
Contributor Author

/verify with intel/llvm-test-suite#976

Signed-off-by: Sergey V Maslov <[email protected]>
@smaslov-intel
Copy link
Contributor Author

/verify with intel/llvm-test-suite#976

Signed-off-by: Sergey V Maslov <[email protected]>
@smaslov-intel
Copy link
Contributor Author

/verify with intel/llvm-test-suite#976

@smaslov-intel smaslov-intel requested a review from againull April 11, 2022 17:26
PI_CALL(USMFreeHelper(Context, ZeHandle, true));
break;
case allocation_t::free_native:
ZE_CALL(zeMemFree, (Context->ZeContext, ZeHandle))
Copy link
Contributor

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.

Suggested change
ZE_CALL(zeMemFree, (Context->ZeContext, ZeHandle))
if (auto Res = ZeMemFreeHelper(Context, ZeHandle, true))
return Res;

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

Copy link
Contributor

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]>
@againull againull self-requested a review April 12, 2022 00:10
Copy link
Contributor

@againull againull left a 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.

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

Successfully merging this pull request may close these issues.

2 participants