diff --git a/.github/intel-llvm-mirror-base-commit b/.github/intel-llvm-mirror-base-commit index 859d8cbd18..513bceac10 100644 --- a/.github/intel-llvm-mirror-base-commit +++ b/.github/intel-llvm-mirror-base-commit @@ -1 +1 @@ -fa6bc3d3c3f2e91bb066e117a9ca2618e6df0631 +9f81215b9beaeeefe7bb1dac850cedf5adb1b343 diff --git a/source/adapters/level_zero/device.cpp b/source/adapters/level_zero/device.cpp index eb19063999..5410125ede 100644 --- a/source/adapters/level_zero/device.cpp +++ b/source/adapters/level_zero/device.cpp @@ -1,6 +1,6 @@ //===--------- device.cpp - Level Zero Adapter ----------------------------===// // -// Copyright (C) 2023-2024 Intel Corporation +// Copyright (C) 2023-2025 Intel Corporation // // Part of the Unified-Runtime Project, under the Apache License v2.0 with LLVM // Exceptions. See LICENSE.TXT @@ -1986,7 +1986,7 @@ ur_result_t ur_device_handle_t_::initialize(int SubSubDeviceOrdinal, std::vector> PropertiesVector; - PropertiesVector.reserve(Count); + PropertiesVector.resize(Count); ZeStruct MaxVectorWidthProperties; diff --git a/source/adapters/level_zero/usm.cpp b/source/adapters/level_zero/usm.cpp index ca2b462067..4c91d87a2b 100644 --- a/source/adapters/level_zero/usm.cpp +++ b/source/adapters/level_zero/usm.cpp @@ -925,20 +925,15 @@ umf_result_t L0MemoryProvider::ext_ctl(umf_ctl_query_source_t /*Source*/, const char *Name, void *Arg, size_t Size, umf_ctl_query_type_t /*QueryType*/, va_list /*Args*/) { - if (std::string(Name) == "stats.allocated_memory") { - if (!Arg && Size < sizeof(size_t)) { - return UMF_RESULT_ERROR_INVALID_ARGUMENT; - } + if (!Arg || Size < sizeof(size_t)) { + return UMF_RESULT_ERROR_INVALID_ARGUMENT; + } + if (std::string(Name) == "stats.allocated_memory") { *(reinterpret_cast(Arg)) = AllocStats.getCurrent(); UR_LOG(DEBUG, "L0MemoryProvider::ext_ctl with name: {}, value: {}", Name, AllocStats.getCurrent()); } else if (std::string(Name) == "stats.peak_memory") { - if (!Arg && Size < sizeof(size_t)) { - return UMF_RESULT_ERROR_INVALID_ARGUMENT; - } - - // Return the peak memory size. *(reinterpret_cast(Arg)) = AllocStats.getPeak(); UR_LOG(DEBUG, "L0MemoryProvider::ext_ctl with name: {}, value: {}", Name, AllocStats.getPeak());