This project was tested on January 14-16th, 2025 to verify if older versions of PyTorch work on an RTX 3050TI Mobile with an AMD Ryzen 7 5800H Mobile in an Asus TUF A15 laptop.
Even if this guide is tailored for an RTX 3050TI, the steps should work with older or newer GPUs.
For more references, check this compatibility matrix:
RTX CUDA & cuDNN matrix
I noticed that many people face constant issues when installing the correct NVIDIA drivers (CUDA, NVCC, Toolkit, PyTorch). I personally spent hours setting everything up, so I decided to create this guide to help others.
I highly recommend using Miniconda for this setup as it allows isolating previously installed variables and dependencies that might interfere with the program. While I plan to add a branch for setups without Conda, I found that for most projects, using Conda is the easiest and most reliable approach.
This guide has been tested in two scenarios:
- A system with 2 years of intensive use and multiple Conda versions installed.
- A clean installation of Windows 10.
It is highly recommended to use Miniconda to avoid issues with larger suites like Anaconda.
-
Install Miniconda (latest version)
- Download Miniconda from the official website:
Miniconda Installation Guide for Windows - I used the silent installation via PowerShell:
Silent Install Instructions
IMPORTANT: Use the default installation settings. Do not change anything.
- Download Miniconda from the official website:
-
Add Miniconda to PATH
- Open environment variables by pressing
Win + R
, typingsysdm.cpl
, or searching for "Environment Variables". - In the menu, click the "Environment Variables" button.
- Under "System Variables," find
Path
orPATH
, select it, and click "Edit." - Add the following paths (replace
YOURUSER
with your username):C:\Users\YOURUSER\miniconda3 C:\Users\YOURUSER\miniconda3\Scripts C:\Users\YOURUSER\miniconda3\Library\bin
- Save the changes.
- Open environment variables by pressing
-
Verify Conda Installation
Opencmd
or PowerShell and run:conda --version
You should see something like:
Conda 25.1.1
Run the following command to create a Conda environment with Python 3.9:
conda create -n yolov8GPUtest python=3.9
- ✅ Conda 25.1.1
- ✅ Python 3.11.7 (also tested with 3.9)
- ✅ CUDA 12.4.0
- ✅ cuDNN 8.9.7.29
- ✅ PyTorch 2.5.1 with GPU support (
pytorch-cuda=12.4
) - ✅ Visual Studio 2022 Community (no plugins)
Activate the environment:
conda activate yolov8GPUtest
Install PyTorch with GPU support:
conda install pytorch==2.5.1 torchvision==0.20.1 torchaudio==2.5.1 pytorch-cuda=12.4 -c pytorch -c nvidia
-
Navigate to the
Scripts
folder:cd Scripts
-
Run the GPU test script:
python gpu_Pytorch_Test.py
You should see output similar to this:
PyTorch version: 2.5.1
CUDA available: ✅
CUDA version: 12.4
Number of GPUs: 1
✅ GPU detected.
GPU Name: NVIDIA GeForce RTX 3050 Ti Laptop GPU
Memory Capacity: 4.29 GB
✅ GPU operation completed successfully.
-
Activate the
yolov8GPUtest
environment:conda activate yolov8GPUtest
-
Navigate to the
Scripts
folder:cd Scripts
-
Install YOLOv8:
pip install ultralytics
-
Run the YOLOv8 test script:
python GPU_yolov8_vid.py
-
Select option
2
to use the webcam. If the webcam window opens and uses your RTX GPU, your GPU is working correctly. -
Use the
q
key to close the program and3
to exit. Results will be saved in theResults
folder.
- CUDA 12.6.3: CUDA Toolkit Archive
- cuDNN 9.5.1: cuDNN Archive
- Python 3.13:
conda create -n gpu-base python=3.13
- PyTorch 2.7.0:
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu126
PyTorch version: 2.7.0+cu126
CUDA available: ✅
CUDA version: 12.6
Number of GPUs: 1
✅ GPU detected.
GPU Name: NVIDIA GeForce RTX 3050 Ti Laptop GPU
Memory Capacity: 4.29 GB
✅ GPU operation completed successfully.
- CUDA: 12.6.3
- cuDNN: 9.5.1.17
- Python: 3.11.7
- PyTorch: 2.5.1
- Conda: 25.1.1
- C++: C++17
- CUDA: 12.9
- cuDNN: 9.5.1.17
- Python: 3.13
- PyTorch: 2.7.0
- Conda: 25.1.1
- C++: C++17
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 566.36 Driver Version: 566.36 CUDA Version: 12.7 |
|-----------------------------------------+------------------------+----------------------+
| GPU Name Driver-Model | Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|=========================================+========================+======================|
| 0 NVIDIA GeForce RTX 3050 ... WDDM | 00000000:01:00.0 Off | N/A |
| N/A 57C P0 10W / 75W | 662MiB / 4096MiB | 0% Default |
| | | N/A |
+-----------------------------------------+------------------------+----------------------+
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2024 NVIDIA Corporation
Built on Wed_Oct_30_01:18:48_Pacific_Daylight_Time_2024
Cuda compilation tools, release 12.6, V12.6.85
Build cuda_12.6.r12.6/compiler.35059454_0
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 576.02 Driver Version: 576.02 CUDA Version: 12.9 |
|-----------------------------------------+------------------------+----------------------+
| GPU Name Driver-Model | Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|=========================================+========================+======================|
| 0 NVIDIA GeForce RTX 3050 ... WDDM | 00000000:01:00.0 On | N/A |
| N/A 55C P8 6W / 75W | 188MiB / 4096MiB | 17% Default |
| | | N/A |
+-----------------------------------------+------------------------+----------------------+