mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-19 06:09:01 +00:00
Add basic support to the harness for parallel test execution (#1687)
This change introduces a new command-line parameter to enable parallel execution by a specified number of worker threads. When parallel execution is requested, tests are distributed across the worker threads. This behaviour is disabled by default. This does not currently work for all suites as some of them are using global variables to configure tests. For the suites that do not use global state, this change reduced the execution time by up to 5x on an 8-core machine. Signed-off-by: Kévin Petit <kpet@free.fr>
This commit is contained in:
@@ -340,7 +340,11 @@ int main(int argc, const char *argv[])
|
||||
// Execute tests.
|
||||
// Note: don't use the entire harness, because we have a different way of
|
||||
// obtaining the device (via the context)
|
||||
test_harness_config config{};
|
||||
config.forceNoContextCreation = true;
|
||||
config.numElementsToUse = 1024;
|
||||
config.queueProps = 0;
|
||||
errNum = parseAndCallCommandLineTests(argCount, argList, devices[device_no],
|
||||
test_num, test_list, true, 0, 1024);
|
||||
test_num, test_list, config);
|
||||
return errNum;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user