Skip to content

Commit 992ff37

Browse files
authored
Merge pull request #2648 from aarongreig/aaron/fixEasyCLKnownErrors
Fix the easily dealt with CL adapter KNOWN_FAILURES.
2 parents b959b36 + 8d64512 commit 992ff37

10 files changed

+67
-17
lines changed

test/conformance/device/urDeviceGetGlobalTimestamps.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ using urDeviceGetGlobalTimestampTest = uur::urDeviceTest;
3131
UUR_INSTANTIATE_DEVICE_TEST_SUITE_P(urDeviceGetGlobalTimestampTest);
3232

3333
TEST_P(urDeviceGetGlobalTimestampTest, Success) {
34+
// See https://github.com/oneapi-src/unified-runtime/issues/2633
3435
UUR_KNOWN_FAILURE_ON(uur::OpenCL{"Intel(R) FPGA"});
3536

3637
uint64_t device_time = 0;

test/conformance/kernel/urKernelGetGroupInfo.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,9 @@ TEST_P(urKernelGetGroupInfoFixedWorkGroupSizeTest,
4646

4747
struct urKernelGetGroupInfoMaxWorkGroupSizeTest : uur::urKernelTest {
4848
void SetUp() override {
49-
UUR_KNOWN_FAILURE_ON(uur::CUDA{}, uur::HIP{},
50-
uur::OpenCL{"12th Gen", "13th Gen", "Intel(R) Xeon"});
49+
UUR_KNOWN_FAILURE_ON(uur::CUDA{}, uur::HIP{});
50+
// see https://github.com/oneapi-src/unified-runtime/issues/2644
51+
UUR_KNOWN_FAILURE_ON(uur::OpenCL{"12th Gen", "13th Gen", "Intel(R) Xeon"});
5152
program_name = "max_wg_size";
5253
UUR_RETURN_ON_FATAL_FAILURE(urKernelTest::SetUp());
5354
}

test/conformance/kernel/urKernelGetSubGroupInfo.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
struct urKernelGetSubGroupInfoFixedSubGroupSizeTest : uur::urKernelTest {
1212
void SetUp() override {
13+
// See https://github.com/oneapi-src/unified-runtime/issues/2514
1314
UUR_KNOWN_FAILURE_ON(uur::CUDA{}, uur::HIP{}, uur::OpenCL{},
1415
uur::LevelZero{}, uur::LevelZeroV2{});
1516
program_name = "fixed_sg_size";

test/conformance/kernel/urKernelSetArgSampler.cpp

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@
1010
struct urKernelSetArgSamplerTestWithParam
1111
: uur::urBaseKernelTestWithParam<uur::SamplerCreateParamT> {
1212
void SetUp() {
13-
UUR_KNOWN_FAILURE_ON(uur::OpenCL{"Intel(R) FPGA"});
14-
1513
const auto param = getParam();
1614
const auto normalized = std::get<0>(param);
1715
const auto addr_mode = std::get<1>(param);
@@ -29,6 +27,12 @@ struct urKernelSetArgSamplerTestWithParam
2927
UUR_RETURN_ON_FATAL_FAILURE(
3028
uur::urBaseKernelTestWithParam<uur::SamplerCreateParamT>::SetUp());
3129

30+
bool image_support = false;
31+
ASSERT_SUCCESS(uur::GetDeviceImageSupport(device, image_support));
32+
if (!image_support) {
33+
GTEST_SKIP() << "Device doesn't support images";
34+
}
35+
3236
auto ret = urSamplerCreate(context, &sampler_desc, &sampler);
3337
if (ret == UR_RESULT_ERROR_UNSUPPORTED_FEATURE ||
3438
ret == UR_RESULT_ERROR_UNINITIALIZED) {
@@ -72,11 +76,15 @@ TEST_P(urKernelSetArgSamplerTestWithParam, Success) {
7276

7377
struct urKernelSetArgSamplerTest : uur::urBaseKernelTest {
7478
void SetUp() {
75-
UUR_KNOWN_FAILURE_ON(uur::OpenCL{"Intel(R) FPGA"});
76-
7779
program_name = "image_copy";
7880
UUR_RETURN_ON_FATAL_FAILURE(urBaseKernelTest::SetUp());
7981

82+
bool image_support = false;
83+
ASSERT_SUCCESS(uur::GetDeviceImageSupport(device, image_support));
84+
if (!image_support) {
85+
GTEST_SKIP() << "Device doesn't support images";
86+
}
87+
8088
ur_sampler_desc_t sampler_desc = {
8189
UR_STRUCTURE_TYPE_SAMPLER_DESC, /* sType */
8290
nullptr, /* pNext */

test/conformance/memory/urMemGetInfo.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ struct urMemGetInfoImageTest : uur::urMemImageTest {
116116
UUR_INSTANTIATE_DEVICE_TEST_SUITE_P(urMemGetInfoImageTest);
117117

118118
TEST_P(urMemGetInfoImageTest, SuccessSize) {
119-
UUR_KNOWN_FAILURE_ON(uur::LevelZero{}, uur::OpenCL{"UHD Graphics"});
119+
UUR_KNOWN_FAILURE_ON(uur::LevelZero{});
120120

121121
ur_mem_info_t property_name = UR_MEM_INFO_SIZE;
122122
size_t property_size = 0;
@@ -135,7 +135,9 @@ TEST_P(urMemGetInfoImageTest, SuccessSize) {
135135
image_desc.arraySize * image_desc.width *
136136
image_desc.height * image_desc.depth;
137137

138-
ASSERT_EQ(image_size_bytes, expected_image_size);
138+
// Make sure the driver has allocated enough space to hold the image (the
139+
// actual size may be padded out to above the requested size)
140+
ASSERT_GE(image_size_bytes, expected_image_size);
139141
}
140142

141143
TEST_P(urMemGetInfoImageTest, SuccessContext) {

test/conformance/memory/urMemImageCreate.cpp

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,23 @@ static ur_image_desc_t image_desc{
2626

2727
struct urMemImageCreateTest : public uur::urContextTest {
2828
void SetUp() override {
29-
UUR_KNOWN_FAILURE_ON(uur::OpenCL{"Intel(R) FPGA"});
3029
UUR_RETURN_ON_FATAL_FAILURE(uur::urContextTest::SetUp());
3130

31+
bool image_support = false;
32+
ASSERT_SUCCESS(uur::GetDeviceImageSupport(device, image_support));
33+
if (!image_support) {
34+
GTEST_SKIP() << "Device doesn't support images";
35+
}
36+
3237
uur::raii::Mem image_handle = nullptr;
3338
auto ret = urMemImageCreate(context, UR_MEM_FLAG_READ_WRITE, &image_format,
3439
&image_desc, nullptr, image_handle.ptr());
3540

3641
if (ret == UR_RESULT_ERROR_UNSUPPORTED_FEATURE) {
3742
GTEST_SKIP() << "urMemImageCreate not supported";
3843
}
44+
45+
ASSERT_SUCCESS(ret);
3946
}
4047

4148
void TearDown() override {
@@ -51,6 +58,12 @@ struct urMemImageCreateTestWithParam
5158
void SetUp() override {
5259
UUR_RETURN_ON_FATAL_FAILURE(uur::urContextTestWithParam<Param>::SetUp());
5360

61+
bool image_support = false;
62+
ASSERT_SUCCESS(uur::GetDeviceImageSupport(this->device, image_support));
63+
if (!image_support) {
64+
GTEST_SKIP() << "Device doesn't support images";
65+
}
66+
5467
uur::raii::Mem image_handle = nullptr;
5568
auto ret =
5669
urMemImageCreate(this->context, UR_MEM_FLAG_READ_WRITE, &image_format,
@@ -59,6 +72,8 @@ struct urMemImageCreateTestWithParam
5972
if (ret == UR_RESULT_ERROR_UNSUPPORTED_FEATURE) {
6073
GTEST_SKIP() << "urMemImageCreate not supported";
6174
}
75+
76+
ASSERT_SUCCESS(ret);
6277
}
6378

6479
void TearDown() override {

test/conformance/memory/urMemImageCreateWithImageFormatParam.cpp

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,13 @@ std::vector<ur_image_format_t> all_image_formats;
6767
struct urMemImageCreateTestWithImageFormatParam
6868
: uur::urContextTestWithParam<ur_image_format_t> {
6969
void SetUp() {
70-
UUR_KNOWN_FAILURE_ON(uur::OpenCL{"Intel(R) FPGA"});
7170
UUR_RETURN_ON_FATAL_FAILURE(
7271
uur::urContextTestWithParam<ur_image_format_t>::SetUp());
72+
bool image_support = false;
73+
ASSERT_SUCCESS(uur::GetDeviceImageSupport(device, image_support));
74+
if (!image_support) {
75+
GTEST_SKIP() << "Device doesn't support images";
76+
}
7377
}
7478
void TearDown() {
7579
UUR_RETURN_ON_FATAL_FAILURE(
@@ -93,8 +97,9 @@ UUR_DEVICE_TEST_SUITE_P(
9397
uur::deviceTestWithParamPrinter<ur_image_format_t>);
9498

9599
TEST_P(urMemImageCreateTestWithImageFormatParam, Success) {
96-
UUR_KNOWN_FAILURE_ON(uur::LevelZeroV2{}, uur::NativeCPU{},
97-
uur::OpenCL{"Intel(R) UHD Graphics 770"});
100+
UUR_KNOWN_FAILURE_ON(uur::LevelZeroV2{}, uur::NativeCPU{});
101+
// See https://github.com/oneapi-src/unified-runtime/issues/2638
102+
UUR_KNOWN_FAILURE_ON(uur::OpenCL{"Intel(R) UHD Graphics 770"});
98103

99104
ur_image_channel_order_t channel_order = std::get<1>(GetParam()).channelOrder;
100105
ur_image_channel_type_t channel_type = std::get<1>(GetParam()).channelType;

test/conformance/sampler/urSamplerCreate.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,15 @@
1111
struct urSamplerCreateTestWithParam
1212
: public uur::urContextTestWithParam<uur::SamplerCreateParamT> {
1313
void SetUp() override {
14-
UUR_KNOWN_FAILURE_ON(uur::OpenCL{"Intel(R) FPGA"});
15-
1614
UUR_RETURN_ON_FATAL_FAILURE(
1715
uur::urContextTestWithParam<uur::SamplerCreateParamT>::SetUp());
1816

17+
bool image_support = false;
18+
ASSERT_SUCCESS(uur::GetDeviceImageSupport(device, image_support));
19+
if (!image_support) {
20+
GTEST_SKIP() << "Device doesn't support images";
21+
}
22+
1923
ur_sampler_desc_t sampler_desc{
2024
UR_STRUCTURE_TYPE_SAMPLER_DESC, /* stype */
2125
nullptr, /* pNext */
@@ -30,6 +34,7 @@ struct urSamplerCreateTestWithParam
3034
ret == UR_RESULT_ERROR_UNINITIALIZED) {
3135
GTEST_SKIP() << "urSamplerCreate not supported";
3236
}
37+
ASSERT_SUCCESS(ret);
3338
}
3439

3540
void TearDown() override {

test/conformance/testing/include/uur/fixtures.h

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,8 +205,14 @@ struct urContextTest : urDeviceTest {
205205

206206
struct urSamplerTest : urContextTest {
207207
void SetUp() override {
208-
UUR_KNOWN_FAILURE_ON(uur::OpenCL{"Intel(R) FPGA"});
209208
UUR_RETURN_ON_FATAL_FAILURE(urContextTest::SetUp());
209+
210+
bool image_support = false;
211+
ASSERT_SUCCESS(uur::GetDeviceImageSupport(device, image_support));
212+
if (!image_support) {
213+
GTEST_SKIP() << "Device doesn't support images";
214+
}
215+
210216
sampler_desc = {
211217
UR_STRUCTURE_TYPE_SAMPLER_DESC, /* stype */
212218
nullptr, /* pNext */
@@ -330,8 +336,14 @@ template <class T> struct urContextTestWithParam : urDeviceTestWithParam<T> {
330336

331337
template <class T> struct urSamplerTestWithParam : urContextTestWithParam<T> {
332338
void SetUp() override {
333-
UUR_KNOWN_FAILURE_ON(uur::OpenCL{"Intel(R) FPGA"});
334339
UUR_RETURN_ON_FATAL_FAILURE(urContextTestWithParam<T>::SetUp());
340+
341+
bool image_support = false;
342+
ASSERT_SUCCESS(uur::GetDeviceImageSupport(this->device, image_support));
343+
if (!image_support) {
344+
GTEST_SKIP() << "Device doesn't support images";
345+
}
346+
335347
sampler_desc = {
336348
UR_STRUCTURE_TYPE_SAMPLER_DESC, /* stype */
337349
nullptr, /* pNext */

test/conformance/usm/urUSMGetMemAllocInfo.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ UUR_DEVICE_TEST_SUITE_P(urUSMGetMemAllocInfoPoolTest,
2525
uur::deviceTestWithParamPrinter<ur_usm_alloc_info_t>);
2626

2727
TEST_P(urUSMGetMemAllocInfoPoolTest, SuccessPool) {
28-
UUR_KNOWN_FAILURE_ON(uur::OpenCL{}, uur::LevelZeroV2{});
28+
UUR_KNOWN_FAILURE_ON(uur::LevelZeroV2{});
2929

3030
size_t property_size = 0;
3131
ur_usm_alloc_info_t property_name = UR_USM_ALLOC_INFO_POOL;

0 commit comments

Comments
 (0)