frozoul / 4K-NeRF

Official implementation of arxiv paper "4K-NeRF: High Fidelity Neural Radiance Fields at Ultra High Resolutions"
379 stars 19 forks source link

torch and cuda version of your work #11

Open zhangsongdmk opened 1 year ago

zhangsongdmk commented 1 year ago

Thank you for you great work. As far as I know you are the only one work on high resolution NeRF.

I try to run the 'traing 4K resolution with L1 loss' according to the readme.md. But get the following error . Some times it's caused by pytorch&cuda version. So can I know the pytorch&cuda version infomation?

' File "/opt/anaconda3/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1561, in _get_cuda_arch_flags arch_list[-1] += '+PTX' IndexError: list index out of range but get "arch_list[-1] += '+PTX'" error

zhangsongdmk commented 1 year ago

The error was called in the train.py & train_sr.py, os.environ[‘CUDA_VISIBLE_DEVICES‘] was set to 1, 6, not 0, if only 1 GPU was used, the code could not find GPU.

XLR-man commented 1 year ago

I had the same problem. Did you solve it?

XLR-man commented 1 year ago

Using /root/.cache/torch_extensions/py38_cu113 as PyTorch extensions root... Detected CUDA files, patching ldflags Emitting ninja build file /root/.cache/torch_extensions/py38_cu113/adam_upd_cuda/build.ninja... Traceback (most recent call last): File "run_sr.py", line 12, in from lib import utils, dvgo, dcvgo, dmpigo, sr_esrnet, sr_unetdisc File "/root/autodl-tmp/4K-NeRF-main/lib/utils.py", line 12, in from .masked_adam import MaskedAdam File "/root/autodl-tmp/4K-NeRF-main/lib/masked_adam.py", line 7, in adam_upd_cuda = load( File "/root/miniconda3/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1124, in load return _jit_compile( File "/root/miniconda3/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1337, in _jit_compile _write_ninja_file_and_build_library( File "/root/miniconda3/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1436, in _write_ninja_file_and_build_library _write_ninja_file_to_build_library( File "/root/miniconda3/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1834, in _write_ninja_file_to_build_library cuda_flags = common_cflags + COMMON_NVCC_FLAGS + _get_cuda_arch_flags() File "/root/miniconda3/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1606, in _get_cuda_arch_flags arch_list[-1] += '+PTX' IndexError: list index out of range

zhangsongdmk commented 1 year ago

The error was called in the train.py & train_sr.py, os.environ[‘CUDA_VISIBLE_DEVICES‘] was set to 1, 6, not 0, if only 1 GPU was used, the code could not find GPU.

But there are other problems left and I didn't run the code successfully.

XLR-man commented 1 year ago

I didn't solve it either. I only have one gpu and my pytorch and cuda versions are 1.10 and 11.3 respectively. I think we might need a lower version

zhouilu commented 1 year ago

try like export TORCH_CUDA_ARCH_LIST="8.6"

zhangsongdmk commented 1 year ago

there is some config part in the code to set which number gpu to use. you change the number to your computer.

---- Replied Message ---- | From | @.> | | Date | 09/14/2023 19:13 | | To | @.> | | Cc | @.>@.> | | Subject | Re: [frozoul/4K-NeRF] torch and cuda version of your work (Issue #11) |

try like export TORCH_CUDA_ARCH_LIST="8.6"

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>