mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-19 06:09:01 +00:00
add support for custom devices (#1891)
enable the CTS to run on custom devices
This commit is contained in:
@@ -185,6 +185,9 @@ int runTestHarnessWithCheck(int argc, const char *argv[], int testNum,
|
||||
else if (strcmp(env_mode, "accelerator") == 0
|
||||
|| strcmp(env_mode, "CL_DEVICE_TYPE_ACCELERATOR") == 0)
|
||||
device_type = CL_DEVICE_TYPE_ACCELERATOR;
|
||||
else if (strcmp(env_mode, "custom") == 0
|
||||
|| strcmp(env_mode, "CL_DEVICE_TYPE_CUSTOM") == 0)
|
||||
device_type = CL_DEVICE_TYPE_CUSTOM;
|
||||
else if (strcmp(env_mode, "default") == 0
|
||||
|| strcmp(env_mode, "CL_DEVICE_TYPE_DEFAULT") == 0)
|
||||
device_type = CL_DEVICE_TYPE_DEFAULT;
|
||||
@@ -314,6 +317,12 @@ int runTestHarnessWithCheck(int argc, const char *argv[], int testNum,
|
||||
device_type = CL_DEVICE_TYPE_ACCELERATOR;
|
||||
argc--;
|
||||
}
|
||||
else if (strcmp(argv[argc - 1], "custom") == 0
|
||||
|| strcmp(argv[argc - 1], "CL_DEVICE_TYPE_CUSTOM") == 0)
|
||||
{
|
||||
device_type = CL_DEVICE_TYPE_CUSTOM;
|
||||
argc--;
|
||||
}
|
||||
else if (strcmp(argv[argc - 1], "CL_DEVICE_TYPE_DEFAULT") == 0)
|
||||
{
|
||||
device_type = CL_DEVICE_TYPE_DEFAULT;
|
||||
@@ -351,6 +360,9 @@ int runTestHarnessWithCheck(int argc, const char *argv[], int testNum,
|
||||
case CL_DEVICE_TYPE_ACCELERATOR:
|
||||
log_info("Requesting Accelerator device ");
|
||||
break;
|
||||
case CL_DEVICE_TYPE_CUSTOM:
|
||||
log_info("Requesting Custom device ");
|
||||
break;
|
||||
case CL_DEVICE_TYPE_DEFAULT:
|
||||
log_info("Requesting Default device ");
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user