-
Notifications
You must be signed in to change notification settings - Fork 30
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
x.__dlpack_device__() returns ID of the parent device #1560
Conversation
It gives ID (position in `sycl::device::get_devices()`) for the root device that the array allocation device descends from for sub-devices, or ID of the allocation device is that device is a root device.
Deleted rendered PR docs from intelpython.github.com/dpctl, latest should be updated shortly. 🤞 |
Array API standard conformance tests for dpctl=0.17.0dev0=py310h15de555_20 ran successfully. |
Array API standard conformance tests for dpctl=0.17.0dev0=py310h15de555_23 ran successfully. |
Array API standard conformance tests for dpctl=0.17.0dev0=py310h15de555_24 ran successfully. |
Array API standard conformance tests for dpctl=0.17.0dev0=py310h15de555_26 ran successfully. |
I have verified that this change allows one to share data allocated on the tile, if driver is used in legacy composite device-hierarchy. Newly added test passes for both default and legacy device-hierarchy modes. @ndgrigorian This PR is ready for final review. |
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.
These changes LGTM, thank you @oleksandr-pavlyk !
Backport gh-1560 to 0.16.x maintenance branch
x.__dlpack_device__()
returns ID of the parent device, if allocation device is not a root device.It gives ID (position in
sycl::device::get_devices()
) for the root device that the array allocation device descends from for sub-devices, or ID of the allocation device is that device is a root device.This allows sharing through DLPack of allocation on sub-devices, as long as default platform context for the platform the device is from was used in allocation.