Gluoncv does not detect GPUs

Hi,
I’m trying hard to use a gluoncv detection model, but on SageMaker EC2 P3.2xl notebooks (V100 GPU, mxnet 1.4) gluoncv can’t seem to see the GPU:

net = gcv.model_zoo.get_model('ssd_512_mobilenet1.0_custom', classes=classes,
    pretrained_base=True, transfer='voc')

net.collect_params().reset_ctx([mx.gpu(0)])

returns a MXNetError: [08:49:34] src/ndarray/ndarray.cc:1279: GPU is not enabled

whereas mx.test_utils.list_gpus() returns range(0,1)

What is wrong?

Which version of mxnet is installed in that instance?
pip list | grep mxnet

I experienced the following issue on Sagemaker, when I have worked with gluonts. GluonTS installs its own version of MXNet, which is not using GPU. These 2 installed version of MXNet kinda coexist - Thomas’s code should display both of them, but when you import mxnet the non-GPU one is loaded.

Any follow up on this?

Hi Pedro yes.

gluon-ts has removed mxnet from it’s list of dependencies so it no longer installs the cpu version of mxnet and assumes you already have mxnet installed and will used whatever version.

1 Like