First of all, thank you for sharing this project code.
python setup.py build_ext --inplace
generate generated/map_to_list_nn_cpu.cpp
generate generated/map_to_list_nn_cuda.cpp
generate generated/map_to_list_nn_kernel.cu
generate generated/map_to_list_bl_cpu.cpp
generate generated/map_to_list_bl_cuda.cpp
generate generated/map_to_list_bl_kernel.cu
generate generated/map_to_list_bl_seq_cpu.cpp
generate generated/map_to_list_bl_seq_cuda.cpp
generate generated/map_to_list_bl_seq_kernel.cu
generate generated/list_to_map_cpu.cpp
generate generated/list_to_map_cuda.cpp
generate generated/list_to_map_kernel.cu
generate generated/ext_cpu.cpp
generate generated/ext_cuda.cpp
generate generated/ext_kernel.cu
generate generated_ext.py
running build_ext
building 'ext_cpu' extension
creating /home/vig-titan2/PycharmProjects/SVS/StableViewSynthesis/ext/mytorch/build
creating /home/vig-titan2/PycharmProjects/SVS/StableViewSynthesis/ext/mytorch/build/temp.linux-x86_64-3.8
Emitting ninja build file /home/vig-titan2/PycharmProjects/SVS/StableViewSynthesis/ext/mytorch/build/temp.linux-x86_64-3.8/build.ninja...
Compiling objects...
Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N)
[1/1] c++ -MMD -MF /home/vig-titan2/PycharmProjects/SVS/StableViewSynthesis/ext/mytorch/build/temp.linux-x86_64-3.8/ext_cpu.o.d -pthread -B /home/vig-titan2/anaconda3/envs/SVS/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/vig-titan2/anaconda3/envs/SVS/lib/python3.8/site-packages/torch/include -I/home/vig-titan2/anaconda3/envs/SVS/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/home/vig-titan2/anaconda3/envs/SVS/lib/python3.8/site-packages/torch/include/TH -I/home/vig-titan2/anaconda3/envs/SVS/lib/python3.8/site-packages/torch/include/THC -I/home/vig-titan2/PycharmProjects/SVS/StableViewSynthesis/ext/mytorch -I/home/vig-titan2/PycharmProjects/SVS/StableViewSynthesis/ext/mytorch/include -I/home/vig-titan2/PycharmProjects/SVS/StableViewSynthesis/ext/mytorch/generated -I/home/vig-titan2/anaconda3/envs/SVS/include/python3.8 -c -c /home/vig-titan2/PycharmProjects/SVS/StableViewSynthesis/ext/mytorch/ext_cpu.cpp -o /home/vig-titan2/PycharmProjects/SVS/StableViewSynthesis/ext/mytorch/build/temp.linux-x86_64-3.8/ext_cpu.o -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=ext_cpu -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
In file included from /home/vig-titan2/anaconda3/envs/SVS/lib/python3.8/site-packages/torch/include/ATen/Parallel.h:149:0,
from /home/vig-titan2/anaconda3/envs/SVS/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/utils.h:3,
from /home/vig-titan2/anaconda3/envs/SVS/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h:5,
from /home/vig-titan2/anaconda3/envs/SVS/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/nn.h:3,
from /home/vig-titan2/anaconda3/envs/SVS/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/all.h:7,
from /home/vig-titan2/anaconda3/envs/SVS/lib/python3.8/site-packages/torch/include/torch/extension.h:4,
from /home/vig-titan2/PycharmProjects/SVS/StableViewSynthesis/ext/mytorch/include/torch_common.h:3,
from /home/vig-titan2/PycharmProjects/SVS/StableViewSynthesis/ext/mytorch/ext_cpu.cpp:1:
/home/vig-titan2/anaconda3/envs/SVS/lib/python3.8/site-packages/torch/include/ATen/ParallelOpenMP.h:84:0: warning: ignoring #pragma omp parallel [-Wunknown-pragmas]
#pragma omp parallel for if ((end - begin) >= grain_size)
creating build/lib.linux-x86_64-3.8
g++ -pthread -shared -B /home/vig-titan2/anaconda3/envs/SVS/compiler_compat -L/home/vig-titan2/anaconda3/envs/SVS/lib -Wl,-rpath=/home/vig-titan2/anaconda3/envs/SVS/lib -Wl,--no-as-needed -Wl,--sysroot=/ /home/vig-titan2/PycharmProjects/SVS/StableViewSynthesis/ext/mytorch/build/temp.linux-x86_64-3.8/ext_cpu.o -L/home/vig-titan2/anaconda3/envs/SVS/lib/python3.8/site-packages/torch/lib -lc10 -ltorch -ltorch_cpu -ltorch_python -o build/lib.linux-x86_64-3.8/ext_cpu.cpython-38-x86_64-linux-gnu.so
building 'ext_cuda' extension
Emitting ninja build file /home/vig-titan2/PycharmProjects/SVS/StableViewSynthesis/ext/mytorch/build/temp.linux-x86_64-3.8/build.ninja...
Compiling objects...
Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N)
[1/2] c++ -MMD -MF /home/vig-titan2/PycharmProjects/SVS/StableViewSynthesis/ext/mytorch/build/temp.linux-x86_64-3.8/ext_cuda.o.d -pthread -B /home/vig-titan2/anaconda3/envs/SVS/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/vig-titan2/anaconda3/envs/SVS/lib/python3.8/site-packages/torch/include -I/home/vig-titan2/anaconda3/envs/SVS/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/home/vig-titan2/anaconda3/envs/SVS/lib/python3.8/site-packages/torch/include/TH -I/home/vig-titan2/anaconda3/envs/SVS/lib/python3.8/site-packages/torch/include/THC -I/usr/local/cuda-10.1/include -I/home/vig-titan2/PycharmProjects/SVS/StableViewSynthesis/ext/mytorch -I/home/vig-titan2/PycharmProjects/SVS/StableViewSynthesis/ext/mytorch/include -I/home/vig-titan2/PycharmProjects/SVS/StableViewSynthesis/ext/mytorch/generated -I/home/vig-titan2/anaconda3/envs/SVS/include/python3.8 -c -c /home/vig-titan2/PycharmProjects/SVS/StableViewSynthesis/ext/mytorch/ext_cuda.cpp -o /home/vig-titan2/PycharmProjects/SVS/StableViewSynthesis/ext/mytorch/build/temp.linux-x86_64-3.8/ext_cuda.o -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=ext_cuda -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
In file included from /home/vig-titan2/anaconda3/envs/SVS/lib/python3.8/site-packages/torch/include/ATen/Parallel.h:149:0,
from /home/vig-titan2/anaconda3/envs/SVS/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/utils.h:3,
from /home/vig-titan2/anaconda3/envs/SVS/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h:5,
from /home/vig-titan2/anaconda3/envs/SVS/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/nn.h:3,
from /home/vig-titan2/anaconda3/envs/SVS/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/all.h:7,
from /home/vig-titan2/anaconda3/envs/SVS/lib/python3.8/site-packages/torch/include/torch/extension.h:4,
from /home/vig-titan2/PycharmProjects/SVS/StableViewSynthesis/ext/mytorch/include/torch_common.h:3,
from /home/vig-titan2/PycharmProjects/SVS/StableViewSynthesis/ext/mytorch/ext_cuda.cpp:1:
/home/vig-titan2/anaconda3/envs/SVS/lib/python3.8/site-packages/torch/include/ATen/ParallelOpenMP.h:84:0: warning: ignoring #pragma omp parallel [-Wunknown-pragmas]
#pragma omp parallel for if ((end - begin) >= grain_size)
[2/2] /usr/local/cuda-10.1/bin/nvcc -I/home/vig-titan2/anaconda3/envs/SVS/lib/python3.8/site-packages/torch/include -I/home/vig-titan2/anaconda3/envs/SVS/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/home/vig-titan2/anaconda3/envs/SVS/lib/python3.8/site-packages/torch/include/TH -I/home/vig-titan2/anaconda3/envs/SVS/lib/python3.8/site-packages/torch/include/THC -I/usr/local/cuda-10.1/include -I/home/vig-titan2/PycharmProjects/SVS/StableViewSynthesis/ext/mytorch -I/home/vig-titan2/PycharmProjects/SVS/StableViewSynthesis/ext/mytorch/include -I/home/vig-titan2/PycharmProjects/SVS/StableViewSynthesis/ext/mytorch/generated -I/home/vig-titan2/anaconda3/envs/SVS/include/python3.8 -c -c /home/vig-titan2/PycharmProjects/SVS/StableViewSynthesis/ext/mytorch/ext_kernel.cu -o /home/vig-titan2/PycharmProjects/SVS/StableViewSynthesis/ext/mytorch/build/temp.linux-x86_64-3.8/ext_kernel.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -arch=sm_30 -gencode=arch=compute_30,code=sm_30 -gencode=arch=compute_35,code=sm_35 -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=ext_cuda -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14
FAILED: /home/vig-titan2/PycharmProjects/SVS/StableViewSynthesis/ext/mytorch/build/temp.linux-x86_64-3.8/ext_kernel.o
/usr/local/cuda-10.1/bin/nvcc -I/home/vig-titan2/anaconda3/envs/SVS/lib/python3.8/site-packages/torch/include -I/home/vig-titan2/anaconda3/envs/SVS/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/home/vig-titan2/anaconda3/envs/SVS/lib/python3.8/site-packages/torch/include/TH -I/home/vig-titan2/anaconda3/envs/SVS/lib/python3.8/site-packages/torch/include/THC -I/usr/local/cuda-10.1/include -I/home/vig-titan2/PycharmProjects/SVS/StableViewSynthesis/ext/mytorch -I/home/vig-titan2/PycharmProjects/SVS/StableViewSynthesis/ext/mytorch/include -I/home/vig-titan2/PycharmProjects/SVS/StableViewSynthesis/ext/mytorch/generated -I/home/vig-titan2/anaconda3/envs/SVS/include/python3.8 -c -c /home/vig-titan2/PycharmProjects/SVS/StableViewSynthesis/ext/mytorch/ext_kernel.cu -o /home/vig-titan2/PycharmProjects/SVS/StableViewSynthesis/ext/mytorch/build/temp.linux-x86_64-3.8/ext_kernel.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -arch=sm_30 -gencode=arch=compute_30,code=sm_30 -gencode=arch=compute_35,code=sm_35 -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=ext_cuda -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14
/home/vig-titan2/anaconda3/envs/SVS/lib/python3.8/site-packages/torch/include/ATen/record_function.h(18): warning: attribute "visibility" does not apply here
/home/vig-titan2/anaconda3/envs/SVS/lib/python3.8/site-packages/torch/include/torch/csrc/autograd/profiler.h(97): warning: attribute "visibility" does not apply here
/home/vig-titan2/anaconda3/envs/SVS/lib/python3.8/site-packages/torch/include/torch/csrc/autograd/profiler.h(126): warning: attribute "visibility" does not apply here
/home/vig-titan2/anaconda3/envs/SVS/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/enum.h(187): warning: statement is unreachable
/home/vig-titan2/anaconda3/envs/SVS/lib/python3.8/site-packages/torch/include/ATen/record_function.h(18): warning: attribute "visibility" does not apply here
/home/vig-titan2/anaconda3/envs/SVS/lib/python3.8/site-packages/torch/include/torch/csrc/autograd/profiler.h(97): warning: attribute "visibility" does not apply here
/home/vig-titan2/anaconda3/envs/SVS/lib/python3.8/site-packages/torch/include/torch/csrc/autograd/profiler.h(126): warning: attribute "visibility" does not apply here
/home/vig-titan2/anaconda3/envs/SVS/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/enum.h(187): warning: statement is unreachable
/home/vig-titan2/anaconda3/envs/SVS/lib/python3.8/site-packages/torch/include/ATen/record_function.h(18): warning: attribute "visibility" does not apply here
/home/vig-titan2/anaconda3/envs/SVS/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/enum.h(187): warning: statement is unreachable
/home/vig-titan2/anaconda3/envs/SVS/lib/python3.8/site-packages/torch/include/torch/csrc/autograd/profiler.h(97): warning: attribute "visibility" does not apply here
/home/vig-titan2/anaconda3/envs/SVS/lib/python3.8/site-packages/torch/include/torch/csrc/autograd/profiler.h(126): warning: attribute "visibility" does not apply here
/usr/include/c++/7/bits/basic_string.tcc: In instantiation of ‘static std::basic_string<_CharT, _Traits, _Alloc>::_Rep* std::basic_string<_CharT, _Traits, _Alloc>::_Rep::_S_create(std::basic_string<_CharT, _Traits, _Alloc>::size_type, std::basic_string<_CharT, _Traits, _Alloc>::size_type, const _Alloc&) [with _CharT = char16_t; _Traits = std::char_traits<char16_t>; _Alloc = std::allocator<char16_t>; std::basic_string<_CharT, _Traits, _Alloc>::size_type = long unsigned int]’:
/usr/include/c++/7/bits/basic_string.tcc:578:28: required from ‘static _CharT* std::basic_string<_CharT, _Traits, _Alloc>::_S_construct(_InIterator, _InIterator, const _Alloc&, std::forward_iterator_tag) [with _FwdIterator = const char16_t*; _CharT = char16_t; _Traits = std::char_traits<char16_t>; _Alloc = std::allocator<char16_t>]’
/usr/include/c++/7/bits/basic_string.h:5042:20: required from ‘static _CharT* std::basic_string<_CharT, _Traits, _Alloc>::_S_construct_aux(_InIterator, _InIterator, const _Alloc&, std::__false_type) [with _InIterator = const char16_t*; _CharT = char16_t; _Traits = std::char_traits<char16_t>; _Alloc = std::allocator<char16_t>]’
/usr/include/c++/7/bits/basic_string.h:5063:24: required from ‘static _CharT* std::basic_string<_CharT, _Traits, _Alloc>::_S_construct(_InIterator, _InIterator, const _Alloc&) [with _InIterator = const char16_t*; _CharT = char16_t; _Traits = std::char_traits<char16_t>; _Alloc = std::allocator<char16_t>]’
/usr/include/c++/7/bits/basic_string.tcc:656:134: required from ‘std::basic_string<_CharT, _Traits, _Alloc>::basic_string(const _CharT*, std::basic_string<_CharT, _Traits, _Alloc>::size_type, const _Alloc&) [with _CharT = char16_t; _Traits = std::char_traits<char16_t>; _Alloc = std::allocator<char16_t>; std::basic_string<_CharT, _Traits, _Alloc>::size_type = long unsigned int]’
/usr/include/c++/7/bits/basic_string.h:6688:95: required from here
/usr/include/c++/7/bits/basic_string.tcc:1067:16: error: cannot call member function ‘void std::basic_string<_CharT, _Traits, _Alloc>::_Rep::_M_set_sharable() [with _CharT = char16_t; _Traits = std::char_traits<char16_t>; _Alloc = std::allocator<char16_t>]’ without object
__p->_M_set_sharable();
~~~~~~~~~^~
/usr/include/c++/7/bits/basic_string.tcc: In instantiation of ‘static std::basic_string<_CharT, _Traits, _Alloc>::_Rep* std::basic_string<_CharT, _Traits, _Alloc>::_Rep::_S_create(std::basic_string<_CharT, _Traits, _Alloc>::size_type, std::basic_string<_CharT, _Traits, _Alloc>::size_type, const _Alloc&) [with _CharT = char32_t; _Traits = std::char_traits<char32_t>; _Alloc = std::allocator<char32_t>; std::basic_string<_CharT, _Traits, _Alloc>::size_type = long unsigned int]’:
/usr/include/c++/7/bits/basic_string.tcc:578:28: required from ‘static _CharT* std::basic_string<_CharT, _Traits, _Alloc>::_S_construct(_InIterator, _InIterator, const _Alloc&, std::forward_iterator_tag) [with _FwdIterator = const char32_t*; _CharT = char32_t; _Traits = std::char_traits<char32_t>; _Alloc = std::allocator<char32_t>]’
/usr/include/c++/7/bits/basic_string.h:5042:20: required from ‘static _CharT* std::basic_string<_CharT, _Traits, _Alloc>::_S_construct_aux(_InIterator, _InIterator, const _Alloc&, std::__false_type) [with _InIterator = const char32_t*; _CharT = char32_t; _Traits = std::char_traits<char32_t>; _Alloc = std::allocator<char32_t>]’
/usr/include/c++/7/bits/basic_string.h:5063:24: required from ‘static _CharT* std::basic_string<_CharT, _Traits, _Alloc>::_S_construct(_InIterator, _InIterator, const _Alloc&) [with _InIterator = const char32_t*; _CharT = char32_t; _Traits = std::char_traits<char32_t>; _Alloc = std::allocator<char32_t>]’
/usr/include/c++/7/bits/basic_string.tcc:656:134: required from ‘std::basic_string<_CharT, _Traits, _Alloc>::basic_string(const _CharT*, std::basic_string<_CharT, _Traits, _Alloc>::size_type, const _Alloc&) [with _CharT = char32_t; _Traits = std::char_traits<char32_t>; _Alloc = std::allocator<char32_t>; std::basic_string<_CharT, _Traits, _Alloc>::size_type = long unsigned int]’
/usr/include/c++/7/bits/basic_string.h:6693:95: required from here
/usr/include/c++/7/bits/basic_string.tcc:1067:16: error: cannot call member function ‘void std::basic_string<_CharT, _Traits, _Alloc>::_Rep::_M_set_sharable() [with _CharT = char32_t; _Traits = std::char_traits<char32_t>; _Alloc = std::allocator<char32_t>]’ without object
ninja: build stopped: subcommand failed.
Traceback (most recent call last):
File "/home/vig-titan2/anaconda3/envs/SVS/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1509, in _run_ninja_build
subprocess.run(
File "/home/vig-titan2/anaconda3/envs/SVS/lib/python3.8/subprocess.py", line 512, in run
raise CalledProcessError(retcode, process.args,
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 "setup.py", line 226, in
setup(
File "/home/vig-titan2/anaconda3/envs/SVS/lib/python3.8/site-packages/setuptools/init.py", line 153, in setup
return distutils.core.setup(**attrs)
File "/home/vig-titan2/anaconda3/envs/SVS/lib/python3.8/distutils/core.py", line 148, in setup
dist.run_commands()
File "/home/vig-titan2/anaconda3/envs/SVS/lib/python3.8/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/home/vig-titan2/anaconda3/envs/SVS/lib/python3.8/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/home/vig-titan2/anaconda3/envs/SVS/lib/python3.8/site-packages/setuptools/command/build_ext.py", line 79, in run
_build_ext.run(self)
File "/home/vig-titan2/anaconda3/envs/SVS/lib/python3.8/distutils/command/build_ext.py", line 340, in run
self.build_extensions()
File "/home/vig-titan2/anaconda3/envs/SVS/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 649, in build_extensions
build_ext.build_extensions(self)
File "/home/vig-titan2/anaconda3/envs/SVS/lib/python3.8/distutils/command/build_ext.py", line 449, in build_extensions
self._build_extensions_serial()
File "/home/vig-titan2/anaconda3/envs/SVS/lib/python3.8/distutils/command/build_ext.py", line 474, in _build_extensions_serial
self.build_extension(ext)
File "/home/vig-titan2/anaconda3/envs/SVS/lib/python3.8/site-packages/setuptools/command/build_ext.py", line 196, in build_extension
_build_ext.build_extension(self, ext)
File "/home/vig-titan2/anaconda3/envs/SVS/lib/python3.8/distutils/command/build_ext.py", line 528, in build_extension
objects = self.compiler.compile(sources,
File "/home/vig-titan2/anaconda3/envs/SVS/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 469, in unix_wrap_ninja_compile
_write_ninja_file_and_compile_objects(
File "/home/vig-titan2/anaconda3/envs/SVS/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1228, in _write_ninja_file_and_compile_objects
_run_ninja_build(
File "/home/vig-titan2/anaconda3/envs/SVS/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1529, in _run_ninja_build
raise RuntimeError(message)
RuntimeError: Error compiling objects for extension
It's ubuntu 18.04 and cuda 10.1 on pytorch 1.6. I followed the instructions, but I got this error. Can someone help me?