diff --git a/sycl/plugins/unified_runtime/pi2ur.hpp b/sycl/plugins/unified_runtime/pi2ur.hpp index 9642105dc5e61..787c3167c7936 100644 --- a/sycl/plugins/unified_runtime/pi2ur.hpp +++ b/sycl/plugins/unified_runtime/pi2ur.hpp @@ -1570,7 +1570,6 @@ inline pi_result piextQueueCreateWithNativeHandle( PI_ASSERT(Context, PI_ERROR_INVALID_CONTEXT); PI_ASSERT(NativeHandle, PI_ERROR_INVALID_VALUE); PI_ASSERT(Queue, PI_ERROR_INVALID_QUEUE); - PI_ASSERT(Device, PI_ERROR_INVALID_DEVICE); ur_context_handle_t UrContext = reinterpret_cast(Context); diff --git a/sycl/plugins/unified_runtime/ur/adapters/cuda/queue.cpp b/sycl/plugins/unified_runtime/ur/adapters/cuda/queue.cpp index fb2781c343ce0..4127059c58f66 100644 --- a/sycl/plugins/unified_runtime/ur/adapters/cuda/queue.cpp +++ b/sycl/plugins/unified_runtime/ur/adapters/cuda/queue.cpp @@ -243,10 +243,10 @@ UR_APIEXPORT ur_result_t UR_APICALL urQueueCreateWithNativeHandle( ur_device_handle_t hDevice, const ur_queue_native_properties_t *pProperties, ur_queue_handle_t *phQueue) { (void)pProperties; + (void)hDevice; unsigned int CuFlags; CUstream CuStream = reinterpret_cast(hNativeQueue); - UR_ASSERT(hContext->getDevice() == hDevice, UR_RESULT_ERROR_INVALID_DEVICE); auto Return = UR_CHECK_ERROR(cuStreamGetFlags(CuStream, &CuFlags)); @@ -266,7 +266,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urQueueCreateWithNativeHandle( *phQueue = new ur_queue_handle_t_{std::move(ComputeCuStreams), std::move(TransferCuStreams), hContext, - hDevice, + hContext->getDevice(), CuFlags, Flags, /*backend_owns*/ false};