Skip to content

Commit c438785

Browse files
authored
[UR][L0] Properly allocate vector (#19651)
* ZeStruct constructor must be called before calling API Signed-off-by: Kozlowski, Marek <[email protected]>
1 parent 37b9f73 commit c438785

File tree

1 file changed

+2
-2
lines changed
  • unified-runtime/source/adapters/level_zero

1 file changed

+2
-2
lines changed

unified-runtime/source/adapters/level_zero/device.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//===--------- device.cpp - Level Zero Adapter ----------------------------===//
22
//
3-
// Copyright (C) 2023-2024 Intel Corporation
3+
// Copyright (C) 2023-2025 Intel Corporation
44
//
55
// Part of the Unified-Runtime Project, under the Apache License v2.0 with LLVM
66
// Exceptions. See LICENSE.TXT
@@ -1986,7 +1986,7 @@ ur_result_t ur_device_handle_t_::initialize(int SubSubDeviceOrdinal,
19861986

19871987
std::vector<ZeStruct<ze_device_vector_width_properties_ext_t>>
19881988
PropertiesVector;
1989-
PropertiesVector.reserve(Count);
1989+
PropertiesVector.resize(Count);
19901990

19911991
ZeStruct<ze_device_vector_width_properties_ext_t>
19921992
MaxVectorWidthProperties;

0 commit comments

Comments
 (0)