-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expand documentation wrt how to use NVIDIA GPU(install TF+CUDA+cuDNN) #50
Comments
There is nothing special to do. You set up cudnn like for any other project and it should work. I guess we should rather link official docs which stay updated when something changes. |
It's a real PITA to install TF compatible CUDA+cuDNN unless you're maybe using conda that can resolve it for you. if you pip install tensorflow you have to use CUDA 10 and then look up which cuDNN version is compatible with CUDA 10 and the TF you have installed(7.x version usually) and if you want the newer TF/CUDA/cuDNN you have to build and compile TF C yourself using bazel which is even more of a PITA. This process assumes a lot of prior knowledge, so it would be good to provide actual documentation for it or just tell them to use a container |
Nvidia likes to make it hard. I do not understand why you can download this only after registering. Their debian packages are strange as well, one extracts other debian packages in a cache folder to install them from there. Compiling tensorflow using pip was never a problem here, but not every tensorflow is compatible with every cuda version. I guess here we need to blame Google. What worked for me:
I guess this is no enduser friendly way, but the main problem is nvidia and its wrappers around kernel modules and their license disaster, which prevents distributions from packaging everything needed. |
Yeah, the registering is weird lol, but it's been this way with Intel too, so I've kinda given up lol. |
When it would have a harmless license (even non-free) the distributions would package it. See the nvidia graphics driver for example. The problem are the parts, which are not allowed to be redistributed, for example, when Nvidia wants to know who's downloading cuDNN.
pypi allows types different packages, like source tar, binary packages, wheels and I think some others. When you install a source package pip does the compilation (but you probably need to install the "libfoo-dev" packages in your system first). Tensorflow is often easy to install from the "manylinux" wheel, but on the other hand this means for example that the build is not optimized for your cpu, i.e., it does not use modern instructions that are not available on older CPUs, which are still supported by tensorflow. I think tensorflow (or pytorch?) even prints a warning "Your cpu supports avx2, but this binary is not built with avx2 enabled". These details are, why it would be best to link to a nice howto, which is maintained by someone else, who updates it as needed. Who knows what's needed for the next tensorflow version to run smoothly. |
re driver: yeah, not a big fan of NVIDIA asking questions while downloading stuff, although I'm okay with it since I'm using their bandwidth(drivers and those propeitary blobs aren't small :P) |
Let's keep that one open. I will in the near future not describe a docker setup like in #51, but a tracking bug for more documentation on CUDA is useful. |
It would be good to expand the documentation to show users how to use NVIDIA GPU for inference and maybe even provide a reference setup(using Ubuntu 18.04 LTS, install the whatever CUDA+cuDNN TF2 supports(10.1 as of right now I think) and offload inference to that.
Currently using a i7 8665U 4c8t 25W CPU causes all cores to go nearly 80-100% running MobileNetV1 on 1280x720p video stream. Would be great to offload it to GPU and actually make the system usable for tasks while video chatting.
PS: I am volunteering to write the documentation.
The text was updated successfully, but these errors were encountered: