Skip to content

Commit 6b299d0

Browse files
martygrantkbenzie
authored andcommitted
Improvements to align CTS and Spec for Device (#16746)
Migrated from oneapi-src#2597 - Rework urDeviceGetInfoTest to move all enums to their own tests instead of a switch case - oneapi-src#2290 - Remove the UR/OpenCL Device enum map function - no point maintaining both a switch case and a separate mapping function - Update some spec wording for consistency - Add missing Device info enums to OpenCL adapater - Add new urDevicePartition test for checking UR_DEVICE_INFO_PARENT_DEVICE - Move UUR_RETURN_ON_FATAL_FAILURE and UUR_ASSERT_SUCCESS_OR_UNSUPPORTED to join similar macros in checks.h - Update spec to say info queries that return char[] are null-terminated - Add missing unsupported device enums to HIP adapter - Reverted bindless image types back to size_t - Moved ComponentDevices test to a separate PlatformTest derived fixture - Added new ASSERT_QUERY_RETURNS_VALUE macro as a helper to validate simple numerical GetInfo queries - Added new stringPropertyIsValid helper function to validate string queries - Add missing unsupported device enums to HIP adapter
1 parent 607dec9 commit 6b299d0

File tree

16 files changed

+3568
-882
lines changed

16 files changed

+3568
-882
lines changed

include/ur_api.h

Lines changed: 40 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1442,20 +1442,20 @@ UR_APIEXPORT ur_result_t UR_APICALL urPlatformGet(
14421442
///////////////////////////////////////////////////////////////////////////////
14431443
/// @brief Supported platform info
14441444
typedef enum ur_platform_info_t {
1445-
/// [char[]] The string denoting name of the platform. The size of the
1446-
/// info needs to be dynamically queried.
1447-
UR_PLATFORM_INFO_NAME = 1,
1448-
/// [char[]] The string denoting name of the vendor of the platform. The
1445+
/// [char[]] The null-terminated string denoting name of the platform. The
14491446
/// size of the info needs to be dynamically queried.
1447+
UR_PLATFORM_INFO_NAME = 1,
1448+
/// [char[]] The null-terminated string denoting name of the vendor of the
1449+
/// platform. The size of the info needs to be dynamically queried.
14501450
UR_PLATFORM_INFO_VENDOR_NAME = 2,
1451-
/// [char[]] The string denoting the version of the platform. The size of
1452-
/// the info needs to be dynamically queried.
1451+
/// [char[]] The null-terminated string denoting the version of the
1452+
/// platform. The size of the info needs to be dynamically queried.
14531453
UR_PLATFORM_INFO_VERSION = 3,
1454-
/// [char[]] The string denoting extensions supported by the platform. The
1455-
/// size of the info needs to be dynamically queried.
1454+
/// [char[]] The null-terminated string denoting extensions supported by
1455+
/// the platform. The size of the info needs to be dynamically queried.
14561456
UR_PLATFORM_INFO_EXTENSIONS = 4,
1457-
/// [char[]] The string denoting profile of the platform. The size of the
1458-
/// info needs to be dynamically queried.
1457+
/// [char[]] The null-terminated string denoting profile of the platform.
1458+
/// The size of the info needs to be dynamically queried.
14591459
UR_PLATFORM_INFO_PROFILE = 5,
14601460
/// [::ur_platform_backend_t] The backend of the platform. Identifies the
14611461
/// native backend adapter implementing this platform.
@@ -2037,7 +2037,8 @@ typedef enum ur_device_info_t {
20372037
UR_DEVICE_INFO_QUEUE_ON_DEVICE_PROPERTIES = 60,
20382038
/// [::ur_queue_flags_t] host queue property bit-field
20392039
UR_DEVICE_INFO_QUEUE_ON_HOST_PROPERTIES = 61,
2040-
/// [char[]] a semi-colon separated list of built-in kernels
2040+
/// [char[]] a null-terminated semi-colon separated list of built-in
2041+
/// kernels
20412042
UR_DEVICE_INFO_BUILT_IN_KERNELS = 62,
20422043
/// [::ur_platform_handle_t] the platform associated with the device
20432044
UR_DEVICE_INFO_PLATFORM = 63,
@@ -2046,21 +2047,22 @@ typedef enum ur_device_info_t {
20462047
/// It is unsuitable for general use in applications. This feature is
20472048
/// provided for identifying memory leaks.
20482049
UR_DEVICE_INFO_REFERENCE_COUNT = 64,
2049-
/// [char[]] IL version
2050+
/// [char[]] null-terminated IL version
20502051
UR_DEVICE_INFO_IL_VERSION = 65,
2051-
/// [char[]] Device name
2052+
/// [char[]] null-terminated device name
20522053
UR_DEVICE_INFO_NAME = 66,
2053-
/// [char[]] Device vendor
2054+
/// [char[]] null-terminated device vendor
20542055
UR_DEVICE_INFO_VENDOR = 67,
2055-
/// [char[]] Driver version
2056+
/// [char[]] null-terminated driver version
20562057
UR_DEVICE_INFO_DRIVER_VERSION = 68,
2057-
/// [char[]] Device profile
2058+
/// [char[]] null-terminated device profile
20582059
UR_DEVICE_INFO_PROFILE = 69,
2059-
/// [char[]] Device version
2060+
/// [char[]] null-terminated device version
20602061
UR_DEVICE_INFO_VERSION = 70,
2061-
/// [char[]] Version of backend runtime
2062+
/// [char[]] null-terminated version of backend runtime
20622063
UR_DEVICE_INFO_BACKEND_RUNTIME_VERSION = 71,
2063-
/// [char[]] Return a space separated list of extension names
2064+
/// [char[]] Return a null-terminated space separated list of extension
2065+
/// names
20642066
UR_DEVICE_INFO_EXTENSIONS = 72,
20652067
/// [size_t] Maximum size in bytes of internal printf buffer
20662068
UR_DEVICE_INFO_PRINTF_BUFFER_SIZE = 73,
@@ -2080,9 +2082,8 @@ typedef enum ur_device_info_t {
20802082
/// If the device does not support any affinity domains, then 0 will be
20812083
/// returned.
20822084
UR_DEVICE_INFO_PARTITION_AFFINITY_DOMAIN = 78,
2083-
/// [::ur_device_partition_property_t[]] return an array of
2084-
/// ::ur_device_partition_property_t for properties specified in
2085-
/// ::urDevicePartition
2085+
/// [::ur_device_partition_property_t[]] returns an array of properties
2086+
/// specified in ::urDevicePartition
20862087
UR_DEVICE_INFO_PARTITION_TYPE = 79,
20872088
/// [uint32_t] max number of sub groups
20882089
UR_DEVICE_INFO_MAX_NUM_SUB_GROUPS = 80,
@@ -2107,7 +2108,7 @@ typedef enum ur_device_info_t {
21072108
UR_DEVICE_INFO_USM_SYSTEM_SHARED_SUPPORT = 87,
21082109
/// [uint8_t[]][optional-query] return device UUID
21092110
UR_DEVICE_INFO_UUID = 88,
2110-
/// [char[]][optional-query] return device PCI address
2111+
/// [char[]][optional-query] return null-terminated device PCI address
21112112
UR_DEVICE_INFO_PCI_ADDRESS = 89,
21122113
/// [uint32_t][optional-query] return Intel GPU EU count
21132114
UR_DEVICE_INFO_GPU_EU_COUNT = 90,
@@ -2253,20 +2254,20 @@ typedef enum ur_device_info_t {
22532254
/// [::ur_bool_t] returns true if the device supports sampling cubemapped
22542255
/// images across face boundaries
22552256
UR_DEVICE_INFO_CUBEMAP_SEAMLESS_FILTERING_SUPPORT_EXP = 0x2011,
2256-
/// [::ur_bool_t] returns true if the device is capable of fetching USM
2257-
/// backed 1D sampled image data.
2257+
/// [::ur_bool_t] returns true if the device supports fetching USM backed
2258+
/// 1D sampled image data.
22582259
UR_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_1D_USM_EXP = 0x2012,
2259-
/// [::ur_bool_t] returns true if the device is capable of fetching
2260-
/// non-USM backed 1D sampled image data.
2260+
/// [::ur_bool_t] returns true if the device supports fetching non-USM
2261+
/// backed 1D sampled image data.
22612262
UR_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_1D_EXP = 0x2013,
2262-
/// [::ur_bool_t] returns true if the device is capable of fetching USM
2263-
/// backed 2D sampled image data.
2263+
/// [::ur_bool_t] returns true if the device supports fetching USM backed
2264+
/// 2D sampled image data.
22642265
UR_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_2D_USM_EXP = 0x2014,
2265-
/// [::ur_bool_t] returns true if the device is capable of fetching
2266-
/// non-USM backed 2D sampled image data.
2266+
/// [::ur_bool_t] returns true if the device supports fetching non-USM
2267+
/// backed 2D sampled image data.
22672268
UR_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_2D_EXP = 0x2015,
2268-
/// [::ur_bool_t] returns true if the device is capable of fetching
2269-
/// non-USM backed 3D sampled image data.
2269+
/// [::ur_bool_t] returns true if the device supports fetching non-USM
2270+
/// backed 3D sampled image data.
22702271
UR_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_3D_EXP = 0x2017,
22712272
/// [::ur_bool_t] returns true if the device supports timestamp recording
22722273
UR_DEVICE_INFO_TIMESTAMP_RECORDING_SUPPORT_EXP = 0x2018,
@@ -2276,11 +2277,11 @@ typedef enum ur_device_info_t {
22762277
/// [::ur_bool_t] returns true if the device supports unique addressing
22772278
/// per dimension.
22782279
UR_DEVICE_INFO_BINDLESS_UNIQUE_ADDRESSING_PER_DIM_EXP = 0x201A,
2279-
/// [::ur_bool_t] returns true if the device is capable of sampling USM
2280-
/// backed 1D sampled image data.
2280+
/// [::ur_bool_t] returns true if the device supports sampling USM backed
2281+
/// 1D sampled image data.
22812282
UR_DEVICE_INFO_BINDLESS_SAMPLE_1D_USM_EXP = 0x201B,
2282-
/// [::ur_bool_t] returns true if the device is capable of sampling USM
2283-
/// backed 2D sampled image data.
2283+
/// [::ur_bool_t] returns true if the device supports sampling USM backed
2284+
/// 2D sampled image data.
22842285
UR_DEVICE_INFO_BINDLESS_SAMPLE_2D_USM_EXP = 0x201C,
22852286
/// [::ur_bool_t] returns true if the device supports enqueueing of native
22862287
/// work
@@ -5572,12 +5573,12 @@ typedef enum ur_program_info_t {
55725573
UR_PROGRAM_INFO_DEVICES = 3,
55735574
/// [char[]] Return program IL if the program was created with
55745575
/// ::urProgramCreateWithIL, otherwise return size will be set to 0 and
5575-
/// nothing will be returned.
5576+
/// nothing will be returned. This is not null-terminated.
55765577
UR_PROGRAM_INFO_IL = 4,
55775578
/// [size_t[]] Return program binary sizes for each device.
55785579
UR_PROGRAM_INFO_BINARY_SIZES = 5,
55795580
/// [unsigned char[]] Return program binaries for all devices for this
5580-
/// Program.
5581+
/// Program. These are not null-terminated.
55815582
UR_PROGRAM_INFO_BINARIES = 6,
55825583
/// [size_t][optional-query] Number of kernels in Program, return type
55835584
/// size_t.

scripts/core/device.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ etors:
320320
- name: QUEUE_ON_HOST_PROPERTIES
321321
desc: "[$x_queue_flags_t] host queue property bit-field"
322322
- name: BUILT_IN_KERNELS
323-
desc: "[char[]] a semi-colon separated list of built-in kernels"
323+
desc: "[char[]] a null-terminated semi-colon separated list of built-in kernels"
324324
- name: PLATFORM
325325
desc: "[$x_platform_handle_t] the platform associated with the device"
326326
- name: REFERENCE_COUNT
@@ -329,21 +329,21 @@ etors:
329329
The reference count returned should be considered immediately stale.
330330
It is unsuitable for general use in applications. This feature is provided for identifying memory leaks.
331331
- name: IL_VERSION
332-
desc: "[char[]] IL version"
332+
desc: "[char[]] null-terminated IL version"
333333
- name: NAME
334-
desc: "[char[]] Device name"
334+
desc: "[char[]] null-terminated device name"
335335
- name: VENDOR
336-
desc: "[char[]] Device vendor"
336+
desc: "[char[]] null-terminated device vendor"
337337
- name: DRIVER_VERSION
338-
desc: "[char[]] Driver version"
338+
desc: "[char[]] null-terminated driver version"
339339
- name: PROFILE
340-
desc: "[char[]] Device profile"
340+
desc: "[char[]] null-terminated device profile"
341341
- name: VERSION
342-
desc: "[char[]] Device version"
342+
desc: "[char[]] null-terminated device version"
343343
- name: BACKEND_RUNTIME_VERSION
344-
desc: "[char[]] Version of backend runtime"
344+
desc: "[char[]] null-terminated version of backend runtime"
345345
- name: EXTENSIONS
346-
desc: "[char[]] Return a space separated list of extension names"
346+
desc: "[char[]] Return a null-terminated space separated list of extension names"
347347
- name: PRINTF_BUFFER_SIZE
348348
desc: "[size_t] Maximum size in bytes of internal printf buffer"
349349
- name: PREFERRED_INTEROP_USER_SYNC
@@ -359,7 +359,7 @@ etors:
359359
[$x_device_affinity_domain_flags_t] Returns a bit-field of the supported affinity domains for partitioning.
360360
If the device does not support any affinity domains, then 0 will be returned.
361361
- name: PARTITION_TYPE
362-
desc: "[$x_device_partition_property_t[]] return an array of $x_device_partition_property_t for properties specified in $xDevicePartition"
362+
desc: "[$x_device_partition_property_t[]] returns an array of properties specified in $xDevicePartition"
363363
- name: MAX_NUM_SUB_GROUPS
364364
desc: "[uint32_t] max number of sub groups"
365365
- name: SUB_GROUP_INDEPENDENT_FORWARD_PROGRESS
@@ -379,7 +379,7 @@ etors:
379379
- name: UUID
380380
desc: "[uint8_t[]][optional-query] return device UUID"
381381
- name: PCI_ADDRESS
382-
desc: "[char[]][optional-query] return device PCI address"
382+
desc: "[char[]][optional-query] return null-terminated device PCI address"
383383
- name: GPU_EU_COUNT
384384
desc: "[uint32_t][optional-query] return Intel GPU EU count"
385385
- name: GPU_EU_SIMD_WIDTH

scripts/core/exp-bindless-images.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -88,19 +88,19 @@ etors:
8888
desc: "[$x_bool_t] returns true if the device supports sampling cubemapped images across face boundaries"
8989
- name: BINDLESS_SAMPLED_IMAGE_FETCH_1D_USM_EXP
9090
value: "0x2012"
91-
desc: "[$x_bool_t] returns true if the device is capable of fetching USM backed 1D sampled image data."
91+
desc: "[$x_bool_t] returns true if the device supports fetching USM backed 1D sampled image data."
9292
- name: BINDLESS_SAMPLED_IMAGE_FETCH_1D_EXP
9393
value: "0x2013"
94-
desc: "[$x_bool_t] returns true if the device is capable of fetching non-USM backed 1D sampled image data."
94+
desc: "[$x_bool_t] returns true if the device supports fetching non-USM backed 1D sampled image data."
9595
- name: BINDLESS_SAMPLED_IMAGE_FETCH_2D_USM_EXP
9696
value: "0x2014"
97-
desc: "[$x_bool_t] returns true if the device is capable of fetching USM backed 2D sampled image data."
97+
desc: "[$x_bool_t] returns true if the device supports fetching USM backed 2D sampled image data."
9898
- name: BINDLESS_SAMPLED_IMAGE_FETCH_2D_EXP
9999
value: "0x2015"
100-
desc: "[$x_bool_t] returns true if the device is capable of fetching non-USM backed 2D sampled image data."
100+
desc: "[$x_bool_t] returns true if the device supports fetching non-USM backed 2D sampled image data."
101101
- name: BINDLESS_SAMPLED_IMAGE_FETCH_3D_EXP
102102
value: "0x2017"
103-
desc: "[$x_bool_t] returns true if the device is capable of fetching non-USM backed 3D sampled image data."
103+
desc: "[$x_bool_t] returns true if the device supports fetching non-USM backed 3D sampled image data."
104104
- name: IMAGE_ARRAY_SUPPORT_EXP
105105
value: "0x2019"
106106
desc: "[$x_bool_t] returns true if the device supports allocating and accessing image array resources."
@@ -109,10 +109,10 @@ etors:
109109
desc: "[$x_bool_t] returns true if the device supports unique addressing per dimension."
110110
- name: BINDLESS_SAMPLE_1D_USM_EXP
111111
value: "0x201B"
112-
desc: "[$x_bool_t] returns true if the device is capable of sampling USM backed 1D sampled image data."
112+
desc: "[$x_bool_t] returns true if the device supports sampling USM backed 1D sampled image data."
113113
- name: BINDLESS_SAMPLE_2D_USM_EXP
114114
value: "0x201C"
115-
desc: "[$x_bool_t] returns true if the device is capable of sampling USM backed 2D sampled image data."
115+
desc: "[$x_bool_t] returns true if the device supports sampling USM backed 2D sampled image data."
116116
--- #--------------------------------------------------------------------------
117117
type: enum
118118
extend: true

scripts/core/platform.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,20 +59,20 @@ typed_etors: True
5959
etors:
6060
- name: NAME
6161
value: "1"
62-
desc: "[char[]] The string denoting name of the platform. The size of the info needs to be dynamically queried."
62+
desc: "[char[]] The null-terminated string denoting name of the platform. The size of the info needs to be dynamically queried."
6363
- name: VENDOR_NAME
6464
value: "2"
65-
desc: "[char[]] The string denoting name of the vendor of the platform. The size of the info needs to be dynamically queried."
65+
desc: "[char[]] The null-terminated string denoting name of the vendor of the platform. The size of the info needs to be dynamically queried."
6666
- name: VERSION
6767
value: "3"
68-
desc: "[char[]] The string denoting the version of the platform. The size of the info needs to be dynamically queried."
68+
desc: "[char[]] The null-terminated string denoting the version of the platform. The size of the info needs to be dynamically queried."
6969
- name: EXTENSIONS
7070
value: "4"
71-
desc: "[char[]] The string denoting extensions supported by the platform. The size of the info needs to be dynamically queried."
71+
desc: "[char[]] The null-terminated string denoting extensions supported by the platform. The size of the info needs to be dynamically queried."
7272
todo: "document extensions names and their meaning"
7373
- name: PROFILE
7474
value: "5"
75-
desc: "[char[]] The string denoting profile of the platform. The size of the info needs to be dynamically queried."
75+
desc: "[char[]] The null-terminated string denoting profile of the platform. The size of the info needs to be dynamically queried."
7676
todo: "currently always return FULL_PROFILE, deprecate?"
7777
- name: BACKEND
7878
value: "6"

scripts/core/program.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -381,11 +381,11 @@ etors:
381381
[$x_device_handle_t[]] Return list of devices associated with a program.
382382
This is either the list of devices associated with the context or a subset of those devices when the program is created using $xProgramCreateWithBinary.
383383
- name: IL
384-
desc: "[char[]] Return program IL if the program was created with $xProgramCreateWithIL, otherwise return size will be set to 0 and nothing will be returned."
384+
desc: "[char[]] Return program IL if the program was created with $xProgramCreateWithIL, otherwise return size will be set to 0 and nothing will be returned. This is not null-terminated."
385385
- name: BINARY_SIZES
386386
desc: "[size_t[]] Return program binary sizes for each device."
387387
- name: BINARIES
388-
desc: "[unsigned char[]] Return program binaries for all devices for this Program."
388+
desc: "[unsigned char[]] Return program binaries for all devices for this Program. These are not null-terminated."
389389
- name: NUM_KERNELS
390390
desc: "[size_t][optional-query] Number of kernels in Program, return type size_t."
391391
- name: KERNEL_NAMES

source/adapters/cuda/device.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -862,21 +862,21 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo(ur_device_handle_t hDevice,
862862
UR_CHECK_ERROR(cuDeviceGetAttribute(
863863
&tex_max_linear_width,
864864
CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_WIDTH, hDevice->get()));
865-
return ReturnValue(tex_max_linear_width);
865+
return ReturnValue(static_cast<size_t>(tex_max_linear_width));
866866
}
867867
case UR_DEVICE_INFO_MAX_IMAGE_LINEAR_HEIGHT_EXP: {
868868
int32_t tex_max_linear_height = 0;
869869
UR_CHECK_ERROR(cuDeviceGetAttribute(
870870
&tex_max_linear_height,
871871
CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_HEIGHT, hDevice->get()));
872-
return ReturnValue(tex_max_linear_height);
872+
return ReturnValue(static_cast<size_t>(tex_max_linear_height));
873873
}
874874
case UR_DEVICE_INFO_MAX_IMAGE_LINEAR_PITCH_EXP: {
875875
int32_t tex_max_linear_pitch = 0;
876876
UR_CHECK_ERROR(cuDeviceGetAttribute(
877877
&tex_max_linear_pitch,
878878
CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_PITCH, hDevice->get()));
879-
return ReturnValue(tex_max_linear_pitch);
879+
return ReturnValue(static_cast<size_t>(tex_max_linear_pitch));
880880
}
881881
case UR_DEVICE_INFO_MIPMAP_SUPPORT_EXP: {
882882
// CUDA supports mipmaps.

source/adapters/hip/device.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,6 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo(ur_device_handle_t hDevice,
227227
}
228228
case UR_DEVICE_INFO_IMAGE_SUPPORTED: {
229229
bool Enabled = false;
230-
231230
if (std::getenv("UR_HIP_ENABLE_IMAGE_SUPPORT") != nullptr) {
232231
Enabled = true;
233232
} else {
@@ -823,17 +822,17 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo(ur_device_handle_t hDevice,
823822
}
824823
case UR_DEVICE_INFO_MAX_IMAGE_LINEAR_WIDTH_EXP: {
825824
// Default values due to non-existent hipamd queries for linear sizes.
826-
constexpr uint32_t MaxLinearWidth{1};
825+
constexpr size_t MaxLinearWidth{1};
827826
return ReturnValue(MaxLinearWidth);
828827
}
829828
case UR_DEVICE_INFO_MAX_IMAGE_LINEAR_HEIGHT_EXP: {
830829
// Default values due to non-existent hipamd queries for linear sizes.
831-
constexpr uint32_t MaxLinearHeight{1};
830+
constexpr size_t MaxLinearHeight{1};
832831
return ReturnValue(MaxLinearHeight);
833832
}
834833
case UR_DEVICE_INFO_MAX_IMAGE_LINEAR_PITCH_EXP: {
835834
// Default values due to non-existent hipamd queries for linear sizes.
836-
constexpr uint32_t MaxLinearPitch{1};
835+
constexpr size_t MaxLinearPitch{1};
837836
return ReturnValue(MaxLinearPitch);
838837
}
839838
case UR_DEVICE_INFO_MIPMAP_SUPPORT_EXP: {
@@ -1070,6 +1069,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo(ur_device_handle_t hDevice,
10701069
case UR_DEVICE_INFO_GPU_HW_THREADS_PER_EU:
10711070
case UR_DEVICE_INFO_MAX_MEMORY_BANDWIDTH:
10721071
case UR_DEVICE_INFO_IP_VERSION:
1072+
case UR_DEVICE_INFO_CLUSTER_LAUNCH_EXP:
10731073
return UR_RESULT_ERROR_UNSUPPORTED_ENUMERATION;
10741074
case UR_DEVICE_INFO_2D_BLOCK_ARRAY_CAPABILITIES_EXP:
10751075
return ReturnValue(

source/adapters/level_zero/device.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1105,7 +1105,7 @@ ur_result_t urDeviceGetInfo(
11051105
case UR_DEVICE_INFO_MAX_IMAGE_LINEAR_PITCH_EXP:
11061106
logger::error("Unsupported ParamName in urGetDeviceInfo");
11071107
logger::error("ParamName=%{}(0x{})", ParamName, logger::toHex(ParamName));
1108-
return UR_RESULT_ERROR_INVALID_VALUE;
1108+
return UR_RESULT_ERROR_UNSUPPORTED_ENUMERATION;
11091109
case UR_DEVICE_INFO_MIPMAP_SUPPORT_EXP: {
11101110
// L0 does not support mipmaps.
11111111
return ReturnValue(false);
@@ -1117,7 +1117,7 @@ ur_result_t urDeviceGetInfo(
11171117
case UR_DEVICE_INFO_MIPMAP_MAX_ANISOTROPY_EXP:
11181118
logger::error("Unsupported ParamName in urGetDeviceInfo");
11191119
logger::error("ParamName=%{}(0x{})", ParamName, logger::toHex(ParamName));
1120-
return UR_RESULT_ERROR_INVALID_VALUE;
1120+
return UR_RESULT_ERROR_UNSUPPORTED_ENUMERATION;
11211121
case UR_DEVICE_INFO_MIPMAP_LEVEL_REFERENCE_SUPPORT_EXP: {
11221122
// L0 does not support creation of images from individual mipmap levels.
11231123
return ReturnValue(false);

0 commit comments

Comments
 (0)