Running rocPRIM unit tests over multiple GPUs

Running rocPRIM unit tests over multiple GPUs#

The CTest resource allocation feature can be used to distribute tests across multiple GPUs, accelerating testing when multiple GPUs of the same family are in a system. It can also be used to test multiple product families without having to set HIP_VISIBLE_DEVICES.

Note

CMake 3.18 or later is required.

When rocPRIM is built with cmake -DBUILD_TEST=ON, the generate_resource_spec binary file is created.

Use generate_resource_spec to create a resource specification file. The resource specification file is a JSON file that describes the GPU resources available on your system. For example:

./generate_resource_spec resources.json

To run tests in parallel, pass the resource specification file and the maximum number of tests to run in parallel to ctest:

ctest --resource-spec-file PATH_TO_RESOURCE_SPECIFICATION_FILE --parallel MAXIMUM_NUMBER_OF_PARALLEL_TESTS

To restrict tests to a single family of GPUs, use the AMDGPU_TEST_TARGETS option when building rocPRIM.