mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-19 06:09:01 +00:00
make execution of workgroups test optional (#643)
This commit is contained in:
@@ -23,6 +23,10 @@ add_definitions(-DCL_USE_DEPRECATED_OPENCL_1_2_APIS=1)
|
||||
add_definitions(-DCL_USE_DEPRECATED_OPENCL_1_1_APIS=1)
|
||||
add_definitions(-DCL_USE_DEPRECATED_OPENCL_1_0_APIS=1)
|
||||
|
||||
option(USE_CL_EXPERIMENTAL "Use Experimental definitions" OFF)
|
||||
if(USE_CL_EXPERIMENTAL)
|
||||
add_definitions(-DCL_EXPERIMENTAL)
|
||||
endif(USE_CL_EXPERIMENTAL)
|
||||
|
||||
# Support both VS2008 and VS2012.
|
||||
set(BUILD_DIR "$ENV{ADRENO_DRIVER}/build")
|
||||
|
||||
@@ -15,10 +15,10 @@
|
||||
//
|
||||
#include "harness/compat.h"
|
||||
|
||||
#include "harness/testHarness.h"
|
||||
#include "procs.h"
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include "procs.h"
|
||||
#include "harness/testHarness.h"
|
||||
#if !defined(_WIN32)
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
@@ -42,8 +42,30 @@ test_definition test_list[] = {
|
||||
|
||||
const int test_num = ARRAY_SIZE(test_list);
|
||||
|
||||
int main(int argc, const char *argv[])
|
||||
{
|
||||
return runTestHarness( argc, argv, test_num, test_list, false, false, 0 );
|
||||
test_status InitCL(cl_device_id device) {
|
||||
#ifdef CL_EXPERIMENTAL
|
||||
auto version = get_device_cl_version(device);
|
||||
|
||||
if(version > Version(2,2)) {
|
||||
int error;
|
||||
cl_bool isSupported;
|
||||
error = clGetDeviceInfo(device,
|
||||
CL_DEVICE_WORK_GROUP_COLLECTIVE_FUNCTIONS_SUPPORT,
|
||||
sizeof(isSupported), &isSupported, NULL);
|
||||
if (error != CL_SUCCESS) {
|
||||
print_error(error, "Unable to query support for collective functions");
|
||||
return TEST_FAIL;
|
||||
}
|
||||
|
||||
if (isSupported == CL_FALSE) {
|
||||
return TEST_SKIP;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
return TEST_PASS;
|
||||
}
|
||||
|
||||
int main(int argc, const char *argv[]) {
|
||||
return runTestHarnessWithCheck(argc, argv, test_num, test_list, false, 0, InitCL);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user