mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-19 06:09:01 +00:00
Device enqueue optional (#579)
* optional execution of device side enqueue * make device enqueue test suite optional
This commit is contained in:
@@ -28,8 +28,29 @@
|
||||
std::string gKernelName;
|
||||
int gWimpyMode = 0;
|
||||
|
||||
test_status InitCL(cl_device_id device) {
|
||||
auto version = get_device_cl_version(device);
|
||||
if (version < Version(2, 0)) {
|
||||
return TEST_SKIP;
|
||||
}
|
||||
|
||||
int error;
|
||||
cl_uint max_queues_size;
|
||||
error = clGetDeviceInfo(device, CL_DEVICE_MAX_ON_DEVICE_QUEUES,
|
||||
sizeof(max_queues_size), &max_queues_size, NULL);
|
||||
if (error != CL_SUCCESS) {
|
||||
print_error(error, "Unable to get max queues on device");
|
||||
return TEST_FAIL;
|
||||
}
|
||||
|
||||
if ((max_queues_size == 0) && (version > Version(2,2))) {
|
||||
return TEST_SKIP;
|
||||
}
|
||||
|
||||
return TEST_PASS;
|
||||
}
|
||||
|
||||
test_definition test_list[] = {
|
||||
#ifdef CL_VERSION_2_0
|
||||
ADD_TEST( device_info ),
|
||||
ADD_TEST( device_queue ),
|
||||
ADD_TEST( execute_block ),
|
||||
@@ -41,7 +62,6 @@ test_definition test_list[] = {
|
||||
ADD_TEST( host_multi_queue ),
|
||||
ADD_TEST( enqueue_ndrange ),
|
||||
ADD_TEST( host_queue_order ),
|
||||
#endif
|
||||
};
|
||||
|
||||
const int test_num = ARRAY_SIZE( test_list );
|
||||
@@ -76,5 +96,5 @@ int main(int argc, const char *argv[])
|
||||
}
|
||||
}
|
||||
|
||||
return runTestHarnessWithCheck(argc, argv, test_num, test_list, false, false, 0, NULL);
|
||||
return runTestHarnessWithCheck(argc, argv, test_num, test_list, false, false, 0, InitCL);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user