rapids_test_add

New in version v23.04.00.

States how many GPUs and what percent of each a test requires.

rapids_test_add(NAME <name> COMMAND <target|command> [<args>...]
                [GPUS <N> [PERCENT <value>]]
                [INSTALL_COMPONENT_SET <set>]
                [WORKING_DIRECTORY <dir>])

Add a test called <name> which will be executed with a given GPU resource allocation.

When combined with rapids_test_init() informs CTest what resources should be allocated to a test so that when testing in parallel oversubscription doesn’t occur. Without this information user execution of CTest with high parallel levels will cause multiple tests to run on the same GPU and quickly exhaust all memory.

COMMAND

Specify the test command-line including any arguments. If the first argument provided is an executable target (created by add_executable()) it will automatically be replaced by the location of the executable created at build time.

GPUS

State how many GPUs this test requires. Allows CTest to not over-subscribe a machine’s hardware.

If no value is provided, the test is considered to not use any GPUs

PERCENT

By default if no percent is provided, 100 is used. State how much of each GPU this test requires.

INSTALL_COMPONENT_SET

Record which component that the underlying executable for the test will be installed by. This is used by rapids_test_install_relocatable() to allow for execution of the installed tests by ctest

WORKING_DIRECTORY

Specify the working directory in which to execute the test. If not specified the test will be run with the current working directory set to the value of CMAKE_CURRENT_BINARY_DIR.