Skip to content

Commit a7c04c0

Browse files
committed
Merge branch 'aaron/miscCLCtsFixes' into aaron/specMotivatedRefactors
2 parents 788226e + d589c5d commit a7c04c0

File tree

7 files changed

+28
-45
lines changed

7 files changed

+28
-45
lines changed

source/adapters/opencl/common.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,8 @@ ur_result_t mapCLErrorToUR(cl_int Result) {
8181
return UR_RESULT_ERROR_INVALID_COMMAND_BUFFER_EXP;
8282
case CL_INVALID_SYNC_POINT_WAIT_LIST_KHR:
8383
return UR_RESULT_ERROR_INVALID_COMMAND_BUFFER_SYNC_POINT_WAIT_LIST_EXP;
84+
case CL_INVALID_ARG_SIZE:
85+
return UR_RESULT_ERROR_INVALID_KERNEL_ARGUMENT_SIZE;
8486
default:
8587
return UR_RESULT_ERROR_UNKNOWN;
8688
}

source/adapters/opencl/device.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -506,7 +506,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo(ur_device_handle_t hDevice,
506506
cl_adapter::cast<cl_device_id>(hDevice), {"cl_khr_fp16"}, Supported));
507507

508508
if (!Supported) {
509-
return UR_RESULT_ERROR_INVALID_ENUMERATION;
509+
return UR_RESULT_ERROR_UNSUPPORTED_ENUMERATION;
510510
}
511511
}
512512

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +0,0 @@
1-
urDeviceGetInfoTest.Success/UR_DEVICE_INFO_HALF_FP_CONFIG
Lines changed: 1 addition & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,2 @@
1-
{{OPT}}urEnqueueDeviceGetGlobalVariableReadTest.Success/Intel_R__OpenCL___{{.*}}
2-
{{OPT}}urEnqueueMemBufferCopyRectTest.InvalidSize/Intel_R__OpenCL___{{.*}}
3-
{{OPT}}urEnqueueMemBufferReadRectTest.InvalidSize/Intel_R__OpenCL___{{.*}}
4-
{{OPT}}urEnqueueMemBufferWriteRectTest.InvalidSize/Intel_R__OpenCL___{{.*}}
5-
{{OPT}}urEnqueueUSMFill2DTestWithParam.Success/Intel_R__OpenCL___{{.*}}
6-
{{OPT}}urEnqueueUSMFill2DTestWithParam.Success/Intel_R__OpenCL___{{.*}}
7-
{{OPT}}urEnqueueUSMFill2DTestWithParam.Success/Intel_R__OpenCL___{{.*}}
8-
{{OPT}}urEnqueueUSMFill2DTestWithParam.Success/Intel_R__OpenCL___{{.*}}
9-
{{OPT}}urEnqueueUSMFill2DTestWithParam.Success/Intel_R__OpenCL___{{.*}}
10-
{{OPT}}urEnqueueUSMFill2DTestWithParam.Success/Intel_R__OpenCL___{{.*}}
11-
{{OPT}}urEnqueueUSMFill2DTestWithParam.Success/Intel_R__OpenCL___{{.*}}
12-
{{OPT}}urEnqueueUSMFill2DTestWithParam.Success/Intel_R__OpenCL___{{.*}}
13-
{{OPT}}urEnqueueUSMFill2DTestWithParam.Success/Intel_R__OpenCL___{{.*}}
14-
{{OPT}}urEnqueueUSMFill2DTestWithParam.Success/Intel_R__OpenCL___{{.*}}
15-
{{OPT}}urEnqueueUSMFill2DTestWithParam.Success/Intel_R__OpenCL___{{.*}}
16-
{{OPT}}urEnqueueUSMFill2DTestWithParam.Success/Intel_R__OpenCL___{{.*}}
17-
{{OPT}}urEnqueueUSMFill2DNegativeTest.OutOfBounds/Intel_R__OpenCL___{{.*}}
18-
{{OPT}}urEnqueueUSMAdviseTest.InvalidSizeTooLarge/Intel_R__OpenCL___{{.*}}
19-
{{OPT}}urEnqueueUSMMemcpy2DTestWithParam.SuccessBlocking/Intel_R__OpenCL___{{.*}}
20-
{{OPT}}urEnqueueUSMMemcpy2DTestWithParam.SuccessBlocking/Intel_R__OpenCL___{{.*}}
21-
{{OPT}}urEnqueueUSMMemcpy2DTestWithParam.SuccessBlocking/Intel_R__OpenCL___{{.*}}
22-
{{OPT}}urEnqueueUSMMemcpy2DTestWithParam.SuccessBlocking/Intel_R__OpenCL___{{.*}}
23-
{{OPT}}urEnqueueUSMMemcpy2DTestWithParam.SuccessBlocking/Intel_R__OpenCL___{{.*}}
24-
{{OPT}}urEnqueueUSMMemcpy2DTestWithParam.SuccessBlocking/Intel_R__OpenCL___{{.*}}
25-
{{OPT}}urEnqueueUSMMemcpy2DTestWithParam.SuccessNonBlocking/Intel_R__OpenCL___{{.*}}
26-
{{OPT}}urEnqueueUSMMemcpy2DTestWithParam.SuccessNonBlocking/Intel_R__OpenCL___{{.*}}
27-
{{OPT}}urEnqueueUSMMemcpy2DTestWithParam.SuccessNonBlocking/Intel_R__OpenCL___{{.*}}
28-
{{OPT}}urEnqueueUSMMemcpy2DTestWithParam.SuccessNonBlocking/Intel_R__OpenCL___{{.*}}
29-
{{OPT}}urEnqueueUSMMemcpy2DTestWithParam.SuccessNonBlocking/Intel_R__OpenCL___{{.*}}
30-
{{OPT}}urEnqueueUSMMemcpy2DTestWithParam.SuccessNonBlocking/Intel_R__OpenCL___{{.*}}
31-
{{OPT}}urEnqueueUSMMemcpy2DNegativeTest.InvalidNullHandleQueue/Intel_R__OpenCL___{{.*}}
32-
{{OPT}}urEnqueueUSMMemcpy2DNegativeTest.InvalidNullPointer/Intel_R__OpenCL___{{.*}}
33-
{{OPT}}urEnqueueUSMMemcpy2DNegativeTest.InvalidSize/Intel_R__OpenCL___{{.*}}
34-
{{OPT}}urEnqueueUSMMemcpy2DNegativeTest.InvalidEventWaitList/Intel_R__OpenCL___{{.*}}
35-
{{OPT}}urEnqueueUSMPrefetchTest.InvalidSizeTooLarge/Intel_R__OpenCL___{{.*}}
1+
{{OPT}}urEnqueueDeviceGetGlobalVariableReadTest.Success/Intel_R__OpenCL___{{.*}}_
362
{{OPT}}urEnqueueKernelLaunchUSMLinkedList.Success/Intel_R__OpenCL___{{.*}}_UsePoolEnabled
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +0,0 @@
1-
urKernelSetArgValueTest.InvalidKernelArgumentSize/Intel_R__OpenCL___{{.*}}
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
urProgramGetFunctionPointerTest.InvalidFunctionName/Intel_R__OpenCL___{{.*}}_
22
urProgramGetInfoTest.Success/Intel_R__OpenCL___{{.*}}___UR_PROGRAM_INFO_SOURCE
3-
urProgramGetInfoTest.Success/Intel_R__OpenCL___{{.*}}___UR_PROGRAM_INFO_BINARIES

