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

ninja: build stopped: subcommand failed. #36

Open
Ranking666 opened this issue Apr 26, 2022 · 2 comments
Open

ninja: build stopped: subcommand failed. #36

Ranking666 opened this issue Apr 26, 2022 · 2 comments

Comments

@Ranking666
Copy link

Thank you for your great work here? When I run main.py I got this error.

RuntimeError: Error building extension 'fused': [1/2] /usr/local/cuda-11.2/bin/nvcc -DTORCH_EXTENSION_NAME=fused -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE="gcc" -DPYBIND11_STDLIB="libstdcpp" -DPYBIND11_BUILD_ABI="cxxabi1011" -isystem /home/lhf/data/[/home/lhf/data/anaconda3]/envs/bar/lib/python3.8/site-packages/torch/include -isystem /home/lhf/data/[/home/lhf/data/anaconda3]/envs/bar/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -isystem /home/lhf/data/[/home/lhf/data/anaconda3]/envs/bar/lib/python3.8/site-packages/torch/include/TH -isystem /home/lhf/data/[/home/lhf/data/anaconda3]/envs/bar/lib/python3.8/site-packages/torch/include/THC -isystem /usr/local/cuda-11.2/include -isystem /home/lhf/data/[/home/lhf/data/anaconda3]/envs/bar/include/python3.8 -D_GLIBCXX_USE_CXX11_ABI=0 -D__CUDA_NO_HALF_OPERATORS -D__CUDA_NO_HALF_CONVERSIONS_ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr -gencode=arch=compute_86,code=sm_86 --compiler-options '-fPIC' -std=c++14 -c /media/pc/nvme1n1/lhf/Barbershop/models/stylegan2/op/fused_bias_act_kernel.cu -o fused_bias_act_kernel.cuda.o
FAILED: fused_bias_act_kernel.cuda.o
/usr/local/cuda-11.2/bin/nvcc -DTORCH_EXTENSION_NAME=fused -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE="gcc" -DPYBIND11_STDLIB="libstdcpp" -DPYBIND11_BUILD_ABI="cxxabi1011" -isystem /home/lhf/data/[/home/lhf/data/anaconda3]/envs/bar/lib/python3.8/site-packages/torch/include -isystem /home/lhf/data/[/home/lhf/data/anaconda3]/envs/bar/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -isystem /home/lhf/data/[/home/lhf/data/anaconda3]/envs/bar/lib/python3.8/site-packages/torch/include/TH -isystem /home/lhf/data/[/home/lhf/data/anaconda3]/envs/bar/lib/python3.8/site-packages/torch/include/THC -isystem /usr/local/cuda-11.2/include -isystem /home/lhf/data/[/home/lhf/data/anaconda3]/envs/bar/include/python3.8 -D_GLIBCXX_USE_CXX11_ABI=0 -D__CUDA_NO_HALF_OPERATORS -D__CUDA_NO_HALF_CONVERSIONS_ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr -gencode=arch=compute_86,code=sm_86 --compiler-options '-fPIC' -std=c++14 -c /media/pc/nvme1n1/lhf/Barbershop/models/stylegan2/op/fused_bias_act_kernel.cu -o fused_bias_act_kernel.cuda.o
/media/pc/nvme1n1/lhf/Barbershop/models/stylegan2/op/fused_bias_act_kernel.cu:7:10: fatal error: torch/types.h: 没有那个文件或目录
#include <torch/types.h>
^~~~~~~~~~~~~~~
compilation terminated.
ninja: build stopped: subcommand failed.

@Zlin0530
Copy link

I have the same problem, have you solved it?

@Zlin0530
Copy link

Well, I have solved it, you can first see if cuda is installed successfully,If the installation is successful, enter ‘’export CUDA_HOME=/usr/local/cuda‘’ at the command line

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

2 participants