You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Please indicate the notebook name and cell number where the problem occurs (or the chapter and page number in the book), and provide a clear and concise description of what the problem is. Ex. In chapter 1, cells 200-220, I think the code could be clearer [...]
Describe the solution you'd like
Include instructions for building tensorflow from source for specific GPUs in the installation guide in the GitHub repository. As well as where to find alternative builds for the ROCm variation of the package.
Describe alternatives you've considered
Using the CPU version of tensorflow for unsupported cards/drivers. This may be okay for the examples in the book, but will become a problem for any real world examples. It would be good for this repository to include instructions on building tensorflow so those with different graphics cards or drivers can get the most out of this book.
A second alternative would be to provide .whl files that target specific GPU/Driver combos in the repo. But that may be a burden to maintain.
Additional context
The current version of tensorflow is built for CUDA 11.8 and cuDNN 8 only. This is problematic for many users, as the current version of CUDA is 12.4 and cuDNN is on version 9. Tensorflow will not work properly with these drivers. It can cause problems for users who are following along on their own systems to have to downgrade their GPU drivers, as they may need the up to date drivers for other activities.
There is a similar problem for AMD users. They can also solve this problem by building tensorflow for their specific GPU/Driver. However, AMD also maintains their own distribution which AMD readers may be able to use. There alternative builds can be found here.
Tensorflow provides a solution, with instructions on how to build the project from their github repo to target your GPU/Driver combination. However, these instructions are not entirely up to date and there are some pit falls. Mainly
On linux, using clang on ubuntu based system gives an error (NvInferVersion.h missing )
This can be solved by building with gcc instead by selected n when asked to use clang
The "build" command is wrong for the most recent version of tensorflow. You need to use the v2 build like so:
You need to specify what version of python you want to target by setting an env variable
export TF_PYTHON_VERSION=3.12
I believe adding these instructions would be very helpful for new readers. Especially those who are not strong programmers and are taking this more as a data science exercise, who may not be familiar with the tools needed to set this up, if they want to run the projects on their own machine.
The text was updated successfully, but these errors were encountered:
AdamLeBlanc
changed the title
[IDEA] Add instructions on how to build TF from source to support make notebooks more accessible to those who have different GPUs
[IDEA] Add instructions on how to build TF from source to make notebooks more accessible to those who have different GPUs
Apr 27, 2024
When these installation instructions are already part of the Tensorflow repository itself, a link might make more sense to not become outdated too quickly. If you think that there are issues inside the official Tensorflow docs, you should consider reporting them upstream and might even provide a corresponding patch/fix to let all Tensorflow users benefit from this.
Thanks for helping us improve this project!
Before you create this issue
Please make sure you are using the latest updated code and libraries: see https://github.com/ageron/handson-ml3/blob/main/INSTALL.md#update-this-project-and-its-libraries
Also please make sure to read the FAQ (https://github.com/ageron/handson-ml3#faq) and search for existing issues (both open and closed), as your question may already have been answered: https://github.com/ageron/handson-ml3/issues
Is your feature request related to a problem? Please describe.
Please indicate the notebook name and cell number where the problem occurs (or the chapter and page number in the book), and provide a clear and concise description of what the problem is. Ex. In chapter 1, cells 200-220, I think the code could be clearer [...]
Describe the solution you'd like
Include instructions for building tensorflow from source for specific GPUs in the installation guide in the GitHub repository. As well as where to find alternative builds for the ROCm variation of the package.
Describe alternatives you've considered
Using the CPU version of tensorflow for unsupported cards/drivers. This may be okay for the examples in the book, but will become a problem for any real world examples. It would be good for this repository to include instructions on building tensorflow so those with different graphics cards or drivers can get the most out of this book.
A second alternative would be to provide .whl files that target specific GPU/Driver combos in the repo. But that may be a burden to maintain.
Additional context
The current version of tensorflow is built for CUDA 11.8 and cuDNN 8 only. This is problematic for many users, as the current version of CUDA is 12.4 and cuDNN is on version 9. Tensorflow will not work properly with these drivers. It can cause problems for users who are following along on their own systems to have to downgrade their GPU drivers, as they may need the up to date drivers for other activities.
There is a similar problem for AMD users. They can also solve this problem by building tensorflow for their specific GPU/Driver. However, AMD also maintains their own distribution which AMD readers may be able to use. There alternative builds can be found here.
Tensorflow provides a solution, with instructions on how to build the project from their github repo to target your GPU/Driver combination. However, these instructions are not entirely up to date and there are some pit falls. Mainly
NvInferVersion.h missing
)n
when asked to use clangbazel build //tensorflow/tools/pip_package/v2:wheel --repo_env=WHEEL_NAME=tensorflow --config=cuda
.../v2
inside of the directory the instructions tell you it will be output toexport TF_PYTHON_VERSION=3.12
I believe adding these instructions would be very helpful for new readers. Especially those who are not strong programmers and are taking this more as a data science exercise, who may not be familiar with the tools needed to set this up, if they want to run the projects on their own machine.
The text was updated successfully, but these errors were encountered: