Current unit tests in the tests directory are only set up for CPUs. I would like to be able to test 1 GPU and multi GPU configurations also with running pytest on a GPU node without needing a whole separate set of tests.
My proposal:
For tests that either need a GPU or could do CPU and/or GPU versions, check for GPU availability with torch. Based on the check run the CPU and GPU portions of the test or just the CPU portions.
This way we keep the interface simple and consistent across platforms but can still run tests at scale.
Current unit tests in the
testsdirectory are only set up for CPUs. I would like to be able to test 1 GPU and multi GPU configurations also with running pytest on a GPU node without needing a whole separate set of tests.My proposal:
For tests that either need a GPU or could do CPU and/or GPU versions, check for GPU availability with torch. Based on the check run the CPU and GPU portions of the test or just the CPU portions.
This way we keep the interface simple and consistent across platforms but can still run tests at scale.