Skip to content

AssertionError: Torch not compiled with CUDA enabled despite CUDA installation #1

Description

@Btr4k

Hello,

I'm encountering an issue where PyTorch is not recognizing CUDA, even though I have CUDA 12.5 installed on my system. Despite following the installation instructions for a CUDA-compatible version of PyTorch, torch.cuda.is_available() returns False, and attempting to utilize CUDA results in the error: "AssertionError: Torch not compiled with CUDA enabled."

Environment:

OS: Windows 11
PyTorch Version: (specify the version you tried installing)
Python Version: 3.8
CUDA Version: 12.5
GPU Model: NVIDIA GeForce RTX 3070
Command Used for Installation: conda install pytorch torchvision torchaudio cudatoolkit=11.3 -c pytorch (adjust this according to the actual command you used)

Steps to Reproduce:

Install PyTorch with the specified CUDA toolkit version.
Run python -c "import torch; print(torch.cuda.is_available())".

The expected outcome is True, but it results in False, indicating that CUDA is not enabled in the installed PyTorch build.

Could you please help me understand if I am missing a step, or if there is an issue with compatibility between the specified versions of PyTorch and CUDA? Any guidance would be appreciated.

Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions