diff --git a/sycl/plugins/unified_runtime/CMakeLists.txt b/sycl/plugins/unified_runtime/CMakeLists.txt index 468146faa81c5..9f19af3024c2b 100644 --- a/sycl/plugins/unified_runtime/CMakeLists.txt +++ b/sycl/plugins/unified_runtime/CMakeLists.txt @@ -100,13 +100,13 @@ if(SYCL_PI_UR_USE_FETCH_CONTENT) endfunction() set(UNIFIED_RUNTIME_REPO "https://github.com/oneapi-src/unified-runtime.git") - # commit 731376d9dfbc9099a279019ec05c64f0f8c6a7ef - # Merge: 40300808 665d4a68 - # Author: aarongreig - # Date: Fri Jul 5 09:44:30 2024 +0100 - # Merge pull request #1802 from nrspruit/fix_immediate_cmdlist_reuse - # [L0] Fix immediate command list use in Command Queues - set(UNIFIED_RUNTIME_TAG 0cbacd8a0844acb64091ecbb0c7d6a7df1b6160e) + # commit 38bd941caf19213e9091e4da9b98df350f7c7955 + # Merge: fa06e95c 36ca9f15 + # Author: Kenneth Benzie (Benie) + # Date: Fri Jul 5 13:48:45 2024 +0100 + # Merge pull request #1587 from callumfare/callum/native_handle_uintptr_t + # Change ur_native_handle_t to be uintptr_t + set(UNIFIED_RUNTIME_TAG 38bd941caf19213e9091e4da9b98df350f7c7955) fetch_adapter_source(level_zero ${UNIFIED_RUNTIME_REPO} diff --git a/sycl/plugins/unified_runtime/pi2ur.hpp b/sycl/plugins/unified_runtime/pi2ur.hpp index 5e63a9c49e6a2..172c782ed9454 100644 --- a/sycl/plugins/unified_runtime/pi2ur.hpp +++ b/sycl/plugins/unified_runtime/pi2ur.hpp @@ -869,7 +869,7 @@ inline pi_result piextPlatformGetNativeHandle(pi_platform Platform, ur_native_handle_t UrNativeHandle{}; HANDLE_ERRORS(urPlatformGetNativeHandle(UrPlatform, &UrNativeHandle)); - *NativeHandle = reinterpret_cast(UrNativeHandle); + *NativeHandle = UrNativeHandle; return PI_SUCCESS; } @@ -887,8 +887,7 @@ piextPlatformCreateWithNativeHandle(pi_native_handle NativeHandle, } ur_platform_handle_t UrPlatform{}; - ur_native_handle_t UrNativeHandle = - reinterpret_cast(NativeHandle); + ur_native_handle_t UrNativeHandle = NativeHandle; ur_platform_native_properties_t UrProperties{}; urPlatformCreateWithNativeHandle(UrNativeHandle, adapter, &UrProperties, &UrPlatform); @@ -1373,7 +1372,7 @@ inline pi_result piextDeviceGetNativeHandle(pi_device Device, ur_native_handle_t UrNativeHandle{}; HANDLE_ERRORS(urDeviceGetNativeHandle(UrDevice, &UrNativeHandle)); - *NativeHandle = reinterpret_cast(UrNativeHandle); + *NativeHandle = UrNativeHandle; return PI_SUCCESS; } @@ -1390,8 +1389,7 @@ piextDeviceCreateWithNativeHandle(pi_native_handle NativeHandle, } (void)adapter; - ur_native_handle_t UrNativeDevice = - reinterpret_cast(NativeHandle); + ur_native_handle_t UrNativeDevice = NativeHandle; ur_platform_handle_t UrPlatform = reinterpret_cast(Platform); auto UrDevice = reinterpret_cast(Device); @@ -1581,7 +1579,7 @@ inline pi_result piextContextGetNativeHandle(pi_context Context, reinterpret_cast(Context); ur_native_handle_t UrNativeHandle{}; HANDLE_ERRORS(urContextGetNativeHandle(UrContext, &UrNativeHandle)); - *NativeHandle = reinterpret_cast(UrNativeHandle); + *NativeHandle = UrNativeHandle; return PI_SUCCESS; } @@ -1597,8 +1595,7 @@ inline pi_result piextContextCreateWithNativeHandle( } (void)adapter; - ur_native_handle_t NativeContext = - reinterpret_cast(NativeHandle); + ur_native_handle_t NativeContext = NativeHandle; const ur_device_handle_t *UrDevices = reinterpret_cast(Devices); ur_context_handle_t *UrContext = @@ -1775,8 +1772,7 @@ inline pi_result piextQueueCreateWithNativeHandle( ur_context_handle_t UrContext = reinterpret_cast(Context); ur_device_handle_t UrDevice = reinterpret_cast(Device); - ur_native_handle_t UrNativeHandle = - reinterpret_cast(NativeHandle); + ur_native_handle_t UrNativeHandle = NativeHandle; ur_queue_handle_t *UrQueue = reinterpret_cast(Queue); ur_queue_native_properties_t UrNativeProperties{}; UrNativeProperties.isNativeHandleOwned = OwnNativeHandle; @@ -1825,7 +1821,7 @@ inline pi_result piextQueueGetNativeHandle(pi_queue Queue, ur_native_handle_t UrNativeQueue{}; HANDLE_ERRORS(urQueueGetNativeHandle(UrQueue, &UrNativeDesc, &UrNativeQueue)); - *NativeHandle = reinterpret_cast(UrNativeQueue); + *NativeHandle = UrNativeQueue; return PI_SUCCESS; } @@ -2333,8 +2329,7 @@ piextKernelCreateWithNativeHandle(pi_native_handle NativeHandle, PI_ASSERT(NativeHandle, PI_ERROR_INVALID_VALUE); PI_ASSERT(Kernel, PI_ERROR_INVALID_KERNEL); - ur_native_handle_t UrNativeKernel = - reinterpret_cast(NativeHandle); + ur_native_handle_t UrNativeKernel = NativeHandle; ur_context_handle_t UrContext = reinterpret_cast(Context); ur_program_handle_t UrProgram = @@ -2414,7 +2409,7 @@ inline pi_result piextProgramGetNativeHandle(pi_program Program, ur_native_handle_t NativeProgram{}; HANDLE_ERRORS(urProgramGetNativeHandle(UrProgram, &NativeProgram)); - *NativeHandle = reinterpret_cast(NativeProgram); + *NativeHandle = NativeProgram; return PI_SUCCESS; } @@ -2427,8 +2422,7 @@ piextProgramCreateWithNativeHandle(pi_native_handle NativeHandle, PI_ASSERT(NativeHandle, PI_ERROR_INVALID_VALUE); PI_ASSERT(Context, PI_ERROR_INVALID_CONTEXT); - ur_native_handle_t NativeProgram = - reinterpret_cast(NativeHandle); + ur_native_handle_t NativeProgram = NativeHandle; ur_context_handle_t UrContext = reinterpret_cast(Context); ur_program_handle_t *UrProgram = @@ -2669,7 +2663,7 @@ inline pi_result piextKernelGetNativeHandle(pi_kernel Kernel, ur_native_handle_t NativeKernel{}; HANDLE_ERRORS(urKernelGetNativeHandle(UrKernel, &NativeKernel)); - *NativeHandle = reinterpret_cast(NativeKernel); + *NativeHandle = NativeKernel; return PI_SUCCESS; } @@ -3149,8 +3143,7 @@ inline pi_result piextMemImageCreateWithNativeHandle( PI_ASSERT(NativeHandle, PI_ERROR_INVALID_VALUE); PI_ASSERT(Context, PI_ERROR_INVALID_CONTEXT); - ur_native_handle_t UrNativeMem = - reinterpret_cast(NativeHandle); + ur_native_handle_t UrNativeMem = NativeHandle; ur_context_handle_t UrContext = reinterpret_cast(Context); @@ -3225,7 +3218,7 @@ inline pi_result piextMemGetNativeHandle(pi_mem Mem, pi_device Dev, ur_native_handle_t NativeMem{}; HANDLE_ERRORS(urMemGetNativeHandle(UrMem, UrDev, &NativeMem)); - *NativeHandle = reinterpret_cast(NativeMem); + *NativeHandle = NativeMem; return PI_SUCCESS; } @@ -3270,8 +3263,7 @@ inline pi_result piextMemCreateWithNativeHandle(pi_native_handle NativeHandle, PI_ASSERT(NativeHandle, PI_ERROR_INVALID_VALUE); PI_ASSERT(Context, PI_ERROR_INVALID_CONTEXT); - ur_native_handle_t UrNativeMem = - reinterpret_cast(NativeHandle); + ur_native_handle_t UrNativeMem = NativeHandle; ur_context_handle_t UrContext = reinterpret_cast(Context); ur_mem_handle_t *UrMem = reinterpret_cast(Mem); @@ -4319,7 +4311,7 @@ inline pi_result piEventCreate(pi_context Context, pi_event *RetEvent) { // as urEventCreate ur_event_native_properties_t Properties{}; HANDLE_ERRORS( - urEventCreateWithNativeHandle(nullptr, UrContext, &Properties, UREvent)); + urEventCreateWithNativeHandle(NULL, UrContext, &Properties, UREvent)); return PI_SUCCESS; } @@ -4333,8 +4325,7 @@ inline pi_result piextEventCreateWithNativeHandle(pi_native_handle NativeHandle, PI_ASSERT(Event, PI_ERROR_INVALID_EVENT); PI_ASSERT(NativeHandle, PI_ERROR_INVALID_VALUE); - ur_native_handle_t UrNativeKernel = - reinterpret_cast(NativeHandle); + ur_native_handle_t UrNativeKernel = NativeHandle; ur_context_handle_t UrContext = reinterpret_cast(Context);