From 5cb6589e522bb55eba97b64742a28ff534472da1 Mon Sep 17 00:00:00 2001 From: Martin Grant Date: Fri, 3 Jan 2025 14:34:18 +0000 Subject: [PATCH 1/2] Merge pull request #2503 from omarahmed1111/fix-cuda-uninitialized-event [Windows][CUDA] Fix cuda uninitialized event warning --- source/adapters/cuda/command_buffer.cpp | 6 +++--- source/adapters/cuda/device.cpp | 2 +- source/adapters/cuda/platform.cpp | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/source/adapters/cuda/command_buffer.cpp b/source/adapters/cuda/command_buffer.cpp index b60d2944b1..353b0ebc41 100644 --- a/source/adapters/cuda/command_buffer.cpp +++ b/source/adapters/cuda/command_buffer.cpp @@ -52,7 +52,7 @@ commandHandleReleaseInternal(ur_exp_command_buffer_command_handle_t Command) { // of the `ur_event_t` object doesn't free the underlying CuEvent_t object and // we need to do it manually ourselves. if (Command->SignalNode) { - CUevent SignalEvent; + CUevent SignalEvent{}; UR_CHECK_ERROR( cuGraphEventRecordNodeGetEvent(Command->SignalNode, &SignalEvent)); UR_CHECK_ERROR(cuEventDestroy(SignalEvent)); @@ -85,7 +85,7 @@ ur_exp_command_buffer_handle_t_::~ur_exp_command_buffer_handle_t_() { std::unique_ptr ur_exp_command_buffer_handle_t_::addSignalNode(CUgraphNode DepNode, CUgraphNode &SignalNode) { - CUevent Event; + CUevent Event{}; UR_CHECK_ERROR(cuEventCreate(&Event, CU_EVENT_DEFAULT)); UR_CHECK_ERROR( cuGraphAddEventRecordNode(&SignalNode, CudaGraph, &DepNode, 1, Event)); @@ -1433,7 +1433,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urCommandBufferUpdateSignalEventExp( return UR_RESULT_ERROR_INVALID_OPERATION; } - CUevent SignalEvent; + CUevent SignalEvent{}; UR_CHECK_ERROR(cuGraphEventRecordNodeGetEvent(SignalNode, &SignalEvent)); if (phEvent) { diff --git a/source/adapters/cuda/device.cpp b/source/adapters/cuda/device.cpp index d8916ccedd..ef306abf82 100644 --- a/source/adapters/cuda/device.cpp +++ b/source/adapters/cuda/device.cpp @@ -1238,7 +1238,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceCreateWithNativeHandle( ur_result_t UR_APICALL urDeviceGetGlobalTimestamps(ur_device_handle_t hDevice, uint64_t *pDeviceTimestamp, uint64_t *pHostTimestamp) { - CUevent Event; + CUevent Event{}; ScopedContext Active(hDevice); if (pDeviceTimestamp) { diff --git a/source/adapters/cuda/platform.cpp b/source/adapters/cuda/platform.cpp index 7ce0bba9e7..cad809a1e5 100644 --- a/source/adapters/cuda/platform.cpp +++ b/source/adapters/cuda/platform.cpp @@ -84,7 +84,7 @@ urPlatformGet(ur_adapter_handle_t *, uint32_t, uint32_t NumEntries, UR_CHECK_ERROR(cuDevicePrimaryCtxRetain(&Context, Device)); ScopedContext Active(Context); // Set native ctx as active - CUevent EvBase; + CUevent EvBase{}; UR_CHECK_ERROR(cuEventCreate(&EvBase, CU_EVENT_DEFAULT)); // Use default stream to record base event counter From 0936073be6d7a9bf84556f0f0049b4f3ed210039 Mon Sep 17 00:00:00 2001 From: "Kenneth Benzie (Benie)" Date: Thu, 23 Jan 2025 15:33:38 +0000 Subject: [PATCH 2/2] Set CMake version to v0.11.6 --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 23f7dfb0b6..43d5184fdf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,7 +4,7 @@ # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception cmake_minimum_required(VERSION 3.20.0 FATAL_ERROR) -project(unified-runtime VERSION 0.11.5) +project(unified-runtime VERSION 0.11.6) # Check if unified runtime is built as a standalone project. if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR OR UR_STANDALONE_BUILD)