Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/intel-llvm-mirror-base-commit
Original file line number Diff line number Diff line change
@@ -1 +1 @@
fa6bc3d3c3f2e91bb066e117a9ca2618e6df0631
9f81215b9beaeeefe7bb1dac850cedf5adb1b343
4 changes: 2 additions & 2 deletions source/adapters/level_zero/device.cpp
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -1986,7 +1986,7 @@ ur_result_t ur_device_handle_t_::initialize(int SubSubDeviceOrdinal,

std::vector<ZeStruct<ze_device_vector_width_properties_ext_t>>
PropertiesVector;
PropertiesVector.reserve(Count);
PropertiesVector.resize(Count);

ZeStruct<ze_device_vector_width_properties_ext_t>
MaxVectorWidthProperties;
Expand Down
13 changes: 4 additions & 9 deletions source/adapters/level_zero/usm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<size_t *>(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<size_t *>(Arg)) = AllocStats.getPeak();
UR_LOG(DEBUG, "L0MemoryProvider::ext_ctl with name: {}, value: {}", Name,
AllocStats.getPeak());
Expand Down