The Simple Guide: Deep Learning with RTX 4090 Installation (CUDA, cuDNN, Tensorflow, PyTorch) (2024)

The Simple Guide: Deep Learning with RTX 4090 Installation (CUDA, cuDNN, Tensorflow, PyTorch) (2)

This tutorial is tested with RTX4090. All the commands in this tutorial will be done inside the “terminal”.

Purpose: Identify the proper drivers and software versions for getting the RTX4090 (or any RTX40-series) GPU working

For RTX30-Series: https://medium.com/@deeplch/the-simple-guide-deep-learning-with-rtx-3090-cuda-cudnn-tensorflow-keras-pytorch-e88a2a8249bc

For RTX20-Series & Full Deep Learning Installation guide: https://medium.com/@deeplch/the-ultimate-guide-ubuntu-18-04-37bae511efb0

Headsup: Not recommend to install NVDIA driver with apt because we will need specific driver and CUDA versions.

The RTX40-series has the Ada Lovelace architecture (not in cuda-compat table), but we know it has v8.9 Compute Capability.

The Simple Guide: Deep Learning with RTX 4090 Installation (CUDA, cuDNN, Tensorflow, PyTorch) (3)

Compute Capability 8.9 actually supports both CUDA 12 & 11. But we can only use CUDA Toolkit up to 11.8 for deep learning libraries. The driver requirement would be 525.60.13 or newer.

The Simple Guide: Deep Learning with RTX 4090 Installation (CUDA, cuDNN, Tensorflow, PyTorch) (4)

It’s tempting to download 520.61.05 as it ships with CUDA11.8. But the table already told you 11–8 is NOT compatible (not sure why they do this tho…). We need 525+ but they are already in CUDA12.X.

The Simple Guide: Deep Learning with RTX 4090 Installation (CUDA, cuDNN, Tensorflow, PyTorch) (5)

FYI, if you were using the RTX30-series (Ampere), you might not need to upgrade, except for driver, since you should already be using the Compute Capability 8.x, so you can continue with CUDA11.x.

The Simple Guide: Deep Learning with RTX 4090 Installation (CUDA, cuDNN, Tensorflow, PyTorch) (6)

Referencing above screenshot we can use CUDA11.8.

After selecting the OS and other settings applicable to your system, copy & past the 2 commands from the webpage (rectangular box) into your terminal.

Download from: https://developer.nvidia.com/cuda-11-8-0-download-archive

The Simple Guide: Deep Learning with RTX 4090 Installation (CUDA, cuDNN, Tensorflow, PyTorch) (7)
wget https://developer.download.nvidia.com/compute/cuda/11.8.0/local_installers/cuda_11.8.0_520.61.05_linux.run
sudo sh cuda_11.8.0_520.61.05_linux.run

Un-check “Driver” before installing (if you have already installed a Nvidia driver before this step).

The Simple Guide: Deep Learning with RTX 4090 Installation (CUDA, cuDNN, Tensorflow, PyTorch) (8)

When you finish, it will look like this.

The Simple Guide: Deep Learning with RTX 4090 Installation (CUDA, cuDNN, Tensorflow, PyTorch) (9)

Referencing above screenshot we can use cuDNN 8.9.6 with our CUDA11.8 selection as recommended by the Nvidia Note.

Download from: https://developer.nvidia.com/rdp/cudnn-archive

The Simple Guide: Deep Learning with RTX 4090 Installation (CUDA, cuDNN, Tensorflow, PyTorch) (10)

Install the downloaded cuDNN file afterwards.

See cuDNN 8.9 Improvements

cuDNN8.0 Improvements

The Simple Guide: Deep Learning with RTX 4090 Installation (CUDA, cuDNN, Tensorflow, PyTorch) (11)

Spoiler alert: you will need to use tensorflow 2.13.

Given the spoiler, you need to use Python3.8+.

sudo apt update
sudo apt install software-properties-common
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt install python3.8

To work and code in Python3.8, it’s recommended that you create a new virtual environment (see my full installation guide, up top).

We won’t have to compiling from source like the old days. But you will still need to check the compatibility table:

The Simple Guide: Deep Learning with RTX 4090 Installation (CUDA, cuDNN, Tensorflow, PyTorch) (12)

In terminal, install the corresponding tensorflow with the following command:

pip install tensorflow==2.13.0

