Skip to content
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][CUDA][HIP] Fix PI_MEM_ALLOC_DEVICE USM pointer query #5325

Merged
merged 1 commit into from Jan 18, 2022

Conversation

npmiller
Copy link
Contributor

This fixes the USM/pointer_quer.cpp test from llvm-test-suite for
HIP.

For HIP the code was using the device pointer to index the device array
for some reason, which is obviously incorrect, now it should be using
the correct property to get the device index on the hardware.

In addition for both HIP and CUDA the query was using the device index
to index into the array of devices on the platform, this is incorrect
since #4571 which moved every device in its own platform. Therefore to
get the correct device we now need to use the index on the list of
platforms, and then 0 on the list of devices.

@npmiller npmiller requested review from a team as code owners January 17, 2022 16:29
This fixes the `USM/pointer_query.cpp` test from `llvm-test-suite` for
HIP.

For HIP the code was using the device pointer to index the device array
for some reason, which is obviously incorrect, now it should be using
the correct property to get the device index on the hardware.

In addition for both HIP and CUDA the query was using the device index
to index into the array of devices on the platform, this is incorrect
since intel#4571 which moved every device in its own platform. Therefore to
get the correct device we now need to use the index on the list of
platforms, and then `0` on the list of devices.
Copy link
Contributor

@steffenlarsen steffenlarsen left a comment

Choose a reason for hiding this comment

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

Makes sense. LGTM!

@bader bader merged commit 8fa17b4 into intel:sycl Jan 18, 2022
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.

None yet

3 participants