GeneFacePlusPlus icon indicating copy to clipboard operation
GeneFacePlusPlus copied to clipboard

ModuleNotFoundError: No module named '_raymarching_face'

Open Yazdi9 opened this issue 1 year ago • 4 comments

2024-02-22 07:39:35.439672: E external/local_xla/xla/stream_executor/cuda/cuda_dnn.cc:9261] Unable to register cuDNN factory: Attempting to register factory for plugin cuDNN when one has already been registered 2024-02-22 07:39:35.439738: E external/local_xla/xla/stream_executor/cuda/cuda_fft.cc:607] Unable to register cuFFT factory: Attempting to register factory for plugin cuFFT when one has already been registered 2024-02-22 07:39:35.441929: E external/local_xla/xla/stream_executor/cuda/cuda_blas.cc:1515] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered 2024-02-22 07:39:35.454737: I tensorflow/core/platform/cpu_feature_guard.cc:182] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations. To enable the following instructions: AVX2 AVX512F FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags. 2024-02-22 07:39:38.035836: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT Traceback (most recent call last): File "/content/drive/MyDrive/GeneFacePlusPlus/./modules/radnerfs/raymarching/raymarching.py", line 10, in import _raymarching_face as _backend ModuleNotFoundError: No module named '_raymarching_face'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/local/lib/python3.10/dist-packages/torch/utils/cpp_extension.py", line 2100, in _run_ninja_build subprocess.run( File "/usr/lib/python3.10/subprocess.py", line 526, in run raise CalledProcessError(retcode, process.args, subprocess.CalledProcessError: Command '['ninja', '-v']' returned non-zero exit status 1.

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/content/drive/MyDrive/GeneFacePlusPlus/inference/app_genefacepp.py", line 5, in from inference.genefacepp_infer import GeneFace2Infer File "/content/drive/MyDrive/GeneFacePlusPlus/./inference/genefacepp_infer.py", line 40, in from modules.radnerfs.radnerf import RADNeRF File "/content/drive/MyDrive/GeneFacePlusPlus/./modules/radnerfs/radnerf.py", line 8, in from modules.radnerfs.renderer import NeRFRenderer File "/content/drive/MyDrive/GeneFacePlusPlus/./modules/radnerfs/renderer.py", line 11, in import modules.radnerfs.raymarching as raymarching File "/content/drive/MyDrive/GeneFacePlusPlus/./modules/radnerfs/raymarching/init.py", line 1, in from .raymarching import * File "/content/drive/MyDrive/GeneFacePlusPlus/./modules/radnerfs/raymarching/raymarching.py", line 12, in from .backend import backend File "/content/drive/MyDrive/GeneFacePlusPlus/./modules/radnerfs/raymarching/backend.py", line 31, in backend = load(name='raymarching_face', File "/usr/local/lib/python3.10/dist-packages/torch/utils/cpp_extension.py", line 1308, in load return jit_compile( File "/usr/local/lib/python3.10/dist-packages/torch/utils/cpp_extension.py", line 1710, in jit_compile write_ninja_file_and_build_library( File "/usr/local/lib/python3.10/dist-packages/torch/utils/cpp_extension.py", line 1823, in write_ninja_file_and_build_library run_ninja_build( File "/usr/local/lib/python3.10/dist-packages/torch/utils/cpp_extension.py", line 2116, in run_ninja_build raise RuntimeError(message) from e RuntimeError: Error building extension 'raymarching_face': [1/3] /usr/local/cuda/bin/nvcc -DTORCH_EXTENSION_NAME=raymarching_face -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE="gcc" -DPYBIND11_STDLIB="libstdcpp" -DPYBIND11_BUILD_ABI="cxxabi1011" -isystem /usr/local/lib/python3.10/dist-packages/torch/include -isystem /usr/local/lib/python3.10/dist-packages/torch/include/torch/csrc/api/include -isystem /usr/local/lib/python3.10/dist-packages/torch/include/TH -isystem /usr/local/lib/python3.10/dist-packages/torch/include/THC -isystem /usr/local/cuda/include -isystem /usr/include/python3.10 -D_GLIBCXX_USE_CXX11_ABI=0 -D__CUDA_NO_HALF_OPERATORS -D__CUDA_NO_HALF_CONVERSIONS -D__CUDA_NO_BFLOAT16_CONVERSIONS -D__CUDA_NO_HALF2_OPERATORS --expt-relaxed-constexpr -gencode=arch=compute_75,code=compute_75 -gencode=arch=compute_75,code=sm_75 --compiler-options '-fPIC' -O3 -std=c++14 -U__CUDA_NO_HALF_OPERATORS -U__CUDA_NO_HALF_CONVERSIONS -U__CUDA_NO_HALF2_OPERATORS -c /content/drive/MyDrive/GeneFacePlusPlus/modules/radnerfs/raymarching/src/raymarching.cu -o raymarching.cuda.o FAILED: raymarching.cuda.o /usr/local/cuda/bin/nvcc -DTORCH_EXTENSION_NAME=raymarching_face -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE="gcc" -DPYBIND11_STDLIB="libstdcpp" -DPYBIND11_BUILD_ABI="cxxabi1011" -isystem /usr/local/lib/python3.10/dist-packages/torch/include -isystem /usr/local/lib/python3.10/dist-packages/torch/include/torch/csrc/api/include -isystem /usr/local/lib/python3.10/dist-packages/torch/include/TH -isystem /usr/local/lib/python3.10/dist-packages/torch/include/THC -isystem /usr/local/cuda/include -isystem /usr/include/python3.10 -D_GLIBCXX_USE_CXX11_ABI=0 -D__CUDA_NO_HALF_OPERATORS -D__CUDA_NO_HALF_CONVERSIONS -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr -gencode=arch=compute_75,code=compute_75 -gencode=arch=compute_75,code=sm_75 --compiler-options '-fPIC' -O3 -std=c++14 -U__CUDA_NO_HALF_OPERATORS__ -U__CUDA_NO_HALF_CONVERSIONS__ -U__CUDA_NO_HALF2_OPERATORS__ -c /content/drive/MyDrive/GeneFacePlusPlus/modules/radnerfs/raymarching/src/raymarching.cu -o raymarching.cuda.o In file included from /usr/local/lib/python3.10/dist-packages/torch/include/c10/util/string_view.h:4, from /usr/local/lib/python3.10/dist-packages/torch/include/c10/util/StringUtil.h:6, from /usr/local/lib/python3.10/dist-packages/torch/include/c10/util/Exception.h:5, from /usr/local/lib/python3.10/dist-packages/torch/include/ATen/core/Generator.h:11, from /usr/local/lib/python3.10/dist-packages/torch/include/ATen/CPUGeneratorImpl.h:3, from /usr/local/lib/python3.10/dist-packages/torch/include/ATen/Context.h:3, from /usr/local/lib/python3.10/dist-packages/torch/include/ATen/cuda/CUDAContext.h:18, from /content/drive/MyDrive/GeneFacePlusPlus/modules/radnerfs/raymarching/src/raymarching.cu:5: /usr/local/lib/python3.10/dist-packages/torch/include/c10/util/C++17.h:27:2: error: #error You need C++17 to compile PyTorch 27 | #error You need C++17 to compile PyTorch | ^~~~~ In file included from /usr/local/lib/python3.10/dist-packages/torch/include/torch/csrc/api/include/torch/torch.h:3, from /content/drive/MyDrive/GeneFacePlusPlus/modules/radnerfs/raymarching/src/raymarching.cu:6: /usr/local/lib/python3.10/dist-packages/torch/include/torch/csrc/api/include/torch/all.h:4:2: error: #error C++17 or later compatible compiler is required to use PyTorch. 4 | #error C++17 or later compatible compiler is required to use PyTorch. | ^~~~~ In file included from /usr/local/lib/python3.10/dist-packages/torch/include/torch/csrc/api/include/torch/types.h:3, from /usr/local/lib/python3.10/dist-packages/torch/include/torch/csrc/api/include/torch/data/dataloader_options.h:4, from /usr/local/lib/python3.10/dist-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/base.h:3, from /usr/local/lib/python3.10/dist-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/stateful.h:4, from /usr/local/lib/python3.10/dist-packages/torch/include/torch/csrc/api/include/torch/data/dataloader.h:3, from /usr/local/lib/python3.10/dist-packages/torch/include/torch/csrc/api/include/torch/data.h:3, from /usr/local/lib/python3.10/dist-packages/torch/include/torch/csrc/api/include/torch/all.h:9, from /usr/local/lib/python3.10/dist-packages/torch/include/torch/csrc/api/include/torch/torch.h:3, from /content/drive/MyDrive/GeneFacePlusPlus/modules/radnerfs/raymarching/src/raymarching.cu:6: /usr/local/lib/python3.10/dist-packages/torch/include/ATen/ATen.h:4:2: error: #error C++17 or later compatible compiler is required to use ATen. 4 | #error C++17 or later compatible compiler is required to use ATen. | ^~~~~ [2/3] c++ -MMD -MF bindings.o.d -DTORCH_EXTENSION_NAME=_raymarching_face -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE="_gcc" -DPYBIND11_STDLIB="_libstdcpp" -DPYBIND11_BUILD_ABI="_cxxabi1011" -isystem /usr/local/lib/python3.10/dist-packages/torch/include -isystem /usr/local/lib/python3.10/dist-packages/torch/include/torch/csrc/api/include -isystem /usr/local/lib/python3.10/dist-packages/torch/include/TH -isystem /usr/local/lib/python3.10/dist-packages/torch/include/THC -isystem /usr/local/cuda/include -isystem /usr/include/python3.10 -D_GLIBCXX_USE_CXX11_ABI=0 -fPIC -std=c++17 -O3 -std=c++14 -c /content/drive/MyDrive/GeneFacePlusPlus/modules/radnerfs/raymarching/src/bindings.cpp -o bindings.o FAILED: bindings.o c++ -MMD -MF bindings.o.d -DTORCH_EXTENSION_NAME=_raymarching_face -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE="_gcc" -DPYBIND11_STDLIB="_libstdcpp" -DPYBIND11_BUILD_ABI="_cxxabi1011" -isystem /usr/local/lib/python3.10/dist-packages/torch/include -isystem /usr/local/lib/python3.10/dist-packages/torch/include/torch/csrc/api/include -isystem /usr/local/lib/python3.10/dist-packages/torch/include/TH -isystem /usr/local/lib/python3.10/dist-packages/torch/include/THC -isystem /usr/local/cuda/include -isystem /usr/include/python3.10 -D_GLIBCXX_USE_CXX11_ABI=0 -fPIC -std=c++17 -O3 -std=c++14 -c /content/drive/MyDrive/GeneFacePlusPlus/modules/radnerfs/raymarching/src/bindings.cpp -o bindings.o In file included from /usr/local/lib/python3.10/dist-packages/torch/include/torch/extension.h:5, from /content/drive/MyDrive/GeneFacePlusPlus/modules/radnerfs/raymarching/src/bindings.cpp:1: /usr/local/lib/python3.10/dist-packages/torch/include/torch/csrc/api/include/torch/all.h:4:2: error: #error C++17 or later compatible compiler is required to use PyTorch. 4 | #error C++17 or later compatible compiler is required to use PyTorch. | ^~~~~ In file included from /usr/local/lib/python3.10/dist-packages/torch/include/c10/util/string_view.h:4, from /usr/local/lib/python3.10/dist-packages/torch/include/c10/util/StringUtil.h:6, from /usr/local/lib/python3.10/dist-packages/torch/include/c10/util/Exception.h:5, from /usr/local/lib/python3.10/dist-packages/torch/include/c10/core/Device.h:5, from /usr/local/lib/python3.10/dist-packages/torch/include/ATen/core/TensorBody.h:11, from /usr/local/lib/python3.10/dist-packages/torch/include/ATen/core/Tensor.h:3, from /usr/local/lib/python3.10/dist-packages/torch/include/ATen/Tensor.h:3, from /usr/local/lib/python3.10/dist-packages/torch/include/torch/csrc/autograd/function_hook.h:3, from /usr/local/lib/python3.10/dist-packages/torch/include/torch/csrc/autograd/cpp_hook.h:2, from /usr/local/lib/python3.10/dist-packages/torch/include/torch/csrc/autograd/variable.h:6, from /usr/local/lib/python3.10/dist-packages/torch/include/torch/csrc/autograd/autograd.h:3, from /usr/local/lib/python3.10/dist-packages/torch/include/torch/csrc/api/include/torch/autograd.h:3, from /usr/local/lib/python3.10/dist-packages/torch/include/torch/csrc/api/include/torch/all.h:7, from /usr/local/lib/python3.10/dist-packages/torch/include/torch/extension.h:5, from /content/drive/MyDrive/GeneFacePlusPlus/modules/radnerfs/raymarching/src/bindings.cpp:1: /usr/local/lib/python3.10/dist-packages/torch/include/c10/util/C++17.h:27:2: error: #error You need C++17 to compile PyTorch 27 | #error You need C++17 to compile PyTorch | ^~~~~ In file included from /usr/local/lib/python3.10/dist-packages/torch/include/torch/csrc/api/include/torch/types.h:3, from /usr/local/lib/python3.10/dist-packages/torch/include/torch/csrc/api/include/torch/data/dataloader_options.h:4, from /usr/local/lib/python3.10/dist-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/base.h:3, from /usr/local/lib/python3.10/dist-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/stateful.h:4, from /usr/local/lib/python3.10/dist-packages/torch/include/torch/csrc/api/include/torch/data/dataloader.h:3, from /usr/local/lib/python3.10/dist-packages/torch/include/torch/csrc/api/include/torch/data.h:3, from /usr/local/lib/python3.10/dist-packages/torch/include/torch/csrc/api/include/torch/all.h:9, from /usr/local/lib/python3.10/dist-packages/torch/include/torch/extension.h:5, from /content/drive/MyDrive/GeneFacePlusPlus/modules/radnerfs/raymarching/src/bindings.cpp:1: /usr/local/lib/python3.10/dist-packages/torch/include/ATen/ATen.h:4:2: error: #error C++17 or later compatible compiler is required to use ATen. 4 | #error C++17 or later compatible compiler is required to use ATen. | ^~~~~ In file included from /usr/local/lib/python3.10/dist-packages/torch/include/ATen/core/ivalue.h:1499, from /usr/local/lib/python3.10/dist-packages/torch/include/ATen/core/List_inl.h:4, from /usr/local/lib/python3.10/dist-packages/torch/include/ATen/core/List.h:490, from /usr/local/lib/python3.10/dist-packages/torch/include/ATen/core/IListRef_inl.h:3, from /usr/local/lib/python3.10/dist-packages/torch/include/ATen/core/IListRef.h:632, from /usr/local/lib/python3.10/dist-packages/torch/include/ATen/WrapDimUtils.h:3, from /usr/local/lib/python3.10/dist-packages/torch/include/ATen/TensorNames.h:3, from /usr/local/lib/python3.10/dist-packages/torch/include/ATen/NamedTensorUtils.h:3, from /usr/local/lib/python3.10/dist-packages/torch/include/torch/csrc/autograd/variable.h:11, from /usr/local/lib/python3.10/dist-packages/torch/include/torch/csrc/autograd/autograd.h:3, from /usr/local/lib/python3.10/dist-packages/torch/include/torch/csrc/api/include/torch/autograd.h:3, from /usr/local/lib/python3.10/dist-packages/torch/include/torch/csrc/api/include/torch/all.h:7, from /usr/local/lib/python3.10/dist-packages/torch/include/torch/extension.h:5, from /content/drive/MyDrive/GeneFacePlusPlus/modules/radnerfs/raymarching/src/bindings.cpp:1: /usr/local/lib/python3.10/dist-packages/torch/include/ATen/core/ivalue_inl.h: In lambda function: /usr/local/lib/python3.10/dist-packages/torch/include/ATen/core/ivalue_inl.h:1061:30: error: ‘is_convertible_v’ is not a member of ‘std’; did you mean ‘is_convertible’? 1061 | if constexpr (::std::is_convertible_v<typename c10::invoke_result_t<T &&, Future&>, IValueWithStorages>) { | ^~~~~~~~~~~~~~~~ | is_convertible /usr/local/lib/python3.10/dist-packages/torch/include/ATen/core/ivalue_inl.h:1061:91: error: expected ‘(’ before ‘,’ token 1061 | if constexpr (::std::is_convertible_v<typename c10::invoke_result_t<T &&, Future&>, IValueWithStorages>) { | ^ /usr/local/lib/python3.10/dist-packages/torch/include/ATen/core/ivalue_inl.h:1061:111: error: expected primary-expression before ‘>’ token 1061 | if constexpr (::std::is_convertible_v<typename c10::invoke_result_t<T &&, Future&>, IValueWithStorages>) { | ^ /usr/local/lib/python3.10/dist-packages/torch/include/ATen/core/ivalue_inl.h:1061:112: error: expected primary-expression before ‘)’ token 1061 | if constexpr (::std::is_convertible_v<typename c10::invoke_result_t<T &&, Future&>, IValueWithStorages>) { | ^ In file included from /usr/local/lib/python3.10/dist-packages/torch/include/ATen/core/boxing/KernelFunction_impl.h:1, from /usr/local/lib/python3.10/dist-packages/torch/include/ATen/core/boxing/KernelFunction.h:251, from /usr/local/lib/python3.10/dist-packages/torch/include/ATen/core/op_registration/op_registration.h:11, from /usr/local/lib/python3.10/dist-packages/torch/include/torch/library.h:68, from /usr/local/lib/python3.10/dist-packages/torch/include/torch/csrc/autograd/autograd_not_implemented_fallback.h:3, from /usr/local/lib/python3.10/dist-packages/torch/include/torch/csrc/api/include/torch/autograd.h:4, from /usr/local/lib/python3.10/dist-packages/torch/include/torch/csrc/api/include/torch/all.h:7, from /usr/local/lib/python3.10/dist-packages/torch/include/torch/extension.h:5, from /content/drive/MyDrive/GeneFacePlusPlus/modules/radnerfs/raymarching/src/bindings.cpp:1: /usr/local/lib/python3.10/dist-packages/torch/include/ATen/core/boxing/impl/boxing.h: In static member function ‘static Result c10::impl::BoxedKernelWrapper<Result(Args ...), typename std::enable_if<((c10::guts::conjunction<c10::guts::disjunction<std::is_constructible<c10::IValue, typename std::decay<Args>::type>, std::is_same<c10::TensorOptions, typename std::decay<Args>::type> >...>::value && c10::guts::conjunction<c10::guts::disjunction<c10::impl::has_ivalue_to<T, void>, std::is_same<void, ReturnType> >, c10::guts::negation<std::is_lvalue_reference<_Tp> > >::value) && (! c10::impl::is_tuple_of_mutable_tensor_refs<Result>::value)), void>::type>::call(const c10::BoxedKernel&, const c10::OperatorHandle&, c10::DispatchKeySet, Args ...)’: /usr/local/lib/python3.10/dist-packages/torch/include/ATen/core/boxing/impl/boxing.h:229:25: error: ‘is_same_v’ is not a member of ‘std’; did you mean ‘is_same’? 229 | if constexpr (!std::is_same_v<void, Result>) { | ^~~~~~~~~ | is_same /usr/local/lib/python3.10/dist-packages/torch/include/ATen/core/boxing/impl/boxing.h:229:35: error: expected primary-expression before ‘void’ 229 | if constexpr (!std::is_same_v<void, Result>) { | ^~~~ /usr/local/lib/python3.10/dist-packages/torch/include/ATen/core/boxing/impl/boxing.h:229:35: error: expected ‘)’ before ‘void’ /usr/local/lib/python3.10/dist-packages/torch/include/ATen/core/boxing/impl/boxing.h:229:18: note: to match this ‘(’ 229 | if constexpr (!std::is_same_v<void, Result>) { | ^ ninja: build stopped: subcommand failed.

Yazdi9 avatar Feb 22 '24 07:02 Yazdi9

Have you solved this problem?

PengLiang-cn avatar Apr 12 '24 03:04 PengLiang-cn

Hi ~ Hello ~ I had the same problem, you solved the problem

kun2001github avatar Apr 16 '24 18:04 kun2001github

hi, find the setup.py under the directory, change as following: cmdclass={ 'build_ext': BuildExtension.with_options(use_ninja=False),

raymondren1982 avatar Jun 11 '24 02:06 raymondren1982

I fix it by down grade the cuda version from 12 to 11, and install the gcc 9.

jamzhou avatar Jul 03 '24 09:07 jamzhou