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

['TORCH_CUDA_ARCH_LIST']. #360

Open
Yhc-777 opened this issue May 20, 2024 · 2 comments
Open

['TORCH_CUDA_ARCH_LIST']. #360

Yhc-777 opened this issue May 20, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@Yhc-777
Copy link

Yhc-777 commented May 20, 2024

Description

when i run :"python main.py -O --image ./df_ep0100_0008_rgb_rgba.png --workspace trial_image --iters 5000 --default_polar 80", i met this problem:“/home/u/miniconda3/envs/sdf/lib/python3.8/site-packages/torch/utils/cpp_extension.py:1967: UserWarning: TORCH_CUDA_ARCH_LIST is not set, all archs for visible cards are included for compilation.
If this is not desired, please set os.environ['TORCH_CUDA_ARCH_LIST'].” How can I solve it? Thx!!

Steps to Reproduce

Expected Behavior

Environment

@Yhc-777 Yhc-777 added the bug Something isn't working label May 20, 2024
@Duodecimus
Copy link

The environment variable TORCH_CUDA_ARCH_LIST in PyTorch should be set to specify the CUDA architectures that you want PyTorch to build for when compiling CUDA kernels. Each architecture is specified by its CUDA Compute Capability version (such as 3.5, 5.2, 6.0, etc.).

You probably only want to list the value of the one graphics card you have.
This is the same value as used for TCNN_CUDA_ARCHITECTURES or CUDA_ARCH

ypu can look your card up on https://developer.nvidia.com/cuda-gpus

@Hackinside
Copy link

Locate the cpp_extension.py on the line 1963 and replace the TORCH_CUDA_ARCH_LIST with one of the following strings:

'Kepler+Tesla', '3.7'
'Kepler', '3.5+PTX'
'Maxwell+Tegra', '5.3'
'Maxwell', '5.0;5.2+PTX'
'Pascal', '6.0;6.1+PTX'
'Volta+Tegra', '7.2'
'Volta', '7.0+PTX'
'Turing', '7.5+PTX'
'Ampere+Tegra', '8.7'
'Ampere', '8.0;8.6+PTX'
'Ada', '8.9+PTX'
'Hopper', '9.0+PTX'

See the bellow picture as example:

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants