Skip to content

Commit 5882d68

Browse files
committed
Added DEVICE_INFO_PROGRAM_SET_SPECIALIZATION_CONSTANTS
THis is similar to the existing `DEVICE_INFO_KERNEL_SET_SPECIALIZATION_CONSTANTS` device info, only it applies to programs rather than kernels. All of the adapters should be updated to report it correctly, and tests have been added.
1 parent c5bf8fd commit 5882d68

File tree

14 files changed

+127
-25
lines changed

14 files changed

+127
-25
lines changed

include/ur_api.h

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1632,28 +1632,30 @@ typedef enum ur_device_info_t {
16321632
///< available for this device.
16331633
UR_DEVICE_INFO_KERNEL_SET_SPECIALIZATION_CONSTANTS = 106, ///< [::ur_bool_t] support the ::urKernelSetSpecializationConstants entry
16341634
///< point
1635-
UR_DEVICE_INFO_MEMORY_BUS_WIDTH = 107, ///< [uint32_t][optional-query] return the width in bits of the memory bus
1635+
UR_DEVICE_INFO_PROGRAM_SET_SPECIALIZATION_CONSTANTS = 107, ///< [::ur_bool_t] support the ::urProgramSetSpecializationConstants entry
1636+
///< point
1637+
UR_DEVICE_INFO_MEMORY_BUS_WIDTH = 108, ///< [uint32_t][optional-query] return the width in bits of the memory bus
16361638
///< interface of the device.
1637-
UR_DEVICE_INFO_MAX_WORK_GROUPS_3D = 108, ///< [size_t[3]] return max 3D work groups
1638-
UR_DEVICE_INFO_ASYNC_BARRIER = 109, ///< [::ur_bool_t] return true if Async Barrier is supported
1639-
UR_DEVICE_INFO_MEM_CHANNEL_SUPPORT = 110, ///< [::ur_bool_t] return true if specifying memory channels is supported
1640-
UR_DEVICE_INFO_HOST_PIPE_READ_WRITE_SUPPORTED = 111, ///< [::ur_bool_t] Return true if the device supports enqueueing commands
1639+
UR_DEVICE_INFO_MAX_WORK_GROUPS_3D = 109, ///< [size_t[3]] return max 3D work groups
1640+
UR_DEVICE_INFO_ASYNC_BARRIER = 110, ///< [::ur_bool_t] return true if Async Barrier is supported
1641+
UR_DEVICE_INFO_MEM_CHANNEL_SUPPORT = 111, ///< [::ur_bool_t] return true if specifying memory channels is supported
1642+
UR_DEVICE_INFO_HOST_PIPE_READ_WRITE_SUPPORTED = 112, ///< [::ur_bool_t] Return true if the device supports enqueueing commands
16411643
///< to read and write pipes from the host.
1642-
UR_DEVICE_INFO_MAX_REGISTERS_PER_WORK_GROUP = 112, ///< [uint32_t][optional-query] The maximum number of registers available
1644+
UR_DEVICE_INFO_MAX_REGISTERS_PER_WORK_GROUP = 113, ///< [uint32_t][optional-query] The maximum number of registers available
16431645
///< per block.
1644-
UR_DEVICE_INFO_IP_VERSION = 113, ///< [uint32_t][optional-query] The device IP version. The meaning of the
1646+
UR_DEVICE_INFO_IP_VERSION = 114, ///< [uint32_t][optional-query] The device IP version. The meaning of the
16451647
///< device IP version is implementation-defined, but newer devices should
16461648
///< have a higher version than older devices.
1647-
UR_DEVICE_INFO_VIRTUAL_MEMORY_SUPPORT = 114, ///< [::ur_bool_t] return true if the device supports virtual memory.
1648-
UR_DEVICE_INFO_ESIMD_SUPPORT = 115, ///< [::ur_bool_t] return true if the device supports ESIMD.
1649-
UR_DEVICE_INFO_COMPONENT_DEVICES = 116, ///< [::ur_device_handle_t[]][optional-query] The set of component devices
1649+
UR_DEVICE_INFO_VIRTUAL_MEMORY_SUPPORT = 115, ///< [::ur_bool_t] return true if the device supports virtual memory.
1650+
UR_DEVICE_INFO_ESIMD_SUPPORT = 116, ///< [::ur_bool_t] return true if the device supports ESIMD.
1651+
UR_DEVICE_INFO_COMPONENT_DEVICES = 117, ///< [::ur_device_handle_t[]][optional-query] The set of component devices
16501652
///< contained by this composite device.
1651-
UR_DEVICE_INFO_COMPOSITE_DEVICE = 117, ///< [::ur_device_handle_t][optional-query] The composite device containing
1653+
UR_DEVICE_INFO_COMPOSITE_DEVICE = 118, ///< [::ur_device_handle_t][optional-query] The composite device containing
16521654
///< this component device.
1653-
UR_DEVICE_INFO_GLOBAL_VARIABLE_SUPPORT = 118, ///< [::ur_bool_t] return true if the device supports the
1655+
UR_DEVICE_INFO_GLOBAL_VARIABLE_SUPPORT = 119, ///< [::ur_bool_t] return true if the device supports the
16541656
///< `EnqueueDeviceGlobalVariableWrite` and
16551657
///< `EnqueueDeviceGlobalVariableRead` entry points.
1656-
UR_DEVICE_INFO_USM_POOL_SUPPORT = 119, ///< [::ur_bool_t] return true if the device supports USM pooling. Pertains
1658+
UR_DEVICE_INFO_USM_POOL_SUPPORT = 120, ///< [::ur_bool_t] return true if the device supports USM pooling. Pertains
16571659
///< to the `USMPool` entry points and usage of the `pool` parameter of the
16581660
///< USM alloc entry points.
16591661
UR_DEVICE_INFO_COMMAND_BUFFER_SUPPORT_EXP = 0x1000, ///< [::ur_bool_t] Returns true if the device supports the use of
@@ -4726,6 +4728,10 @@ typedef struct ur_specialization_constant_info_t {
47264728
/// @brief Set an array of specialization constants on a Program.
47274729
///
47284730
/// @details
4731+
/// - This entry point is optional, the application should query for support
4732+
/// with device query
4733+
/// ::UR_DEVICE_INFO_PROGRAM_SET_SPECIALIZATION_CONSTANTS passed to
4734+
/// ::urDeviceGetInfo.
47294735
/// - The application may call this function from simultaneous threads for
47304736
/// the same device.
47314737
/// - The implementation of this function should be thread-safe.
@@ -4745,6 +4751,8 @@ typedef struct ur_specialization_constant_info_t {
47454751
/// + `NULL == pSpecConstants`
47464752
/// - ::UR_RESULT_ERROR_INVALID_SIZE
47474753
/// + `count == 0`
4754+
/// - ::UR_RESULT_ERROR_UNSUPPORTED_FEATURE
4755+
/// + If ::UR_DEVICE_INFO_PROGRAM_SET_SPECIALIZATION_CONSTANTS query is false
47484756
/// - ::UR_RESULT_ERROR_INVALID_VALUE
47494757
/// + A pSpecConstant entry contains a size that does not match that of the specialization constant in the module.
47504758
/// + A pSpecConstant entry contains a nullptr pValue.

include/ur_print.hpp

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2600,6 +2600,9 @@ inline std::ostream &operator<<(std::ostream &os, enum ur_device_info_t value) {
26002600
case UR_DEVICE_INFO_KERNEL_SET_SPECIALIZATION_CONSTANTS:
26012601
os << "UR_DEVICE_INFO_KERNEL_SET_SPECIALIZATION_CONSTANTS";
26022602
break;
2603+
case UR_DEVICE_INFO_PROGRAM_SET_SPECIALIZATION_CONSTANTS:
2604+
os << "UR_DEVICE_INFO_PROGRAM_SET_SPECIALIZATION_CONSTANTS";
2605+
break;
26032606
case UR_DEVICE_INFO_MEMORY_BUS_WIDTH:
26042607
os << "UR_DEVICE_INFO_MEMORY_BUS_WIDTH";
26052608
break;
@@ -3998,6 +4001,18 @@ inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_device_info
39984001

39994002
os << ")";
40004003
} break;
4004+
case UR_DEVICE_INFO_PROGRAM_SET_SPECIALIZATION_CONSTANTS: {
4005+
const ur_bool_t *tptr = (const ur_bool_t *)ptr;
4006+
if (sizeof(ur_bool_t) > size) {
4007+
os << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_bool_t) << ")";
4008+
return UR_RESULT_ERROR_INVALID_SIZE;
4009+
}
4010+
os << (const void *)(tptr) << " (";
4011+
4012+
os << *tptr;
4013+
4014+
os << ")";
4015+
} break;
40014016
case UR_DEVICE_INFO_MEMORY_BUS_WIDTH: {
40024017
const uint32_t *tptr = (const uint32_t *)ptr;
40034018
if (sizeof(uint32_t) > size) {

scripts/core/device.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -417,6 +417,8 @@ etors:
417417
available for this device.
418418
- name: KERNEL_SET_SPECIALIZATION_CONSTANTS
419419
desc: "[$x_bool_t] support the $xKernelSetSpecializationConstants entry point"
420+
- name: PROGRAM_SET_SPECIALIZATION_CONSTANTS
421+
desc: "[$x_bool_t] support the $xProgramSetSpecializationConstants entry point"
420422
- name: MEMORY_BUS_WIDTH
421423
desc: "[uint32_t][optional-query] return the width in bits of the memory bus interface of the device."
422424
- name: MAX_WORK_GROUPS_3D

scripts/core/program.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -528,6 +528,7 @@ desc: "Set an array of specialization constants on a Program."
528528
class: $xProgram
529529
name: SetSpecializationConstants
530530
details:
531+
- "This entry point is optional, the application should query for support with device query $X_DEVICE_INFO_PROGRAM_SET_SPECIALIZATION_CONSTANTS passed to $xDeviceGetInfo."
531532
- "The application may call this function from simultaneous threads for the same device."
532533
- "The implementation of this function should be thread-safe."
533534
- "`hProgram` must have been created with the $xProgramCreateWithIL entry point."
@@ -546,6 +547,8 @@ params:
546547
returns:
547548
- $X_RESULT_ERROR_INVALID_SIZE:
548549
- "`count == 0`"
550+
- $X_RESULT_ERROR_UNSUPPORTED_FEATURE:
551+
- "If $X_DEVICE_INFO_PROGRAM_SET_SPECIALIZATION_CONSTANTS query is false"
549552
- $X_RESULT_ERROR_INVALID_VALUE:
550553
- "A pSpecConstant entry contains a size that does not match that of the specialization constant in the module."
551554
- "A pSpecConstant entry contains a nullptr pValue."

source/adapters/cuda/device.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1065,6 +1065,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo(ur_device_handle_t hDevice,
10651065
return ReturnValue(AddressBuffer,
10661066
strnlen(AddressBuffer, AddressBufferSize - 1) + 1);
10671067
}
1068+
case UR_DEVICE_INFO_PROGRAM_SET_SPECIALIZATION_CONSTANTS:
10681069
case UR_DEVICE_INFO_KERNEL_SET_SPECIALIZATION_CONSTANTS:
10691070
return ReturnValue(static_cast<ur_bool_t>(false));
10701071
// TODO: Investigate if this information is available on CUDA.

source/adapters/hip/device.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -789,6 +789,10 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo(ur_device_handle_t hDevice,
789789
return ReturnValue(ur_bool_t{false});
790790
}
791791

792+
case UR_DEVICE_INFO_PROGRAM_SET_SPECIALIZATION_CONSTANTS: {
793+
return ReturnValue(ur_bool_t{false});
794+
}
795+
792796
case UR_DEVICE_INFO_ATOMIC_MEMORY_ORDER_CAPABILITIES: {
793797
ur_memory_order_capability_flags_t Capabilities =
794798
UR_MEMORY_ORDER_CAPABILITY_FLAG_RELAXED |

source/adapters/level_zero/device.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1154,6 +1154,8 @@ ur_result_t urDeviceGetInfo(
11541154
// L0 does not support sampling 1D USM sampled image data.
11551155
return ReturnValue(false);
11561156
}
1157+
case UR_DEVICE_INFO_PROGRAM_SET_SPECIALIZATION_CONSTANTS:
1158+
return ReturnValue(true);
11571159
case UR_DEVICE_INFO_KERNEL_SET_SPECIALIZATION_CONSTANTS:
11581160
return ReturnValue(false);
11591161
case UR_DEVICE_INFO_GLOBAL_VARIABLE_SUPPORT:

source/adapters/native_cpu/device.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -428,6 +428,11 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo(ur_device_handle_t hDevice,
428428

429429
case UR_DEVICE_INFO_LOW_POWER_EVENTS_EXP:
430430
return ReturnValue(false);
431+
432+
case UR_DEVICE_INFO_KERNEL_SET_SPECIALIZATION_CONSTANTS:
433+
case UR_DEVICE_INFO_PROGRAM_SET_SPECIALIZATION_CONSTANTS:
434+
return ReturnValue(false);
435+
431436
default:
432437
DIE_NO_IMPLEMENTATION;
433438
}

source/adapters/opencl/device.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
//===-----------------------------------------------------------------===//
88

99
#include "device.hpp"
10+
#include "adapter.hpp"
1011
#include "common.hpp"
1112
#include "platform.hpp"
1213

@@ -1125,6 +1126,11 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo(ur_device_handle_t hDevice,
11251126
return ReturnValue(UUID);
11261127
}
11271128

1129+
case UR_DEVICE_INFO_PROGRAM_SET_SPECIALIZATION_CONSTANTS: {
1130+
return ReturnValue(
1131+
ur::cl::getAdapter()->clSetProgramSpecializationConstant != nullptr);
1132+
}
1133+
11281134
// We can't query to check if these are supported, they will need to be
11291135
// manually updated if support is ever implemented.
11301136
case UR_DEVICE_INFO_KERNEL_SET_SPECIALIZATION_CONSTANTS:

source/loader/ur_libapi.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3531,6 +3531,10 @@ ur_result_t UR_APICALL urProgramGetBuildInfo(
35313531
/// @brief Set an array of specialization constants on a Program.
35323532
///
35333533
/// @details
3534+
/// - This entry point is optional, the application should query for support
3535+
/// with device query
3536+
/// ::UR_DEVICE_INFO_PROGRAM_SET_SPECIALIZATION_CONSTANTS passed to
3537+
/// ::urDeviceGetInfo.
35343538
/// - The application may call this function from simultaneous threads for
35353539
/// the same device.
35363540
/// - The implementation of this function should be thread-safe.
@@ -3550,6 +3554,8 @@ ur_result_t UR_APICALL urProgramGetBuildInfo(
35503554
/// + `NULL == pSpecConstants`
35513555
/// - ::UR_RESULT_ERROR_INVALID_SIZE
35523556
/// + `count == 0`
3557+
/// - ::UR_RESULT_ERROR_UNSUPPORTED_FEATURE
3558+
/// + If ::UR_DEVICE_INFO_PROGRAM_SET_SPECIALIZATION_CONSTANTS query is false
35533559
/// - ::UR_RESULT_ERROR_INVALID_VALUE
35543560
/// + A pSpecConstant entry contains a size that does not match that of the specialization constant in the module.
35553561
/// + A pSpecConstant entry contains a nullptr pValue.

source/ur_api.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3019,6 +3019,10 @@ ur_result_t UR_APICALL urProgramGetBuildInfo(
30193019
/// @brief Set an array of specialization constants on a Program.
30203020
///
30213021
/// @details
3022+
/// - This entry point is optional, the application should query for support
3023+
/// with device query
3024+
/// ::UR_DEVICE_INFO_PROGRAM_SET_SPECIALIZATION_CONSTANTS passed to
3025+
/// ::urDeviceGetInfo.
30223026
/// - The application may call this function from simultaneous threads for
30233027
/// the same device.
30243028
/// - The implementation of this function should be thread-safe.
@@ -3038,6 +3042,8 @@ ur_result_t UR_APICALL urProgramGetBuildInfo(
30383042
/// + `NULL == pSpecConstants`
30393043
/// - ::UR_RESULT_ERROR_INVALID_SIZE
30403044
/// + `count == 0`
3045+
/// - ::UR_RESULT_ERROR_UNSUPPORTED_FEATURE
3046+
/// + If ::UR_DEVICE_INFO_PROGRAM_SET_SPECIALIZATION_CONSTANTS query is false
30413047
/// - ::UR_RESULT_ERROR_INVALID_VALUE
30423048
/// + A pSpecConstant entry contains a size that does not match that of the specialization constant in the module.
30433049
/// + A pSpecConstant entry contains a nullptr pValue.

test/conformance/device/urDeviceGetInfo.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ static std::unordered_map<ur_device_info_t, size_t> device_info_size_map = {
109109
{UR_DEVICE_INFO_BFLOAT16, sizeof(ur_bool_t)},
110110
{UR_DEVICE_INFO_MAX_COMPUTE_QUEUE_INDICES, sizeof(uint32_t)},
111111
{UR_DEVICE_INFO_KERNEL_SET_SPECIALIZATION_CONSTANTS, sizeof(ur_bool_t)},
112+
{UR_DEVICE_INFO_PROGRAM_SET_SPECIALIZATION_CONSTANTS, sizeof(ur_bool_t)},
112113
{UR_DEVICE_INFO_MEMORY_BUS_WIDTH, sizeof(uint32_t)},
113114
{UR_DEVICE_INFO_MAX_WORK_GROUPS_3D, sizeof(size_t[3])},
114115
{UR_DEVICE_INFO_ASYNC_BARRIER, sizeof(ur_bool_t)},

test/conformance/program/urProgramSetSpecializationConstants.cpp

Lines changed: 52 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,16 @@ struct urProgramSetSpecializationConstantsTest : uur::urKernelExecutionTest {
1010
void SetUp() override {
1111
program_name = "spec_constant";
1212
UUR_RETURN_ON_FATAL_FAILURE(urProgramTest::SetUp());
13+
14+
bool supports_kernel_spec_constant = false;
15+
ASSERT_SUCCESS(urDeviceGetInfo(
16+
device, UR_DEVICE_INFO_PROGRAM_SET_SPECIALIZATION_CONSTANTS,
17+
sizeof(supports_kernel_spec_constant),
18+
&supports_kernel_spec_constant, nullptr));
19+
if (!supports_kernel_spec_constant) {
20+
GTEST_SKIP()
21+
<< "Device does not support setting program spec constants.";
22+
}
1323
}
1424

1525
uint32_t spec_value = 42;
@@ -19,20 +29,53 @@ struct urProgramSetSpecializationConstantsTest : uur::urKernelExecutionTest {
1929
};
2030
UUR_INSTANTIATE_DEVICE_TEST_SUITE_P(urProgramSetSpecializationConstantsTest);
2131

32+
struct urProgramSetSpecializationConstantsNegativeTest
33+
: uur::urKernelExecutionTest {
34+
void SetUp() override {
35+
program_name = "spec_constant";
36+
UUR_RETURN_ON_FATAL_FAILURE(urProgramTest::SetUp());
37+
38+
bool supports_kernel_spec_constant = false;
39+
ASSERT_SUCCESS(urDeviceGetInfo(
40+
device, UR_DEVICE_INFO_PROGRAM_SET_SPECIALIZATION_CONSTANTS,
41+
sizeof(supports_kernel_spec_constant),
42+
&supports_kernel_spec_constant, nullptr));
43+
if (supports_kernel_spec_constant) {
44+
GTEST_SKIP()
45+
<< "Device does supports setting program spec constants.";
46+
}
47+
}
48+
49+
uint32_t spec_value = 42;
50+
uint32_t default_spec_value = 1000; // Must match the one in the SYCL source
51+
ur_specialization_constant_info_t info = {0, sizeof(spec_value),
52+
&spec_value};
53+
};
54+
UUR_INSTANTIATE_DEVICE_TEST_SUITE_P(
55+
urProgramSetSpecializationConstantsNegativeTest);
56+
2257
struct urProgramSetMultipleSpecializationConstantsTest
2358
: uur::urKernelExecutionTest {
2459
// The types of spec constants in this program are {uint32_t, uint64_t, bool}
2560
void SetUp() override {
2661
program_name = "spec_constant_multiple";
2762
UUR_RETURN_ON_FATAL_FAILURE(urProgramTest::SetUp());
63+
64+
bool supports_kernel_spec_constant = false;
65+
ASSERT_SUCCESS(urDeviceGetInfo(
66+
device, UR_DEVICE_INFO_PROGRAM_SET_SPECIALIZATION_CONSTANTS,
67+
sizeof(supports_kernel_spec_constant),
68+
&supports_kernel_spec_constant, nullptr));
69+
if (!supports_kernel_spec_constant) {
70+
GTEST_SKIP()
71+
<< "Device does not support setting program spec constants.";
72+
}
2873
}
2974
};
3075
UUR_INSTANTIATE_DEVICE_TEST_SUITE_P(
3176
urProgramSetMultipleSpecializationConstantsTest);
3277

3378
TEST_P(urProgramSetSpecializationConstantsTest, Success) {
34-
UUR_KNOWN_FAILURE_ON(uur::CUDA{}, uur::HIP{});
35-
3679
ASSERT_SUCCESS(urProgramSetSpecializationConstants(program, 1, &info));
3780
ASSERT_SUCCESS(urProgramBuild(context, program, nullptr));
3881
auto entry_points =
@@ -46,9 +89,12 @@ TEST_P(urProgramSetSpecializationConstantsTest, Success) {
4689
ValidateBuffer<uint32_t>(buffer, sizeof(spec_value), spec_value);
4790
}
4891

49-
TEST_P(urProgramSetSpecializationConstantsTest, UseDefaultValue) {
50-
UUR_KNOWN_FAILURE_ON(uur::CUDA{}, uur::HIP{});
92+
TEST_P(urProgramSetSpecializationConstantsNegativeTest, Unsupported) {
93+
ASSERT_EQ_RESULT(UR_RESULT_ERROR_UNSUPPORTED_FEATURE,
94+
urProgramSetSpecializationConstants(program, 1, &info));
95+
}
5196

97+
TEST_P(urProgramSetSpecializationConstantsTest, UseDefaultValue) {
5298
ur_platform_backend_t backend;
5399
ASSERT_SUCCESS(urPlatformGetInfo(platform, UR_PLATFORM_INFO_BACKEND,
54100
sizeof(ur_platform_backend_t), &backend,
@@ -72,8 +118,6 @@ TEST_P(urProgramSetSpecializationConstantsTest, UseDefaultValue) {
72118
}
73119

74120
TEST_P(urProgramSetMultipleSpecializationConstantsTest, MultipleCalls) {
75-
UUR_KNOWN_FAILURE_ON(uur::CUDA{}, uur::HIP{});
76-
77121
uint32_t a = 100;
78122
uint64_t b = 200;
79123
bool c = false;
@@ -105,8 +149,6 @@ TEST_P(urProgramSetMultipleSpecializationConstantsTest, MultipleCalls) {
105149
}
106150

107151
TEST_P(urProgramSetMultipleSpecializationConstantsTest, SingleCall) {
108-
UUR_KNOWN_FAILURE_ON(uur::CUDA{}, uur::HIP{});
109-
110152
uint32_t a = 200;
111153
uint64_t b = 300;
112154
bool c = true;
@@ -162,8 +204,7 @@ TEST_P(urProgramSetSpecializationConstantsTest, InvalidValueSize) {
162204
}
163205

164206
TEST_P(urProgramSetSpecializationConstantsTest, InvalidValueId) {
165-
UUR_KNOWN_FAILURE_ON(uur::CUDA{}, uur::HIP{}, uur::LevelZero{},
166-
uur::LevelZeroV2{});
207+
UUR_KNOWN_FAILURE_ON(uur::LevelZero{}, uur::LevelZeroV2{});
167208

168209
ur_specialization_constant_info_t bad_info = {999, sizeof(spec_value),
169210
&spec_value};
@@ -173,8 +214,7 @@ TEST_P(urProgramSetSpecializationConstantsTest, InvalidValueId) {
173214
}
174215

175216
TEST_P(urProgramSetSpecializationConstantsTest, InvalidValuePtr) {
176-
UUR_KNOWN_FAILURE_ON(uur::CUDA{}, uur::HIP{}, uur::LevelZero{},
177-
uur::LevelZeroV2{});
217+
UUR_KNOWN_FAILURE_ON(uur::LevelZero{}, uur::LevelZeroV2{});
178218

179219
ur_specialization_constant_info_t bad_info = {0, sizeof(spec_value),
180220
nullptr};

tools/urinfo/urinfo.hpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,9 @@ inline void printDeviceInfos(ur_device_handle_t hDevice,
307307
printDeviceInfo<ur_bool_t>(
308308
hDevice, UR_DEVICE_INFO_KERNEL_SET_SPECIALIZATION_CONSTANTS);
309309
std::cout << prefix;
310+
printDeviceInfo<ur_bool_t>(
311+
hDevice, UR_DEVICE_INFO_PROGRAM_SET_SPECIALIZATION_CONSTANTS);
312+
std::cout << prefix;
310313
printDeviceInfo<uint32_t>(hDevice, UR_DEVICE_INFO_MEMORY_BUS_WIDTH);
311314
std::cout << prefix;
312315
printDeviceInfo<size_t[3]>(hDevice, UR_DEVICE_INFO_MAX_WORK_GROUPS_3D);

0 commit comments

Comments
 (0)