MXNetError: GPU not enabled

I am getting the “MXNetError:: GPU not enabled” error on the “collect_params().initialize(ctx=ctx)” line with the following code:

... other stuff...
ctx = mx.gpu(0)
.... other stuff ....
network.collect_params().initialize(ctx=ctx)

Any idea how to fix it?
In case it matters, I am running on Windows after installing MXNet into conda distribution of python using the following commands.

pip install mxnet
pip install mxnet-cu80==1.0.0

I have installed CuDnn on my machine by downloading from NVidia site and the GPU on my machine supports Cuda.

Can we verify outside of MXNet that everything is configured correctly for the GPU. Can you run the command nvidia-smi from the command line. By default it gets installed at C:\Program Files\NVIDIA Corporation\NVSMI

I’m facing the same problem but on Google Colab …

hi,
first, google colab is based on linux ubuntu and it has nothing to do with windows machines.
now, before connecting to runtime, make sure that you have selected GPU from runtime menu->choose runtime type and click save
then connect, install with

!pip install mxnet-cu101

then you can use colab without any issue.

1 Like