I'm trying to write torch code meant to run on multiple GPUs.
I would like to ensure the program does not exceed the memory available on these GPU, I would like to collect information about whether the GPUs are waiting for data from another computation, collect statistics on how often data is copied from memory to the GPU's memory, etc.
For all of these purposes, it seems like it would be helpful to simulate the presence of multiple GPUs on the system. Of course you could also have multiple GPUs on the system, but that seems wasteful if I'm mostly using it to debug.
Is it possible to do that, either with torch directly, or at the OS level on Linux?