Skip to content

Commit a40c643

Browse files
committed
Add test and use same error across adapters
1 parent 7bced09 commit a40c643

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

source/adapters/native_cpu/device.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,8 +365,9 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo(ur_device_handle_t hDevice,
365365
case UR_DEVICE_INFO_MAX_WORK_GROUPS_3D:
366366
case UR_DEVICE_INFO_MEMORY_CLOCK_RATE:
367367
case UR_DEVICE_INFO_MEMORY_BUS_WIDTH:
368-
case UR_DEVICE_INFO_2D_BLOCK_ARRAY_CAPABILITIES_EXP:
369368
return UR_RESULT_ERROR_INVALID_VALUE;
369+
case UR_DEVICE_INFO_2D_BLOCK_ARRAY_CAPABILITIES_EXP:
370+
return UR_RESULT_ERROR_UNSUPPORTED_ENUMERATION;
370371
case UR_DEVICE_INFO_ATOMIC_FENCE_ORDER_CAPABILITIES: {
371372
// Currently for Native CPU fences are implemented using OCK
372373
// builtins, so we have different capabilities than atomic operations

test/adapters/level_zero/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ if(UR_BUILD_ADAPTER_L0)
2929
target_link_libraries(test-adapter-level_zero PRIVATE
3030
LevelZeroLoader
3131
LevelZeroLoader-Headers
32+
ComputeRuntimeLevelZero-Headers
3233
)
3334

3435
target_include_directories(test-adapter-level_zero PRIVATE

test/conformance/device/urDeviceGetInfo.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,8 @@ static std::unordered_map<ur_device_info_t, size_t> device_info_size_map = {
115115
{UR_DEVICE_INFO_MAX_REGISTERS_PER_WORK_GROUP, sizeof(uint32_t)},
116116
{UR_DEVICE_INFO_COMPONENT_DEVICES, sizeof(uint32_t)},
117117
{UR_DEVICE_INFO_COMPOSITE_DEVICE, sizeof(ur_device_handle_t)},
118-
};
118+
{UR_DEVICE_INFO_2D_BLOCK_ARRAY_CAPABILITIES_EXP,
119+
sizeof(ur_exp_device_2d_block_array_capability_flags_t)}};
119120

120121
struct urDeviceGetInfoTest : uur::urAllDevicesTest,
121122
::testing::WithParamInterface<ur_device_info_t> {
@@ -236,7 +237,8 @@ INSTANTIATE_TEST_SUITE_P(
236237
UR_DEVICE_INFO_HOST_PIPE_READ_WRITE_SUPPORTED, //
237238
UR_DEVICE_INFO_MAX_REGISTERS_PER_WORK_GROUP, //
238239
UR_DEVICE_INFO_VIRTUAL_MEMORY_SUPPORT, //
239-
UR_DEVICE_INFO_KERNEL_SET_SPECIALIZATION_CONSTANTS //
240+
UR_DEVICE_INFO_KERNEL_SET_SPECIALIZATION_CONSTANTS, //
241+
UR_DEVICE_INFO_2D_BLOCK_ARRAY_CAPABILITIES_EXP //
240242
),
241243
[](const ::testing::TestParamInfo<ur_device_info_t> &info) {
242244
std::stringstream ss;

0 commit comments

Comments
 (0)