Commit 8fa17b4
authored
[SYCL][CUDA][HIP] Fix PI_MEM_ALLOC_DEVICE USM pointer query (#5325)
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 #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.1 parent 4d031a4 commit 8fa17b4
2 files changed
Lines changed: 23 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4825 | 4825 | | |
4826 | 4826 | | |
4827 | 4827 | | |
4828 | | - | |
| 4828 | + | |
| 4829 | + | |
4829 | 4830 | | |
4830 | | - | |
4831 | | - | |
4832 | | - | |
4833 | | - | |
| 4831 | + | |
| 4832 | + | |
| 4833 | + | |
| 4834 | + | |
| 4835 | + | |
| 4836 | + | |
| 4837 | + | |
| 4838 | + | |
| 4839 | + | |
| 4840 | + | |
4834 | 4841 | | |
4835 | 4842 | | |
4836 | 4843 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4792 | 4792 | | |
4793 | 4793 | | |
4794 | 4794 | | |
4795 | | - | |
| 4795 | + | |
4796 | 4796 | | |
4797 | 4797 | | |
4798 | | - | |
4799 | | - | |
4800 | | - | |
4801 | | - | |
4802 | | - | |
4803 | | - | |
| 4798 | + | |
| 4799 | + | |
| 4800 | + | |
| 4801 | + | |
| 4802 | + | |
| 4803 | + | |
| 4804 | + | |
| 4805 | + | |
| 4806 | + | |
| 4807 | + | |
4804 | 4808 | | |
4805 | 4809 | | |
4806 | 4810 | | |
| |||
0 commit comments