rapids_test_init¶
Added in version v23.04.00.
Establish necessary components for CTest GPU resource allocation to allow for parallel tests.
rapids_test_init( )
Generates a JSON resource specification file representing the machine’s GPUs using system introspection. This will allow CTest to schedule multiple single-GPU or multi-GPU tests in parallel on multi-GPU machines.
For tests to execute correctly they will need to use the
rapids_test_add()
to register GPU requirements:
enable_testing()
include(rapids-test)
rapids_test_init()
add_executable( test_example test.cu )
rapids_test_add(NAME single_gpu_alloc COMMAND test_example GPUS 1)
rapids_test_add(NAME two_gpu_alloc COMMAND test_example GPUS 2)
Result Variables¶
CTEST_RESOURCE_SPEC_FILE
will be set to the generated JSON file if not already set