Hi George!



 George3d6:

I am more so referring to doing this check on someone else machine, that already has torch installed.


As far as I know, the only airtight way to check cuda / gpu compatibility
is torch.cuda.is_available() (and to be completely sure, actually
perform a tensor operation on the gpu).  That’s what I do on my own
machines (but once I check a that a given version of pytorch works with
my gpu, I don’t have to keep doing it).
You want to check somebody else’s pytorch with somebody else’s gpu,
so I would say it’s doubly important to actually run the gpu.
I would run a separate python process that runs a simple gpu test
script before running your “real” program.  (It could store its result in
a text file or environment variable or simply inform the user.)  When
that process exits, it will release any cuda overhead.
If you want to get fancy, you could have your “real” program spawn
your test script in a separate process, and proceed with or without
the gpu depending on the test script’s results.  Again, when the
spawned process exits, its cuda overhead will be released.
Best.
K. Frank