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

ImportError for running extract_mesh.py #54

Open
ApdowJN opened this issue Jun 7, 2024 · 5 comments
Open

ImportError for running extract_mesh.py #54

ApdowJN opened this issue Jun 7, 2024 · 5 comments

Comments

@ApdowJN
Copy link

ApdowJN commented Jun 7, 2024

When I try python extract_mesh.py -m exp_playroom/release/ --iteration 30000, it shows issue below.

Traceback (most recent call last):
  File "extract_mesh.py", line 13, in <module>
    from tetranerf.utils.extension import cpp
  File "/home/xxx/Documents/gaussian-opacity-fields/submodules/tetra-triangulation/tetranerf/utils/extension/__init__.py", line 1, in <module>
    from . import tetranerf_cpp_extension as cpp
ImportError: cannot import name 'tetranerf_cpp_extension' from partially initialized module 'tetranerf.utils.extension' (most likely due to a circular import) (/home/xxx/Documents/gaussian-opacity-fields/submodules/tetra-triangulation/tetranerf/utils/extension/__init__.py)

How to solve this problem? Has anyone meet this error?

@Aur1anna
Copy link

I have also encountered this situation, which seems to be the tetra nerf for triangulation not being successfully installed. I try reinstalling it, but in the # tetra nerf for triangulation step, after I run cmake . it reported an error as below, and I would greatly appreciate it if someone could provide a solution to help.

99b4a3e3b59498703e7c1dd295f9dff7
full text reads as follows:

CMake Error at /home/ywan/miniconda3/envs/gof113/share/cmake-3.26/Modules/CMakeDetermineCompilerId.cmake:751 (message):
Compiling the CUDA compiler identification source file
"CMakeCUDACompilerId.cu" failed.

Compiler: /usr/bin/nvcc

Build flags:

Id flags: --keep;--keep-dir;tmp -v

The output was:

255

#$ SPACE=

#$ CUDART=cudart

#$ HERE=/usr/lib/nvidia-cuda-toolkit/bin

#$ THERE=/usr/lib/nvidia-cuda-toolkit/bin

#$ TARGET_SIZE=

#$ TARGET_DIR=

#$ TARGET_SIZE=64

#$ NVVMIR_LIBRARY_DIR=/usr/lib/nvidia-cuda-toolkit/libdevice

#$
PATH=/usr/lib/nvidia-cuda-toolkit/bin:/home/ywan/miniconda3/envs/gof113/bin:/home/ywan/miniconda3/bin:/home/ywan/miniconda3/condabin:/usr/local/cuda-11.7/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/lib/wsl/lib:/mnt/c/Program
Files/WindowsApps/CanonicalGroupLimited.Ubuntu20.04LTS_2004.6.16.0_x64__79rhkp1fndgsc:/mnt/c/Program
Files/NVIDIA GPU Computing Toolkit/CUDA/v11.8/bin:/mnt/c/Program
Files/NVIDIA GPU Computing
Toolkit/CUDA/v11.8/libnvvp:/mnt/c/Windows/system32:/mnt/c/Windows:/mnt/c/Windows/System32/Wbem:/mnt/c/Windows/System32/WindowsPowerShell/v1.0:/mnt/c/Windows/System32/OpenSSH:/mnt/c/Program
Files (x86)/NVIDIA Corporation/PhysX/Common:/mnt/c/Program Files/NVIDIA
Corporation/NVIDIA
NvDLISR:/mnt/c/WINDOWS/system32:/mnt/c/WINDOWS:/mnt/c/WINDOWS/System32/Wbem:/mnt/c/WINDOWS/System32/WindowsPowerShell/v1.0:/mnt/c/WINDOWS/System32/OpenSSH:/mnt/d/Program
Files/MATLAB/R2022a/runtime/win64:/mnt/d/Program
Files/MATLAB/R2022a/bin:/mnt/c/Program Files/Git/cmd:/mnt/c/Program
Files/dotnet:/mnt/c/Program Files/NVIDIA Corporation/Nsight Compute
2022.3.0:/mnt/d/CMake/bin:/mnt/f/Anaconda:/mnt/f/Anaconda/Scripts:/mnt/f/Anaconda/Library/mingw-w64/bin:/mnt/f/Anaconda/Library/usr/bin:/mnt/f/Anaconda/Library/bin:/mnt/c/Program
Files (x86)/Windows Kits/10/Windows Performance Toolkit:/mnt/c/Program
Files/Microsoft Visual
Studio/2022/Community/VC/Tools/MSVC/14.39.33519/bin/Hostx86/x86:/mnt/f:/mnt/f/Scripts:/mnt/c/Program
Files/PowerShell/7:/mnt/c/Users/workstation/AppData/Local/Microsoft/WindowsApps:/mnt/d/App/PyCharm/installer/PyCharm
Community Edition
2022.1/bin:/mnt/c/Users/workstation/.dotnet/tools:/mnt/d/Microsoft VS
Code/bin:/snap/bin:/home/ywan/.pixi/bin

