rapids_test_init
添加于版本 v23.04.00。
建立 CTest GPU 资源分配所需组件,以支持并行测试。
rapids_test_init( )
使用系统内省生成代表机器 GPU 的 JSON 资源规范文件。这将允许 CTest 在多 GPU 机器上并行调度多个单 GPU 或多 GPU 测试。
为了测试正确执行,它们需要使用 rapids_test_add()
来注册 GPU 要求
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)
结果变量
CTEST_RESOURCE_SPEC_FILE
如果尚未设置,将被设置为生成的 JSON 文件