Skip to content

Commit 35a49b6

Browse files
authored
[UR][Graph] command-buffer unsupported OpenCL CTS tests (#18183)
There are currently limitations on what commands can be added to a SYCL-Graph that we document in the [design doc](https://github.com/intel/llvm/blob/sycl/sycl/doc/design/CommandGraph.md#opencl) and mark as unsupported in Graph E2E tests. However, we never marked the equivalent UR command-buffer commands as unsupported in the CTS, so they will currently fail when testing against an OpenCL backend with support for the extension. Address this by marking CTS tests which use these commands as unsupported. Note that this will conflict with #18177 in that some CTS tests can be re-enabled, but I can resolve that based on whatever merges first.
1 parent 473fa48 commit 35a49b6

File tree

2 files changed

+37
-0
lines changed

2 files changed

+37
-0
lines changed

unified-runtime/test/conformance/exp_command_buffer/commands.cpp

+28
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,18 @@ struct urCommandBufferCommandsTest
5656
UUR_INSTANTIATE_DEVICE_TEST_SUITE(urCommandBufferCommandsTest);
5757

5858
TEST_P(urCommandBufferCommandsTest, urCommandBufferAppendUSMMemcpyExp) {
59+
// No USM memcpy command in cl_khr_command_buffer
60+
UUR_KNOWN_FAILURE_ON(uur::OpenCL{});
61+
5962
ASSERT_SUCCESS(urCommandBufferAppendUSMMemcpyExp(
6063
cmd_buf_handle, device_ptrs[0], device_ptrs[1], allocation_size, 0,
6164
nullptr, 0, nullptr, nullptr, nullptr, nullptr));
6265
}
6366

6467
TEST_P(urCommandBufferCommandsTest, urCommandBufferAppendUSMFillExp) {
68+
// No USM fill command in cl_khr_command_buffer
69+
UUR_KNOWN_FAILURE_ON(uur::OpenCL{});
70+
6571
uint32_t pattern = 42;
6672
ASSERT_SUCCESS(urCommandBufferAppendUSMFillExp(
6773
cmd_buf_handle, device_ptrs[0], &pattern, sizeof(pattern),
@@ -83,13 +89,21 @@ TEST_P(urCommandBufferCommandsTest, urCommandBufferAppendMemBufferCopyRectExp) {
8389
}
8490

8591
TEST_P(urCommandBufferCommandsTest, urCommandBufferAppendMemBufferReadExp) {
92+
// No buffer read command in cl_khr_command_buffer
93+
// See https://github.com/KhronosGroup/OpenCL-Docs/issues/1281
94+
UUR_KNOWN_FAILURE_ON(uur::OpenCL{});
95+
8696
std::array<uint32_t, elements> host_data{};
8797
ASSERT_SUCCESS(urCommandBufferAppendMemBufferReadExp(
8898
cmd_buf_handle, buffers[0], 0, allocation_size, host_data.data(), 0,
8999
nullptr, 0, nullptr, nullptr, nullptr, nullptr));
90100
}
91101

92102
TEST_P(urCommandBufferCommandsTest, urCommandBufferAppendMemBufferReadRectExp) {
103+
// No buffer read command in cl_khr_command_buffer
104+
// See https://github.com/KhronosGroup/OpenCL-Docs/issues/1281
105+
UUR_KNOWN_FAILURE_ON(uur::OpenCL{});
106+
93107
std::array<uint32_t, elements> host_data{};
94108
ur_rect_offset_t origin{0, 0, 0};
95109
ur_rect_region_t region{4, 4, 1};
@@ -99,6 +113,10 @@ TEST_P(urCommandBufferCommandsTest, urCommandBufferAppendMemBufferReadRectExp) {
99113
}
100114

101115
TEST_P(urCommandBufferCommandsTest, urCommandBufferAppendMemBufferWriteExp) {
116+
// No buffer write command in cl_khr_command_buffer
117+
// See https://github.com/KhronosGroup/OpenCL-Docs/issues/1281
118+
UUR_KNOWN_FAILURE_ON(uur::OpenCL{});
119+
102120
std::array<uint32_t, elements> host_data{};
103121
ASSERT_SUCCESS(urCommandBufferAppendMemBufferWriteExp(
104122
cmd_buf_handle, buffers[0], 0, allocation_size, host_data.data(), 0,
@@ -107,6 +125,10 @@ TEST_P(urCommandBufferCommandsTest, urCommandBufferAppendMemBufferWriteExp) {
107125

108126
TEST_P(urCommandBufferCommandsTest,
109127
urCommandBufferAppendMemBufferWriteRectExp) {
128+
// No buffer write command in cl_khr_command_buffer
129+
// See https://github.com/KhronosGroup/OpenCL-Docs/issues/1281
130+
UUR_KNOWN_FAILURE_ON(uur::OpenCL{});
131+
110132
std::array<uint32_t, elements> host_data{};
111133
ur_rect_offset_t origin{0, 0, 0};
112134
ur_rect_region_t region{4, 4, 1};
@@ -123,12 +145,18 @@ TEST_P(urCommandBufferCommandsTest, urCommandBufferAppendMemBufferFillExp) {
123145
}
124146

125147
TEST_P(urCommandBufferCommandsTest, urCommandBufferAppendUSMPrefetchExp) {
148+
// No Prefetch command in cl_khr_command_buffer
149+
UUR_KNOWN_FAILURE_ON(uur::OpenCL{});
150+
126151
ASSERT_SUCCESS(urCommandBufferAppendUSMPrefetchExp(
127152
cmd_buf_handle, device_ptrs[0], allocation_size, 0, 0, nullptr, 0,
128153
nullptr, nullptr, nullptr, nullptr));
129154
}
130155

131156
TEST_P(urCommandBufferCommandsTest, urCommandBufferAppendUSMAdviseExp) {
157+
// No advise command in cl_khr_command_buffer
158+
UUR_KNOWN_FAILURE_ON(uur::OpenCL{});
159+
132160
ASSERT_SUCCESS(urCommandBufferAppendUSMAdviseExp(
133161
cmd_buf_handle, device_ptrs[0], allocation_size, 0, 0, nullptr, 0,
134162
nullptr, nullptr, nullptr, nullptr));

unified-runtime/test/conformance/exp_command_buffer/fill.cpp

+9
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,9 @@ UUR_DEVICE_TEST_SUITE_WITH_PARAM(
109109
printFillTestString<urCommandBufferFillCommandsTest>);
110110

111111
TEST_P(urCommandBufferFillCommandsTest, Buffer) {
112+
// No buffer read command in cl_khr_command_buffer
113+
UUR_KNOWN_FAILURE_ON(uur::OpenCL{});
114+
112115
ASSERT_SUCCESS(urCommandBufferAppendMemBufferFillExp(
113116
cmd_buf_handle, buffer, pattern.data(), pattern_size, 0, size, 0, nullptr,
114117
0, nullptr, &sync_point, nullptr, nullptr));
@@ -128,6 +131,9 @@ TEST_P(urCommandBufferFillCommandsTest, Buffer) {
128131
}
129132

130133
TEST_P(urCommandBufferFillCommandsTest, ExecuteTwice) {
134+
// No buffer read command in cl_khr_command_buffer
135+
UUR_KNOWN_FAILURE_ON(uur::OpenCL{});
136+
131137
ASSERT_SUCCESS(urCommandBufferAppendMemBufferFillExp(
132138
cmd_buf_handle, buffer, pattern.data(), pattern_size, 0, size, 0, nullptr,
133139
0, nullptr, &sync_point, nullptr, nullptr));
@@ -149,6 +155,9 @@ TEST_P(urCommandBufferFillCommandsTest, ExecuteTwice) {
149155
}
150156

151157
TEST_P(urCommandBufferFillCommandsTest, USM) {
158+
// No USM fill command in cl_khr_command_buffer
159+
UUR_KNOWN_FAILURE_ON(uur::OpenCL{});
160+
152161
ASSERT_SUCCESS(urCommandBufferAppendUSMFillExp(
153162
cmd_buf_handle, device_ptr, pattern.data(), pattern_size, size, 0,
154163
nullptr, 0, nullptr, &sync_point, nullptr, nullptr));

0 commit comments

Comments
 (0)