diff options
author | Kyle Edwards <kyle.edwards@kitware.com> | 2019-11-22 19:23:55 (GMT) |
---|---|---|
committer | Kyle Edwards <kyle.edwards@kitware.com> | 2019-11-25 16:08:27 (GMT) |
commit | a64ba0235fbacfe58751c222997bdd74cf973359 (patch) | |
tree | d22567be61596c1b0aa44e82436217609b160c75 /Help/prop_test | |
parent | f9f294f5faf980aa39721e4deb465b2e9dbbbd9a (diff) | |
download | CMake-a64ba0235fbacfe58751c222997bdd74cf973359.zip CMake-a64ba0235fbacfe58751c222997bdd74cf973359.tar.gz CMake-a64ba0235fbacfe58751c222997bdd74cf973359.tar.bz2 |
CTest: Clarify that resource requirements can be split
Add a note to the documentation to clarify this, and add test cases
to ensure it.
Fixes: #19987
Diffstat (limited to 'Help/prop_test')
-rw-r--r-- | Help/prop_test/RESOURCE_GROUPS.rst | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Help/prop_test/RESOURCE_GROUPS.rst b/Help/prop_test/RESOURCE_GROUPS.rst index 436451c..63c56ce 100644 --- a/Help/prop_test/RESOURCE_GROUPS.rst +++ b/Help/prop_test/RESOURCE_GROUPS.rst @@ -38,6 +38,22 @@ This single group requires 4 slots from a single GPU and 2 slots from a single cryptography chip. In total, 3 resource groups are specified for this test, each with its own unique requirements. +Note that the number of slots following the resource type specifies slots from +a *single* instance of the resource. If the resource group can tolerate +receiving slots from different instances of the same resource, it can indicate +this by splitting the specification into multiple requirements of one slot. For +example: + +.. code-block:: cmake + + add_test(NAME MyTest COMMAND MyExe) + set_property(TEST MyTest PROPERTY RESOURCE_GROUPS + "gpus:1,gpus:1,gpus:1,gpus:1") + +In this case, the single resource group indicates that it needs four GPU slots, +all of which may come from separate GPUs (though they don't have to; CTest may +still assign slots from the same GPU.) + When CTest sets the :ref:`environment variables <ctest-resource-environment-variables>` for a test, it assigns a group number based on the group description, starting at 0 on the left and the number of |