Building with CUDA support
ViralBShah opened this issue · comments
Is it possible to have Pkg.build()
pick up cuda if it is found on the path (say nvcc) and build a CUDA enabled MXNet automatically? I currently hacked mshadow.mk to make it happen.
This should be doable given a reliable way of discovering CUDA
. We could check for the environment variable CUDA_HOME
and/or check whereis nvcc
.
You should be able to activate CUDA
in config.mk
manually for now (which should not be overwritten due to https://github.com/dmlc/MXNet.jl/blob/master/deps/build.jl#L90).
I tried autodetection on an Amazon EC2 gpu instance. It did not work for me, though MXNET_HOME was exported. I ended up going in to the ./deps/src/mxnet dir and editing the config.mk file by hand to build mxnet with CUDA. Then I was able to get training mnist to work using gpu.
Perhaps trying to configure based on the location of nvcc would be better?
You can set CUDA_HOME
to direct to a non-default installation location. I was thinking about using whereis nvcc
, but I was afraid that might be brittle.
We could try to add it as a secondary source of information.
Adding it to the docs should be sufficient. I was able to set it up by compiling mxnet and setting MXNET_HOME
and LD_LIBRARY_PATH
properly
Fixed by #194 and the upcoming v0.2.2 release