From d4f9d04b39fc7135c5c8998bfe3c6c43b70e3117 Mon Sep 17 00:00:00 2001 From: Aharon Abramson Date: Tue, 13 Feb 2024 19:29:39 +0200 Subject: [PATCH] add support for custom devices (#1891) enable the CTS to run on custom devices --- test_common/harness/testHarness.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/test_common/harness/testHarness.cpp b/test_common/harness/testHarness.cpp index 34e179d944..0e3c49e9a3 100644 --- a/test_common/harness/testHarness.cpp +++ b/test_common/harness/testHarness.cpp @@ -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;