-
-
Notifications
You must be signed in to change notification settings - Fork 112
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
RuntimeError: Error building extension 'inplace_abn' #24
Comments
Same error here, Ubuntu 18.04 edit: I have tried both on python 3.6 and 3.7 |
Downgrading |
Same error here ( I have 4 errors showing) Ubuntu: 16.04 /opt/anaconda3/lib/python3.6/site-packages/torch/utils/cpp_extension.py:114: UserWarning:
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! See https://gist.github.com/goldsborough/d466f43e8ffc948ff92de7486c5216d6
warnings.warn(ABI_INCOMPATIBILITY_WARNING.format(compiler)) CalledProcessError Traceback (most recent call last) /opt/anaconda3/lib/python3.6/subprocess.py in check_output(timeout, *popenargs, **kwargs) /opt/anaconda3/lib/python3.6/subprocess.py in run(input, timeout, check, *popenargs, **kwargs) CalledProcessError: Command '['ninja', '-v']' returned non-zero exit status 1. During handling of the above exception, another exception occurred: RuntimeError Traceback (most recent call last) ~/TernausNetV2/models/ternausnet2.py in ~/TernausNetV2/modules/bn.py in ~/TernausNetV2/modules/functions.py in /opt/anaconda3/lib/python3.6/site-packages/torch/utils/cpp_extension.py in load(name, sources, extra_cflags, extra_cuda_cflags, extra_ldflags, extra_include_paths, build_directory, verbose, with_cuda) /opt/anaconda3/lib/python3.6/site-packages/torch/utils/cpp_extension.py in _jit_compile(name, sources, extra_cflags, extra_cuda_cflags, extra_ldflags, extra_include_paths, build_directory, verbose, with_cuda) /opt/anaconda3/lib/python3.6/site-packages/torch/utils/cpp_extension.py in _build_extension_module(name, build_directory) RuntimeError: Error building extension 'inplace_abn': [1/4] /opt/anaconda3/lib/python3.6/site-packages/torch/cuda/bin/nvcc -DTORCH_EXTENSION_NAME=inplace_abn -I/opt/anaconda3/lib/python3.6/site-packages/torch/lib/include -I/opt/anaconda3/lib/python3.6/site-packages/torch/lib/include/TH -I/opt/anaconda3/lib/python3.6/site-packages/torch/lib/include/THC -I/opt/anaconda3/lib/python3.6/site-packages/torch/cuda/include -I/opt/anaconda3/include/python3.6m --compiler-options '-fPIC' --expt-extended-lambda -std=c++11 -c /home/ubuntu/TernausNetV2/modules/src/inplace_abn_cuda.cu -o inplace_abn_cuda.cuda.o |
Anyone happen to encounter the same problem? My envrionment:
Ubuntu 16.04
Torch 1.0
ninja 1.8.2.post2
cuda 9.2
RuntimeError: Error building extension 'inplace_abn': [1/3] c++ -MMD -MF inplace_abn_cpu.o.d -DTORCH_EXTENSION_NAME=inplace_abn -DTORCH_API_INCLUDE_EXTENSION_H -isystem /usr/local/lib/python3.5/dist-packages/torch/lib/include -isystem /usr/local/lib/python3.5/dist-packages/torch/lib/include/torch/csrc/api/include -isystem /usr/local/lib/python3.5/dist-packages/torch/lib/include/TH -isystem /usr/local/lib/python3.5/dist-packages/torch/lib/include/THC -isystem /usr/local/cuda/include -isystem /usr/include/python3.5m -D_GLIBCXX_USE_CXX11_ABI=0 -fPIC -std=c++11 -O3 -c /home/zhizhang77/ref_projects/TernausNetV2/modules/src/inplace_abn_cpu.cpp -o inplace_abn_cpu.o
FAILED: inplace_abn_cpu.o
c++ -MMD -MF inplace_abn_cpu.o.d -DTORCH_EXTENSION_NAME=inplace_abn -DTORCH_API_INCLUDE_EXTENSION_H -isystem /usr/local/lib/python3.5/dist-packages/torch/lib/include -isystem /usr/local/lib/python3.5/dist-packages/torch/lib/include/torch/csrc/api/include -isystem /usr/local/lib/python3.5/dist-packages/torch/lib/include/TH -isystem /usr/local/lib/python3.5/dist-packages/torch/lib/include/THC -isystem /usr/local/cuda/include -isystem /usr/include/python3.5m -D_GLIBCXX_USE_CXX11_ABI=0 -fPIC -std=c++11 -O3 -c /home/zhizhang77/ref_projects/TernausNetV2/modules/src/inplace_abn_cpu.cpp -o inplace_abn_cpu.o
/home/zhizhang77/ref_projects/TernausNetV2/modules/src/inplace_abn_cpu.cpp: In function ‘std::vectorat::Tensor backward_cpu(at::Tensor, at::Tensor, at::Tensor, at::Tensor, at::Tensor, at::Tensor, at::Tensor, bool, float)’:
/home/zhizhang77/ref_projects/TernausNetV2/modules/src/inplace_abn_cpu.cpp:82:34: error: could not convert ‘z.at::Tensor::type()’ from ‘at::Type’ to ‘c10::IntList {aka c10::ArrayRef}’
auto dweight = at::empty(z.type(), {0});
^
/home/zhizhang77/ref_projects/TernausNetV2/modules/src/inplace_abn_cpu.cpp:83:32: error: could not convert ‘z.at::Tensor::type()’ from ‘at::Type’ to ‘c10::IntList {aka c10::ArrayRef}’
auto dbias = at::empty(z.type(), {0});
^
/home/zhizhang77/ref_projects/TernausNetV2/modules/src/inplace_abn_cpu.cpp:89:29: error: could not convert ‘{dx, dweight, dbias}’ from ‘’ to ‘std::vectorat::Tensor’
return {dx, dweight, dbias};
^
[2/3] /usr/local/cuda/bin/nvcc -DTORCH_EXTENSION_NAME=inplace_abn -DTORCH_API_INCLUDE_EXTENSION_H -isystem /usr/local/lib/python3.5/dist-packages/torch/lib/include -isystem /usr/local/lib/python3.5/dist-packages/torch/lib/include/torch/csrc/api/include -isystem /usr/local/lib/python3.5/dist-packages/torch/lib/include/TH -isystem /usr/local/lib/python3.5/dist-packages/torch/lib/include/THC -isystem /usr/local/cuda/include -isystem /usr/include/python3.5m -D_GLIBCXX_USE_CXX11_ABI=0 -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --compiler-options '-fPIC' --expt-extended-lambda -std=c++11 -c /home/zhizhang77/ref_projects/TernausNetV2/modules/src/inplace_abn_cuda.cu -o inplace_abn_cuda.cuda.o
FAILED: inplace_abn_cuda.cuda.o
/usr/local/cuda/bin/nvcc -DTORCH_EXTENSION_NAME=inplace_abn -DTORCH_API_INCLUDE_EXTENSION_H -isystem /usr/local/lib/python3.5/dist-packages/torch/lib/include -isystem /usr/local/lib/python3.5/dist-packages/torch/lib/include/torch/csrc/api/include -isystem /usr/local/lib/python3.5/dist-packages/torch/lib/include/TH -isystem /usr/local/lib/python3.5/dist-packages/torch/lib/include/THC -isystem /usr/local/cuda/include -isystem /usr/include/python3.5m -D_GLIBCXX_USE_CXX11_ABI=0 -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --compiler-options '-fPIC' --expt-extended-lambda -std=c++11 -c /home/zhizhang77/ref_projects/TernausNetV2/modules/src/inplace_abn_cuda.cu -o inplace_abn_cuda.cuda.o
/home/zhizhang77/ref_projects/TernausNetV2/modules/src/inplace_abn_cuda.cu(99): error: no suitable user-defined conversion from "at::Type" to "c10::IntList" exists
/home/zhizhang77/ref_projects/TernausNetV2/modules/src/inplace_abn_cuda.cu(99): error: no instance of constructor "at::TensorOptions::TensorOptions" matches the argument list
argument types are: (int64_t)
/home/zhizhang77/ref_projects/TernausNetV2/modules/src/inplace_abn_cuda.cu(100): error: no suitable user-defined conversion from "at::Type" to "c10::IntList" exists
/home/zhizhang77/ref_projects/TernausNetV2/modules/src/inplace_abn_cuda.cu(100): error: no instance of constructor "at::TensorOptions::TensorOptions" matches the argument list
argument types are: (int64_t)
/home/zhizhang77/ref_projects/TernausNetV2/modules/src/inplace_abn_cuda.cu(202): error: no suitable user-defined conversion from "at::Type" to "c10::IntList" exists
/home/zhizhang77/ref_projects/TernausNetV2/modules/src/inplace_abn_cuda.cu(202): error: no instance of constructor "at::TensorOptions::TensorOptions" matches the argument list
argument types are: (int64_t)
/home/zhizhang77/ref_projects/TernausNetV2/modules/src/inplace_abn_cuda.cu(203): error: no suitable user-defined conversion from "at::Type" to "c10::IntList" exists
/home/zhizhang77/ref_projects/TernausNetV2/modules/src/inplace_abn_cuda.cu(203): error: no instance of constructor "at::TensorOptions::TensorOptions" matches the argument list
argument types are: (int64_t)
8 errors detected in the compilation of "/tmp/tmpxft_000052c0_00000000-6_inplace_abn_cuda.cpp1.ii".
ninja: build stopped: subcommand failed.
The text was updated successfully, but these errors were encountered: