GPU is not enabled for mxnet

Hi,

bert_embedding = BertEmbedding(mx.gpu(0))

causes the following error.
Exception has occurred: MXNetError
[15:02:22] C:\Jenkins\workspace\mxnet\mxnet\src\ndarray\ndarray.cc:1295: GPU is not enabled

Please help
best regards,
Cartik

Environment

pip install mxnet-cu90
Run in python code

import mxnet as mx
from bert_embedding import BertEmbedding
bert_embedding = BertEmbedding(mx.gpu(0))

causes error

Exception has occurred: MXNetError
[15:02:22] C:\Jenkins\workspace\mxnet\mxnet\src\ndarray\ndarray.cc:1295: GPU is not enabled

Hi

Looks like you’re running the code on a windows device where GPU is not enabled and/or the GPU version of MXNet is not installed. Switching your workspace/environment to a linux system with cuda libraries installed should fix the issue if you want to use GPU. Alternatively, change the context from mx.gpu(0) to mx.cpu() or leave blank to use CPU context.