I currently have a set of tests where I want to perform a test on as many GPUs as there are on the host machine. E.G if the machine has 3 GPUS I want to test the function using 1 GPU, 2 GPUs and 3 GPUs
My current approach (which I know is not elegant or efficient) is to have 8 tests, each one configured to use a number of GPUs ranging from 1 to 8, and each one to be skipped if the host machine doesn't have the required number of GPUs
Is there any way to write only one test where I use @pytest.mark.parametrize to set up 8 different values to be used as number of GPUs within the test and combine that with the skipif fixture to skip tests depending on the gpus of the machine?
Thanks in advance