Skip to content

Commit 691f842

Browse files
[SYCL][CUDA] Fix USM pointer device query (#3574)
Querying the device corresponding to a USM pointer would cause fail due to an invalid parameter when requesting the underlying platform. This changes the invalid parameter to a valid one. Signed-off-by: Steffen Larsen <[email protected]>
1 parent 7ed7dc1 commit 691f842

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sycl/plugins/cuda/pi_cuda.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4606,7 +4606,7 @@ pi_result cuda_piextUSMGetMemAllocInfo(pi_context context, const void *ptr,
46064606
result = PI_CHECK_ERROR(cuPointerGetAttribute(
46074607
&value, CU_POINTER_ATTRIBUTE_DEVICE_ORDINAL, (CUdeviceptr)ptr));
46084608
pi_platform platform;
4609-
result = cuda_piPlatformsGet(0, &platform, nullptr);
4609+
result = cuda_piPlatformsGet(1, &platform, nullptr);
46104610
pi_device device = platform->devices_[value].get();
46114611
return getInfo(param_value_size, param_value, param_value_size_ret,
46124612
device);

0 commit comments

Comments
 (0)