前提・実現したいこと
スケッチGANを実行していた際に、下記のエラーが発生しました。
解決方法を提案していただきたいです。
発生している問題・エラーメッセージ
raceback (most recent call last): File "/home/a/libraries/anaconda3/envs/gan/lib/python3.6/site-packages/torch/utils/cpp_extension.py", line 946, in _build_extension_module check=True) File "/home/a/libraries/anaconda3/envs/gan/lib/python3.6/subprocess.py", line 438, in run output=stdout, stderr=stderr) subprocess.CalledProcessError: Command '['ninja', '-v']' returned non-zero exit status 1. During handling of the above exception, another exception occurred: Traceback (most recent call last): File "generate.py", line 8, in <module> from training.networks.stylegan2 import Generator File "/home/a/GANSketching/training/networks/__init__.py", line 2, in <module> from .misc import * File "/home/a/GANSketching/training/networks/misc.py", line 1, in <module> from . import stylegan2 File "/home/a/GANSketching/training/networks/stylegan2.py", line 8, in <module> from .op import FusedLeakyReLU, fused_leaky_relu, upfirdn2d File "/home/a/GANSketching/training/networks/op/__init__.py", line 1, in <module> from .fused_act import FusedLeakyReLU, fused_leaky_relu File "/home/a/GANSketching/training/networks/op/fused_act.py", line 15, in <module> os.path.join(module_path, "fused_bias_act_kernel.cu"), File "/home/a/libraries/anaconda3/envs/gan/lib/python3.6/site-packages/torch/utils/cpp_extension.py", line 645, in load is_python_module) File "/home/a/libraries/anaconda3/envs/gan/lib/python3.6/site-packages/torch/utils/cpp_extension.py", line 814, in _jit_compile with_cuda=with_cuda) File "/home/a/libraries/anaconda3/envs/gan/lib/python3.6/site-packages/torch/utils/cpp_extension.py", line 863, in _write_ninja_file_and_build _build_extension_module(name, build_directory, verbose) File "/home/a/libraries/anaconda3/envs/gan/lib/python3.6/site-packages/torch/utils/cpp_extension.py", line 959, in _build_extension_module raise RuntimeError(message) RuntimeError: Error building extension 'fused': [1/3] /usr/local/cuda/bin/nvcc -DTORCH_EXTENSION_NAME=fused -DTORCH_API_INCLUDE_EXTENSION_H -isystem /home/a/libraries/anaconda3/envs/gan/lib/python3.6/site-packages/torch/lib/include -isystem /home/a/libraries/anaconda3/envs/gan/lib/python3.6/site-packages/torch/lib/include/torch/csrc/api/include -isystem /home/a/libraries/anaconda3/envs/gan/lib/python3.6/site-packages/torch/lib/include/TH -isystem /home/a/libraries/anaconda3/envs/gan/lib/python3.6/site-packages/torch/lib/include/THC -isystem /usr/local/cuda/include -isystem /home/a/libraries/anaconda3/envs/gan/include/python3.6m -D_GLIBCXX_USE_CXX11_ABI=0 -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --compiler-options '-fPIC' -std=c++11 -c /home/a/GANSketching/training/networks/op/fused_bias_act_kernel.cu -o fused_bias_act_kernel.cuda.o FAILED: fused_bias_act_kernel.cuda.o /usr/local/cuda/bin/nvcc -DTORCH_EXTENSION_NAME=fused -DTORCH_API_INCLUDE_EXTENSION_H -isystem /home/a/libraries/anaconda3/envs/gan/lib/python3.6/site-packages/torch/lib/include -isystem /home/a/libraries/anaconda3/envs/gan/lib/python3.6/site-packages/torch/lib/include/torch/csrc/api/include -isystem /home/a/libraries/anaconda3/envs/gan/lib/python3.6/site-packages/torch/lib/include/TH -isystem /home/a/libraries/anaconda3/envs/gan/lib/python3.6/site-packages/torch/lib/include/THC -isystem /usr/local/cuda/include -isystem /home/a/libraries/anaconda3/envs/gan/include/python3.6m -D_GLIBCXX_USE_CXX11_ABI=0 -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --compiler-options '-fPIC' -std=c++11 -c /home/a/GANSketching/training/networks/op/fused_bias_act_kernel.cu -o fused_bias_act_kernel.cuda.o nvcc warning : The 'compute_20', 'sm_20', and 'sm_21' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning). /home/a/GANSketching/training/networks/op/fused_bias_act_kernel.cu(79): error: no suitable constructor exists to convert from "c10::ScalarType" to "at::Type" 37 errors detected in the compilation of "/tmp/tmpxft_00002e54_00000000-7_fused_bias_act_kernel.cpp1.ii". [2/3] c++ -MMD -MF fused_bias_act.o.d -DTORCH_EXTENSION_NAME=fused -DTORCH_API_INCLUDE_EXTENSION_H -isystem /home/a/libraries/anaconda3/envs/gan/lib/python3.6/site-packages/torch/lib/include -isystem /home/a/libraries/anaconda3/envs/gan/lib/python3.6/site-packages/torch/lib/include/torch/csrc/api/include -isystem /home/a/libraries/anaconda3/envs/gan/lib/python3.6/site-packages/torch/lib/include/TH -isystem /home/a/libraries/anaconda3/envs/gan/lib/python3.6/site-packages/torch/lib/include/THC -isystem /usr/local/cuda/include -isystem /home/a/libraries/anaconda3/envs/gan/include/python3.6m -D_GLIBCXX_USE_CXX11_ABI=0 -fPIC -std=c++11 -c /home/a/GANSketching/training/networks/op/fused_bias_act.cpp -o fused_bias_act.o FAILED: fused_bias_act.o c++ -MMD -MF fused_bias_act.o.d -DTORCH_EXTENSION_NAME=fused -DTORCH_API_INCLUDE_EXTENSION_H -isystem /home/a/libraries/anaconda3/envs/gan/lib/python3.6/site-packages/torch/lib/include -isystem /home/a/libraries/anaconda3/envs/gan/lib/python3.6/site-packages/torch/lib/include/torch/csrc/api/include -isystem /home/a/libraries/anaconda3/envs/gan/lib/python3.6/site-packages/torch/lib/include/TH -isystem /home/a/libraries/anaconda3/envs/gan/lib/python3.6/site-packages/torch/lib/include/THC -isystem /usr/local/cuda/include -isystem /home/a/libraries/anaconda3/envs/gan/include/python3.6m -D_GLIBCXX_USE_CXX11_ABI=0 -fPIC -std=c++11 -c /home/a/GANSketching/training/networks/op/fused_bias_act.cpp -o fused_bias_act.o /home/a/GANSketching/training/networks/op/fused_bias_act.cpp: In function ‘at::Tensor fused_bias_act(const at::Tensor&, const at::Tensor&, const at::Tensor&, int, int, float, float)’: /home/a/GANSketching/training/networks/op/fused_bias_act.cpp:7:82: error: ‘TORCH_CHECK’ was not declared in this scope #define CHECK_CUDA(x) TORCH_CHECK(x.type().is_cuda(), #x " must be a CUDA tensor") ^ /home/a/GANSketching/training/networks/op/fused_bias_act.cpp:13:5: note: in expansion of macro ‘CHECK_CUDA’ CHECK_CUDA(input); ^ ninja: build stopped: subcommand failed.
該当のソースコード
python generate.py --ckpt weights/photosketch_standing_cat_noaug.pth --save_dir output/samples_standing_cat
あなたの回答
tips
プレビュー