add support for custom devices (#1891)

enable the CTS to run on custom devices
This commit is contained in:
Aharon Abramson
2024-02-13 19:29:39 +02:00
committed by GitHub
parent a4b5a30210
commit d4f9d04b39

View File

@@ -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;