mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-19 06:09:01 +00:00
Currently, selecting a different device in a platform to test is rather cumbersome, for two reasons: 1. The default device type tested is the "default" device and there is at most one default device in a platform. This means that, by itself, choosing any non-zero device index is by definition out-of-range: ```sh $ CL_PLATFORM_INDEX=1 CL_DEVICE_INDEX=1 ./test_conformance/basic/test_basic Initializing random seed to 0. Requesting Default device based on command line for platform index 1 and device index 1 device index out of range -- choosen_device_index (1) >= num_devices (1) ``` 2. To choose a non-default device type you therefore need to explicitly specify another device type also, but "all" is not a valid device type in the harness. This means that you need to know both the device type and the index of the device within that device type to choose the device to test. ```sh $ CL_DEVICE_TYPE=all CL_PLATFORM_INDEX=1 CL_DEVICE_INDEX=1 ./test_conformance/basic/test_basic Unknown CL_DEVICE_TYPE env variable setting: all. Aborting... Aborted (core dumped) ``` This PR aims to fix (2), by allowing "all" as a device type. In the future, we could consider making the default device type "all" vs. "default", which would fix (1) also, but that will likely need more discussion and should be done in a separate PR.