songrise / AvatarCraft

[ICCV23] AvatarCraft: Transforming Text into Neural Human Avatars with Parameterized Shape and Pose Control
Other
186 stars 7 forks source link

No CUDA runtime is found #7

Open qplwme opened 1 year ago

qplwme commented 1 year ago
python stylize.py --weights_path "ckpts/bare_smpl.pth.tar" --tgt_text "Hulk, photorealistic style" --exp_name "hulk" --batch_size 4096
No CUDA runtime is found, using CUDA_HOME=':/usr/local/cuda-11.3'
Traceback (most recent call last):
  File "stylize.py", line 17, in <module>
    from models import instant_nsr, diffusion
  File "/data2/gaoyufei_m24/AvatarCraft/models/instant_nsr.py", line 19, in <module>
    from encoder import get_encoder
  File "/data2/gaoyufei_m24/AvatarCraft/encoder/__init__.py", line 2, in <module>
    from encoder.hashencoder import HashEncoder
  File "/data2/gaoyufei_m24/AvatarCraft/encoder/hashencoder/__init__.py", line 1, in <module>
    from .hashgrid import HashEncoder
  File "/data2/gaoyufei_m24/AvatarCraft/encoder/hashencoder/hashgrid.py", line 9, in <module>
    from .backend import _backend
  File "/data2/gaoyufei_m24/AvatarCraft/encoder/hashencoder/backend.py", line 12, in <module>
    sources=[os.path.join(_src_path, 'src', f) for f in [
  File "/data2/gaoyufei_m24/mambaforge/envs/avatar/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 1091, in load
    keep_intermediates=keep_intermediates)
  File "/data2/gaoyufei_m24/mambaforge/envs/avatar/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 1302, in _jit_compile
    is_standalone=is_standalone)
  File "/data2/gaoyufei_m24/mambaforge/envs/avatar/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 1400, in _write_ninja_file_and_build_library
    is_standalone=is_standalone)
  File "/data2/gaoyufei_m24/mambaforge/envs/avatar/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 1782, in _write_ninja_file_to_build_library
    cuda_flags = common_cflags + COMMON_NVCC_FLAGS + _get_cuda_arch_flags()
  File "/data2/gaoyufei_m24/mambaforge/envs/avatar/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 1561, in _get_cuda_arch_flags
    arch_list[-1] += '+PTX'
IndexError: list index out of range

envs

NVIDIA 3090 24G

NVIDIA-SMI 510.47.03    Driver Version: 510.47.03    CUDA Version: 11.6

nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2021 NVIDIA Corporation
Built on Mon_May__3_19:15:13_PDT_2021
Cuda compilation tools, release 11.3, V11.3.109
Build cuda_11.3.r11.3/compiler.29920130_0

reproduce

clone the repo enviroment setup with cuda version 11.x data setup without optional run python stylize.py --weights_path "ckpts/bare_smpl.pth.tar" --tgt_text "Hulk, photorealistic style" --exp_name "hulk" --batch_size 4096

songrise commented 1 year ago

Hi, I did not encounter this issue, and I am not familiar with CUDA. But I believe it is related to the custom CUDA operator in the hash encoder. My suggestion is that you go to /.cache/torch_extensions, and remove _hash_encoder _raymarching _sh_encoder, and run the code to complie the operator again.