Afterwards, go into your python console, and run the follow code. You should then see True as the output at the end.

import tensorflow as tf
tf.test.is_gpu_available()
The Simple Guide: Deep Learning with RTX 4090 Installation (CUDA, cuDNN, Tensorflow, PyTorch) (13)

Pytorch has been the easiest library to install and enable gpu, just go to their website, and use their generated command: https://pytorch.org/get-started/locally/

The Simple Guide: Deep Learning with RTX 4090 Installation (CUDA, cuDNN, Tensorflow, PyTorch) (14)

In terminal, install the corresponding tensorflow with the following command:

pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118

— END —

The Simple Guide: Deep Learning with RTX 4090 Installation (CUDA, cuDNN, Tensorflow, PyTorch) (2024)

FAQs

Is RTX 4090 worth it for deep learning? ›

Conclusion: RTX 4090 for Deep Learning

With its advanced architecture and abundant CUDA core count, the RTX 4090 effortlessly manages challenging projects. It is an excellent choice for those seeking a reliable GPU to power their deep-learning endeavors.

Does the RTX 4090 support CUDA? ›

The RTX40-series has the Ada Lovelace architecture (not in cuda-compat table), but we know it has v8. 9 Compute Capability. Compute Capability 8.9 actually supports both CUDA 12 & 11. But we can only use CUDA Toolkit up to 11.8 for deep learning libraries.

How to install Cuda and cuDNN for Tensorflow? ›

How can you install the CUDA toolkit and cuDNN for TensorFlow?
  1. Verify GPU Compatibility: ...
  2. Install the NVIDIA GPU Driver: ...
  3. Download the CUDA Toolkit: ...
  4. Run the CUDA Toolkit Installer: ...
  5. Set Environment Variables: ...
  6. Download cuDNN: ...
  7. Install cuDNN: ...
  8. Verify the Installation:

How to install CUDA on Ubuntu Anaconda? ›

How to Install CUDA on Ubuntu 22.04: Step-by-step
  1. Step 1: Upgrade your Ubuntu.
  2. Step 2: List the recommended NVIDIA drivers.
  3. Step 3: Install the driver nvidia-driver-535.
  4. Step 4: Reboot your system.
  5. Step 5: Check the driver installation.
  6. Step 6: Install GCC.
  7. Step 7: Install CUDA toolkit Ubuntu.
  8. Step 8: Reboot your system.
Oct 18, 2023

How much GPU is enough for deep learning? ›

The number of GPUs required for deep learning training depends on the model's complexity, dataset size, and available resources. Starting with at least 4 GPUs can significantly accelerate training time. Deep learning training is when a model is built from start to finish.

Can TensorFlow and PyTorch work together? ›

An example of running both pytorch and tensorflow in the same network, while pasing weights and gradients between the two. In this example, we run a simple 2-layer feed-forward network, with the first layer size (5, 2) and the second (2, 3).

Is cuDNN necessary for TensorFlow? ›

If you only need to use CUDA, its not necessary. But if you want to use Tensorflow, Pytorch, and/or many other Deep Learning (DL) frameworks, you need to install cuDNN also. cuDNN is not included in the CUDA toolkit install. Furthermore, most major DL frameworks work with cuDNN, not purely/directly with CUDA.

Which GPU is best for TensorFlow? ›

We highly recommend the NVIDIA Quadro RTX 8000 for TensorFlow due to its exceptional performance and cutting-edge features. With its powerful architecture and advanced capabilities, this GPU is capable of handling even the most demanding deep learning tasks with ease.

Do I need Anaconda for CUDA? ›

Anaconda does not require the installation of the CUDA SDK. Ubuntu and some other Linux distributions ship with a third party open-source driver for NVIDIA GPUs called Nouveau. CUDA requires replacing the Nouveau driver with the official closed source NVIDIA driver.

Why do I need cuDNN? ›

By offloading these computationally intensive tasks to the GPU, cuDNN enables researchers and developers to train and deploy deep learning models with unprecedented speed and efficiency, significantly reducing the time and resources required for these complex workloads.

How to install CUDA and Pytorch Ubuntu? ›

How to install CUDA and run Pytorch on Linux
  1. Check the version of CUDA.
  2. Pre-installation.
  3. Install the CUDA toolkit on linux.
  4. Install the Pytorch along with cudatoolkit in Conda.
  5. Check if CUDA is installed sucessfully.
  6. Extra: How to uninstall CUDA and NVIDIA drivers.

Is RTX 4090 good for 3D? ›

It's safe to conclude now that RTX4090 is a beast of card for 3d rendering professionals.

Is RTX 4090 good for game development? ›

What GPU (video card) is best for game development? As of this writing, the fastest GPU for game dev is the NVIDIA GeForce RTX 4090. However, depending on the target platform and specific workflow, many users will be able to use a more affordable GPU such as the RTX 4080 or 4070 SUPER.

Is RTX 4000 good for deep learning? ›

A: The NVIDIA RTX A4000 is a graphics card optimized for deep learning applications. It is built on the Ada Lovelace architecture and offers improved performance and features compared to the previous GPU generations.

What is the RTX 4090 good for? ›

The NVIDIA® GeForce RTX™ 4090 is the ultimate GeForce GPU. It brings an enormous leap in performance, efficiency, and AI-powered graphics. Experience ultra-high performance gaming, incredibly detailed virtual worlds, unprecedented productivity, and new ways to create.

Top Articles
3 Red-Hot ETFs That Show No Signs of Cooling Off
Bitcoin ETFs have been a runaway hit. Will we see an Ethereum ETF before long?
DPhil Research - List of thesis titles
Ups Dropoff Location Near Me
Maria Dolores Franziska Kolowrat Krakowská
Uihc Family Medicine
Craigslist Mexico Cancun
B67 Bus Time
A Fashion Lover's Guide To Copenhagen
Walgreens On Nacogdoches And O'connor
Craigslist Greenville Craigslist
Detroit Lions 50 50
Sport Clip Hours
Scholarships | New Mexico State University
Oc Craiglsit
What Happened To Maxwell Laughlin
The Murdoch succession drama kicks off this week. Here's everything you need to know
Nutrislice Menus
Craigslist Free Stuff Greensboro Nc
Overton Funeral Home Waterloo Iowa
20 Different Cat Sounds and What They Mean
Sussur Bloom locations and uses in Baldur's Gate 3
67-72 Chevy Truck Parts Craigslist
Terry Bradshaw | Biography, Stats, & Facts
Zillow Group Stock Price | ZG Stock Quote, News, and History | Markets Insider
Slim Thug’s Wealth and Wellness: A Journey Beyond Music
Wkow Weather Radar
Sofia the baddie dog
Harrison County Wv Arrests This Week
Yale College Confidential 2027
Black Lion Backpack And Glider Voucher
Blush Bootcamp Olathe
Citibank Branch Locations In Orlando Florida
Moonrise Time Tonight Near Me
Shiftwizard Login Johnston
Litter-Robot 3 Pinch Contact & DFI Kit
Closest 24 Hour Walmart
Arcadia Lesson Plan | Day 4: Crossword Puzzle | GradeSaver
The Boogeyman Showtimes Near Surf Cinemas
Legit Ticket Sites - Seatgeek vs Stubhub [Fees, Customer Service, Security]
WorldAccount | Data Protection
Thelemagick Library - The New Comment to Liber AL vel Legis
Sams Gas Price Sanford Fl
Mathews Vertix Mod Chart
Coffee County Tag Office Douglas Ga
John Wick: Kapitel 4 (2023)
Phmc.myloancare.com
Espn Top 300 Non Ppr
Craiglist.nj
Lira Galore Age, Wikipedia, Height, Husband, Boyfriend, Family, Biography, Net Worth
Uncle Pete's Wheeling Wv Menu
Latest Posts
Article information

Author: The Hon. Margery Christiansen

Last Updated:

Views: 6190

Rating: 5 / 5 (50 voted)

Reviews: 81% of readers found this page helpful

Author information

Name: The Hon. Margery Christiansen

Birthday: 2000-07-07

Address: 5050 Breitenberg Knoll, New Robert, MI 45409

Phone: +2556892639372

Job: Investor Mining Engineer

Hobby: Sketching, Cosplaying, Glassblowing, Genealogy, Crocheting, Archery, Skateboarding

Introduction: My name is The Hon. Margery Christiansen, I am a bright, adorable, precious, inexpensive, gorgeous, comfortable, happy person who loves writing and wants to share my knowledge and understanding with you.