4 ms·
Who knew that Julia could do CUDA work too? Every day I grow more and more impressed with the language.
by aardvarkr 5y ago
Who knew that Julia could do CUDA work too? Every day I grow more and more impressed with the language.
- version_five 5y agoI last experimented with CUDA.jl a year ago, and it was very useable then. This is a good reminder to re-evaluate the Julia deep learning ecosystem. If I were working for myself I would definitely try to do more with Julia (for machine learning). Realistically, python has such an established base that it will take some time to get orgs that are already all in on python to come over.
- dnautics 5y agoI think it's not dumb to target Greenfield users: just installing python gpu wheels is often difficult enough that several companies exist (indirectly) because it's so difficult to do right (e.g. selling a gpu PC with that stuff preinstalled)
- queuebert 5y agoI just finished setting up a new machine to run some Kaggle stuff. Both Tensorflow and PyTorch had issues with CUDA versions and dependencies that weren't immediately fixed with a clean virtualenv, while both Knet.jl and Flux.jl installed flawlessly.
- wdroz 5y agoFor Pytorch and Tensorflow, you can use conda to install them with the right CUDA and cudnn versions.
- kwertzzz 5y agoFor Pytorch, I had no issues with conda. But with Tensorflow from conda, the training process just hangs (consuming 100% of CPU but no GPU resources, despite my GPUs are recognized). I got more luck with installing Tensorflow with pip. Given the fact that Tensorflow documentation does not mention conda, I wondering how well this is supported.
- wdroz 5y agoYou install cudatoolkit from conda then tensorflow with pip.
- eigenspace 5y agoIt also happens to be one of the most easy and reliable ways I know of to install CUDA on your machine. Everything is handled through the artifact system so you don't have to mess with downloading it yourself and making sure you have the right versions and such. (Before someone complains, you can also opt out of this and direct the library to a version you installed yourself)
- krastanov 5y agoCould you elaborate a bit on this? I know that a gigantic bunch of libraries are involved that is usually terrible to install but Julia does it for you in the equivalent of a python virtual-env. However, aren't there also Linux kernel components that are necessary? How are those installed?
- ChrisRackauckas 5y agoCUDA.jl installs all of the CUDA drivers and associated libraries like cudnn for you if you don't have them. Those are all vendered via the Yggdrasil system so that users don't have to deal with it.
- krastanov 5y agoCUDA.jl does not install the actual kernel driver, right? I do not really see how it can do that and the sibling comment does confirm that the kernel driver is not managed by Julia.
- kwertzzz 5y agoYes, you would still need to the NVIDIA kernel driver (preferably the most current one). Desktop users typically have it already installed. But the main difficulty in my opinion is to install CUDA (with CuDNN,...). Even the TensorFlow documentation [0] is outdated in this regards as it covers only Ubuntu 18.04. The installation process of CUDA.jl is really quite good and reliable. Per default it downloads it own version of CUDA and CuDNN, or you can use a system-wide CUDA installation by setting some environment variables [1]. [0] https://www.tensorflow.org/install/gpu https://www.tensorflow.org/install/gpu [1] https://cuda.juliagpu.org/stable/installation/overview/ https://cuda.juliagpu.org/stable/installation/overview/