test/conformance/program/urProgramGetInfo.cpp

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,31 @@ UUR_TEST_SUITE_P(
2525

2626
TEST_P(urProgramGetInfoTest, Success) {
2727
auto property_name = getParam();
28-
size_t property_size = 0;
2928
std::vector<char> property_value;
30-
ASSERT_SUCCESS(
31-
urProgramGetInfo(program, property_name, 0, nullptr, &property_size));
32-
property_value.resize(property_size);
33-
ASSERT_SUCCESS(urProgramGetInfo(program, property_name, property_size,
34-
property_value.data(), nullptr));
29+
if (property_name == UR_PROGRAM_INFO_BINARIES) {
30+
size_t binary_sizes_len = 0;
31+
ASSERT_SUCCESS(urProgramGetInfo(program, UR_PROGRAM_INFO_BINARY_SIZES,
32+
0, nullptr, &binary_sizes_len));
33+
// Due to how the fixtures + env are set up we should only have one
34+
// device associated with program, so one binary.
35+
ASSERT_EQ(binary_sizes_len / sizeof(size_t), 1);
36+
size_t binary_sizes[1] = {binary_sizes_len};
37+
ASSERT_SUCCESS(urProgramGetInfo(program, UR_PROGRAM_INFO_BINARY_SIZES,
38+
binary_sizes_len, binary_sizes,
39+
nullptr));
40+
std::vector<char> binary(binary_sizes[0]);
41+
char *binaries[1] = {binary.data()};
42+
ASSERT_SUCCESS(urProgramGetInfo(program, UR_PROGRAM_INFO_BINARIES,
43+
sizeof(binaries[0]), binaries,
44+
nullptr));
45+
} else {
46+
size_t property_size = 0;
47+
ASSERT_SUCCESS(urProgramGetInfo(program, property_name, 0, nullptr,
48+
&property_size));
49+
property_value.resize(property_size);
50+
ASSERT_SUCCESS(urProgramGetInfo(program, property_name, property_size,
51+
property_value.data(), nullptr));
52+
}
3553
}
3654

3755
TEST_P(urProgramGetInfoTest, InvalidNullHandleProgram) {

0 commit comments

Comments
 (0)