Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update CUDA compute capability to support Blackwell #7047

Merged
merged 4 commits into from
Feb 18, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 12 additions & 5 deletions op_builder/builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,20 @@ def installed_cuda_version(name=""):

def get_default_compute_capabilities():
compute_caps = DEFAULT_COMPUTE_CAPABILITIES
# Update compute capability according to: https://en.wikipedia.org/wiki/CUDA#GPUs_supported
import torch.utils.cpp_extension
if torch.utils.cpp_extension.CUDA_HOME is not None and installed_cuda_version()[0] >= 11:
if installed_cuda_version()[0] == 11 and installed_cuda_version()[1] == 0:
# Special treatment of CUDA 11.0 because compute_86 is not supported.
compute_caps += ";8.0"
else:
if torch.utils.cpp_extension.CUDA_HOME is not None:
if installed_cuda_version()[0] == 11:
if installed_cuda_version()[1] >= 0:
compute_caps += ";8.0"
if installed_cuda_version()[1] >= 1:
compute_caps += ";8.6"
if installed_cuda_version()[1] >= 8:
compute_caps += ";9.0"
elif installed_cuda_version()[0] == 12:
compute_caps += ";8.0;8.6;9.0"
if installed_cuda_version()[1] >= 8:
compute_caps += ";10.0;12.0"
return compute_caps


Expand Down