#$ LIBRARIES= -L/usr/lib/x86_64-linux-gnu/stubs -L/usr/lib/x86_64-linux-gnu

#$ rm tmp/a_dlink.reg.c

#$ gcc -D__CUDA_ARCH__=300 -E -x c++ -DCUDA_DOUBLE_MATH_FUNCTIONS
-D__CUDACC__ -D__NVCC__ -D__CUDACC_VER_MAJOR__=10 -D__CUDACC_VER_MINOR__=1
-D__CUDACC_VER_BUILD__=243 -include "cuda_runtime.h" -m64
"CMakeCUDACompilerId.cu" > "tmp/CMakeCUDACompilerId.cpp1.ii"

#$ cicc --c++14 --gnu_version=90400 --allow_managed -arch compute_30 -m64
-ftz=0 -prec_div=1 -prec_sqrt=1 -fmad=1 --include_file_name
"CMakeCUDACompilerId.fatbin.c" -tused -nvvmir-library
"/usr/lib/nvidia-cuda-toolkit/libdevice/libdevice.10.bc"
--gen_module_id_file --module_id_file_name
"tmp/CMakeCUDACompilerId.module_id" --orig_src_file_name
"CMakeCUDACompilerId.cu" --gen_c_file_name
"tmp/CMakeCUDACompilerId.cudafe1.c" --stub_file_name
"tmp/CMakeCUDACompilerId.cudafe1.stub.c" --gen_device_file_name
"tmp/CMakeCUDACompilerId.cudafe1.gpu" "tmp/CMakeCUDACompilerId.cpp1.ii" -o
"tmp/CMakeCUDACompilerId.ptx"

#$ ptxas -arch=sm_30 -m64 "tmp/CMakeCUDACompilerId.ptx" -o
"tmp/CMakeCUDACompilerId.sm_30.cubin"

ptxas fatal : Value 'sm_30' is not defined for option 'gpu-name'

--error 0xff --

Call Stack (most recent call first):
/home/ywan/miniconda3/envs/gof113/share/cmake-3.26/Modules/CMakeDetermineCompilerId.cmake:8 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
/home/ywan/miniconda3/envs/gof113/share/cmake-3.26/Modules/CMakeDetermineCompilerId.cmake:53 (__determine_compiler_id_test)
/home/ywan/miniconda3/envs/gof113/share/cmake-3.26/Modules/CMakeDetermineCUDACompiler.cmake:307 (CMAKE_DETERMINE_COMPILER_ID)
CMakeLists.txt:2 (project)

-- Configuring incomplete, errors occurred!

@Aur1anna
Copy link

It seems that the 3090 does not support the old SM-30 architecture. I tried to adjust it in cmakelist.txt but so far it has not been successful yet

@niujinshuchong
Copy link
Member

Hi, could you maybe check the solution here: #52 (comment)

@angieAAAAA
Copy link

I encountered the same ImportError where the command line indicates that the installation was successful. I also try the solution in #52comment. The problem has not solved yet. I suspect that this issue might be related to my GPU (RTX 4090), but I am not certain. I would appreciate any guidance on whether this could be a GPU-related issue or if there might be another underlying cause.

@PaulErpen
Copy link

PaulErpen commented Sep 19, 2024

I solved this by cloning and installing tetra-nerf from its original github repo: https://github.com/jkulhanek/tetra-nerf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants