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

Seems like something wrong with my C++ complier. #23

Open
HauZaakMing opened this issue Jul 27, 2023 · 1 comment
Open

Seems like something wrong with my C++ complier. #23

HauZaakMing opened this issue Jul 27, 2023 · 1 comment

Comments

@HauZaakMing
Copy link

ERROR LOG:
ple/input/faceswap/target.jpg
Traceback (most recent call last):
File "/home/hou/anaconda3/envs/e4s/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1808, in _run_ninja_build
subprocess.run(
File "/home/hou/anaconda3/envs/e4s/lib/python3.8/subprocess.py", line 516, 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 "scripts/face_swap.py", line 16, in
from src.pretrained.gpen.gpen_demo import init_gpen_pretrained_model, GPEN_demo
File "/home/hou/code/e4s-main/src/pretrained/gpen/gpen_demo.py", line 15, in
from src.pretrained.gpen.face_enhancement import FaceEnhancement
File "/home/hou/code/e4s-main/src/pretrained/gpen/face_enhancement.py", line 11, in
from src.pretrained.gpen.face_model.face_gan import FaceGAN
File "/home/hou/code/e4s-main/src/pretrained/gpen/face_model/face_gan.py", line 14, in
from src.pretrained.gpen.face_model.gpen_model import FullGenerator, FullGenerator_SR
File "/home/hou/code/e4s-main/src/pretrained/gpen/face_model/gpen_model.py", line 16, in
from src.pretrained.gpen.face_model.op import FusedLeakyReLU, fused_leaky_relu, upfirdn2d
File "/home/hou/code/e4s-main/src/pretrained/gpen/face_model/op/init.py", line 1, in
from .fused_act import FusedLeakyReLU, fused_leaky_relu
File "/home/hou/code/e4s-main/src/pretrained/gpen/face_model/op/fused_act.py", line 13, in
fused = load(
File "/home/hou/anaconda3/envs/e4s/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1202, in load
return jit_compile(
File "/home/hou/anaconda3/envs/e4s/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1425, in jit_compile
write_ninja_file_and_build_library(
File "/home/hou/anaconda3/envs/e4s/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1537, in write_ninja_file_and_build_library
run_ninja_build(
File "/home/hou/anaconda3/envs/e4s/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1824, in run_ninja_build
raise RuntimeError(message) from e
RuntimeError: Error building extension 'fused': [1/2] /usr/bin/nvcc -DTORCH_EXTENSION_NAME=fused -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE="gcc" -DPYBIND11_STDLIB="libstdcpp" -DPYBIND11_BUILD_ABI="cxxabi1011" -isystem /home/hou/anaconda3/envs/e4s/lib/python3.8/site-packages/torch/include -isystem /home/hou/anaconda3/envs/e4s/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -isystem /home/hou/anaconda3/envs/e4s/lib/python3.8/site-packages/torch/include/TH -isystem /home/hou/anaconda3/envs/e4s/lib/python3.8/site-packages/torch/include/THC -isystem /home/hou/anaconda3/envs/e4s/include/python3.8 -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_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 --compiler-options '-fPIC' -std=c++14 -c /home/hou/code/e4s-main/src/pretrained/gpen/face_model/op/fused_bias_act_kernel.cu -o fused_bias_act_kernel.cuda.o
FAILED: fused_bias_act_kernel.cuda.o
/usr/bin/nvcc -DTORCH_EXTENSION_NAME=fused -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE="gcc" -DPYBIND11_STDLIB="libstdcpp" -DPYBIND11_BUILD_ABI="cxxabi1011" -isystem /home/hou/anaconda3/envs/e4s/lib/python3.8/site-packages/torch/include -isystem /home/hou/anaconda3/envs/e4s/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -isystem /home/hou/anaconda3/envs/e4s/lib/python3.8/site-packages/torch/include/TH -isystem /home/hou/anaconda3/envs/e4s/lib/python3.8/site-packages/torch/include/THC -isystem /home/hou/anaconda3/envs/e4s/include/python3.8 -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_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 --compiler-options '-fPIC' -std=c++14 -c /home/hou/code/e4s-main/src/pretrained/gpen/face_model/op/fused_bias_act_kernel.cu -o fused_bias_act_kernel.cuda.o
/usr/include/c++/11/bits/std_function.h:435:145: error: parameter packs not expanded with ‘...’:
435 | function(_Functor&& __f)
| ^
/usr/include/c++/11/bits/std_function.h:435:145: note: ‘_ArgTypes’
/usr/include/c++/11/bits/std_function.h:530:146: error: parameter packs not expanded with ‘...’:
530 | operator=(_Functor&& __f)
| ^
/usr/include/c++/11/bits/std_function.h:530:146: note: ‘_ArgTypes’
ninja: build stopped: subcommand failed.

Running environment:
gcc version 10.4.0 (Ubuntu 10.4.0-4ubuntu1~22.04)

@HauZaakMing
Copy link
Author

I use the yml to build my conda environment, but when I run the code It ask for Ninja. So I install one, then this error log comes out.

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

1 participant