Skip to content

Support PyTorch with CUDA 12.8 in order to support new NVIDIA Blackwell architecture #21162

Description

@fantauzzi

Search before asking

  • I have searched the Ultralytics issues and found no similar feature requests.

Description

I am trying to train and validate a yolo11s model with the coco dataset on an NVIDIA RTX 4070 ti. The PyTorch version installed by ultralytics, however, doesn't support my GPU, nor I believe the Blackwell architecture sm_120 in general.

Use case

Support the new NVIDIA Blackwell architecture for training and inference.

Additional

When I run

yolo detect train data=coco.yaml model=yolo11s.pt epochs=1 batch=38 workers=16 seed=42 deterministic=True imgsz=640

I get this warning

NVIDIA GeForce RTX 5070 Ti with CUDA capability sm_120 is not compatible with the current PyTorch installation.
The current PyTorch install supports CUDA capabilities sm_50 sm_60 sm_70 sm_75 sm_80 sm_86 sm_90.

and soon thereafter an error

RuntimeError: CUDA error: no kernel image is available for execution on the device

and training doesn't start.

As a workaround, I have manually installed a version of PyTorch that supports CUDA 12.8 and therefore Blackwell with pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu128.

Running the same command as before

yolo detect train data=coco.yaml model=yolo11s.pt epochs=1 batch=38 workers=16 seed=42 deterministic=True imgsz=640

training starts and completes, but validation stops with an error. Here attached the complete output

logs.txt

Are you willing to submit a PR?

  • Yes I'd like to help by submitting a PR!

Metadata

Metadata

Assignees

No one assigned

    Labels

    StaleStale and schedule for closing soondependenciesDependencies and packagesdetectObject Detection issues, PR'squestionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions