How to check if a supported GPU is present using MXNET C++ API


#1

I want to set my ctx to CPU or GPU if compatible GPU is present in the system. I can’t seem to find a MXnet C++ API to determine this. Any ideas ?


#2

There will be a C API to do this check: Track the github PR here: https://github.com/apache/incubator-mxnet/pull/10354 . Currently you can try to do a subprocess call to nvidia-smi even though that isn’t ideal.