title: Using GPU with python package bert_embeddings and mxnet Fails
body: <p>I am using the below code to enable GPU using the package <code>mxnet</code> for extracting Bert Embeddings using the package <code>bert_embeddings</code> :</p>
  
  <pre><code>from bert_embedding import BertEmbedding
  import mxnet as mx
  ctx = mx.gpu()
  
  bert_embedding = BertEmbedding(ctx=ctx)
  </code></pre>
  
  <p>The resultant error is as below:</p>
  
  <pre><code>MXNetError: [13:51:52] src/ndarray/ndarray.cc:1280: GPU is not enabled
  Stack trace:
    [bt] (0) /user/anaconda3/lib/python3.7/site-packages/mxnet/libmxnet.so(+0x259c2b) [0x7fbf015d3c2b]
    [bt] (1) /user/anaconda3/lib/python3.7/site-packages/mxnet/libmxnet.so(mxnet::CopyFromTo(mxnet::NDArray const&amp;, mxnet::NDArray const&amp;, int, bool)+0x6db) [0x7fbf0395234b]
    [bt] (2) /user/anaconda3/lib/python3.7/site-packages/mxnet/libmxnet.so(mxnet::imperative::PushFComputeEx(std::function&lt;void (nnvm::NodeAttrs const&amp;, mxnet::OpContext const&amp;, std::vector&lt;mxnet::NDArray, std::allocator&lt;mxnet::NDArray&gt; &gt; const&amp;, std::vector&lt;mxnet::OpReqType, std::allocator&lt;mxnet::OpReqType&gt; &gt; const&amp;, std::vector&lt;mxnet::NDArray, std::allocator&lt;mxnet::NDArray&gt; &gt; const&amp;)&gt; const&amp;, nnvm::Op const*, nnvm::NodeAttrs const&amp;, mxnet::Context const&amp;, std::vector&lt;mxnet::engine::Var*, std::allocator&lt;mxnet::engine::Var*&gt; &gt; const&amp;, std::vector&lt;mxnet::engine::Var*, std::allocator&lt;mxnet::engine::Var*&gt; &gt; const&amp;, std::vector&lt;mxnet::Resource, std::allocator&lt;mxnet::Resource&gt; &gt; const&amp;, std::vector&lt;mxnet::NDArray*, std::allocator&lt;mxnet::NDArray*&gt; &gt; const&amp;, std::vector&lt;mxnet::NDArray*, std::allocator&lt;mxnet::NDArray*&gt; &gt; const&amp;, std::vector&lt;mxnet::OpReqType, std::allocator&lt;mxnet::OpReqType&gt; &gt; const&amp;)::{lambda(mxnet::RunContext)#1}::operator()(mxnet::RunContext) const+0x128) [0x7fbf03807668]
    [bt] (3) /user/anaconda3/lib/python3.7/site-packages/mxnet/libmxnet.so(mxnet::imperative::PushFComputeEx(std::function&lt;void (nnvm::NodeAttrs const&amp;, mxnet::OpContext const&amp;, std::vector&lt;mxnet::NDArray, std::allocator&lt;mxnet::NDArray&gt; &gt; const&amp;, std::vector&lt;mxnet::OpReqType, std::allocator&lt;mxnet::OpReqType&gt; &gt; const&amp;, std::vector&lt;mxnet::NDArray, std::allocator&lt;mxnet::NDArray&gt; &gt; const&amp;)&gt; const&amp;, nnvm::Op const*, nnvm::NodeAttrs const&amp;, mxnet::Context const&amp;, std::vector&lt;mxnet::engine::Var*, std::allocator&lt;mxnet::engine::Var*&gt; &gt; const&amp;, std::vector&lt;mxnet::engine::Var*, std::allocator&lt;mxnet::engine::Var*&gt; &gt; const&amp;, std::vector&lt;mxnet::Resource, std::allocator&lt;mxnet::Resource&gt; &gt; const&amp;, std::vector&lt;mxnet::NDArray*, std::allocator&lt;mxnet::NDArray*&gt; &gt; const&amp;, std::vector&lt;mxnet::NDArray*, std::allocator&lt;mxnet::NDArray*&gt; &gt; const&amp;, std::vector&lt;mxnet::OpReqType, std::allocator&lt;mxnet::OpReqType&gt; &gt; const&amp;)+0x4bb) [0x7fbf03813ceb]
    [bt] (4) /user/anaconda3/lib/python3.7/site-packages/mxnet/libmxnet.so(mxnet::Imperative::InvokeOp(mxnet::Context const&amp;, nnvm::NodeAttrs const&amp;, std::vector&lt;mxnet::NDArray*, std::allocator&lt;mxnet::NDArray*&gt; &gt; const&amp;, std::vector&lt;mxnet::NDArray*, std::allocator&lt;mxnet::NDArray*&gt; &gt; const&amp;, std::vector&lt;mxnet::OpReqType, std::allocator&lt;mxnet::OpReqType&gt; &gt; const&amp;, mxnet::DispatchMode, mxnet::OpStatePtr)+0x961) [0x7fbf03819511]
    [bt] (5) /user/anaconda3/lib/python3.7/site-packages/mxnet/libmxnet.so(mxnet::Imperative::Invoke(mxnet::Context const&amp;, nnvm::NodeAttrs const&amp;, std::vector&lt;mxnet::NDArray*, std::allocator&lt;mxnet::NDArray*&gt; &gt; const&amp;, std::vector&lt;mxnet::NDArray*, std::allocator&lt;mxnet::NDArray*&gt; &gt; const&amp;)+0x25b) [0x7fbf03819c5b]
    [bt] (6) /user/anaconda3/lib/python3.7/site-packages/mxnet/libmxnet.so(+0x23a9879) [0x7fbf03723879]
    [bt] (7) /user/anaconda3/lib/python3.7/site-packages/mxnet/libmxnet.so(MXImperativeInvokeEx+0x6f) [0x7fbf03723e6f]
    [bt] (8) /user/anaconda3/lib/python3.7/lib-dynload/../../libffi.so.6(ffi_call_unix64+0x4c) [0x7fbf9d1d8ec0]
  </code></pre>
  
  <p>Additional details:</p>
  
  <p>OS: Ubuntu 18.04
  GPU: NVIDIA</p>
  
  <pre><code>+-----------------------------------------------------------------------------+
  | NVIDIA-SMI 410.48                 Driver Version: 410.48                    |
  |-------------------------------+----------------------+----------------------+
  | GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
  | Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
  |===============================+======================+======================|
  |   0  GeForce GTX 1080    Off  | 00000000:65:00.0  On |                  N/A |
  | 34%   50C    P2    38W / 180W |    592MiB /  8110MiB |      0%      Default |
  +-------------------------------+----------------------+----------------------+
  
  </code></pre>