In installation, when running MMCV_WITH_OPS=1 pip install -e ., I got error as below:
/home/user/anaconda3/envs/gpt4roi/lib/python3.10/site-packages/torch/include/c10/util/hash.h:285:6: note: template argument deduction/substitution failed:
/home/user/anaconda3/envs/gpt4roi/lib/python3.10/site-packages/torch/include/c10/util/hash.h: In substitution of ‘template<class T> decltype ((T::hash(o), size_t())) c10::_hash_detail::dispatch_hash(const T&) [with T = std::shared_ptr<torch::autograd::Node>]’:
/home/user/anaconda3/envs/gpt4roi/lib/python3.10/site-packages/torch/include/c10/util/hash.h:295:39: required from ‘size_t c10::hash<T>::operator()(const T&) const [with T = std::shared_ptr<torch::autograd::Node>; size_t = long unsigned int]’
/home/user/anaconda3/envs/gpt4roi/lib/python3.10/site-packages/torch/include/c10/util/hash.h:354:24: required from ‘size_t c10::_hash_detail::simple_get_hash(const T&) [with T = std::shared_ptr<torch::autograd::Node>; size_t = long unsigned int]’
/home/user/anaconda3/envs/gpt4roi/lib/python3.10/site-packages/torch/include/c10/util/hash.h:314:43: required from ‘size_t c10::hash<std::tuple<_Tps ...> >::tuple_hash<0, Ts ...>::operator()(const std::tuple<_Args1 ...>&) const [with Ts = {const std::shared_ptr<torch::autograd::Node>&, const unsigned int&}; Types = {const std::shared_ptr<torch::autograd::Node>&, const unsigned int&}; size_t = long unsigned int]’
/home/user/anaconda3/envs/gpt4roi/lib/python3.10/site-packages/torch/include/c10/util/hash.h:307:39: required from ‘size_t c10::hash<std::tuple<_Tps ...> >::tuple_hash<idx, Ts>::operator()(const std::tuple<_Args2 ...>&) const [with long unsigned int idx = 1; Ts = {const std::shared_ptr<torch::autograd::Node>&, const unsigned int&}; Types = {const std::shared_ptr<torch::autograd::Node>&, const unsigned int&}; size_t = long unsigned int]’
/home/user/anaconda3/envs/gpt4roi/lib/python3.10/site-packages/torch/include/c10/util/hash.h:319:56: required from ‘size_t c10::hash<std::tuple<_Tps ...> >::operator()(const std::tuple<_Tps ...>&) const [with Types = {const std::shared_ptr<torch::autograd::Node>&, const unsigned int&}; size_t = long unsigned int]’
/home/user/anaconda3/envs/gpt4roi/lib/python3.10/site-packages/torch/include/c10/util/hash.h:368:50: required from ‘size_t c10::get_hash(const Types& ...) [with Types = {std::shared_ptr<torch::autograd::Node>, unsigned int}; size_t = long unsigned int]’
/home/user/anaconda3/envs/gpt4roi/lib/python3.10/site-packages/torch/include/torch/csrc/autograd/edge.h:53:54: required from here
/home/user/anaconda3/envs/gpt4roi/lib/python3.10/site-packages/torch/include/c10/util/hash.h:285:51: error: ‘hash’ is not a member of ‘std::shared_ptr<torch::autograd::Node>’
285 | auto dispatch_hash(const T& o) -> decltype(T::hash(o), size_t()) {
| ~~~~~~~^~~
ninja: build stopped: subcommand failed.
Traceback (most recent call last):
File "/home/user/anaconda3/envs/gpt4roi/lib/python3.10/site-packages/torch/utils/cpp_extension.py", line 2107, in _run_ninja_build
subprocess.run(
File "/home/user/anaconda3/envs/gpt4roi/lib/python3.10/subprocess.py", line 526, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['ninja', '-v', '-j', '4']' returned non-zero exit status 1.
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "/home/user/gpt4roi/mmcv-1.4.7/setup.py", line 391, in <module>
setup(
File "/home/user/anaconda3/envs/gpt4roi/lib/python3.10/site-packages/setuptools/__init__.py", line 104, in setup
return distutils.core.setup(**attrs)
File "/home/user/anaconda3/envs/gpt4roi/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 184, in setup
return run_commands(dist)
File "/home/user/anaconda3/envs/gpt4roi/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 200, in run_commands
dist.run_commands()
File "/home/user/anaconda3/envs/gpt4roi/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
self.run_command(cmd)
File "/home/user/anaconda3/envs/gpt4roi/lib/python3.10/site-packages/setuptools/dist.py", line 967, in run_command
super().run_command(command)
File "/home/user/anaconda3/envs/gpt4roi/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
cmd_obj.run()
File "/home/user/anaconda3/envs/gpt4roi/lib/python3.10/site-packages/setuptools/command/develop.py", line 34, in run
self.install_for_development()
File "/home/user/anaconda3/envs/gpt4roi/lib/python3.10/site-packages/setuptools/command/develop.py", line 111, in install_for_development
self.run_command('build_ext')
File "/home/user/anaconda3/envs/gpt4roi/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 316, in run_command
self.distribution.run_command(command)
File "/home/user/anaconda3/envs/gpt4roi/lib/python3.10/site-packages/setuptools/dist.py", line 967, in run_command
super().run_command(command)
File "/home/user/anaconda3/envs/gpt4roi/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
cmd_obj.run()
File "/home/user/anaconda3/envs/gpt4roi/lib/python3.10/site-packages/setuptools/command/build_ext.py", line 91, in run
_build_ext.run(self)
File "/home/user/anaconda3/envs/gpt4roi/lib/python3.10/site-packages/setuptools/_distutils/command/build_ext.py", line 359, in run
self.build_extensions()
File "/home/user/anaconda3/envs/gpt4roi/lib/python3.10/site-packages/torch/utils/cpp_extension.py", line 870, in build_extensions
build_ext.build_extensions(self)
File "/home/user/anaconda3/envs/gpt4roi/lib/python3.10/site-packages/setuptools/_distutils/command/build_ext.py", line 479, in build_extensions
self._build_extensions_serial()
File "/home/user/anaconda3/envs/gpt4roi/lib/python3.10/site-packages/setuptools/_distutils/command/build_ext.py", line 505, in _build_extensions_serial
self.build_extension(ext)
File "/home/user/anaconda3/envs/gpt4roi/lib/python3.10/site-packages/setuptools/command/build_ext.py", line 252, in build_extension
_build_ext.build_extension(self, ext)
File "/home/user/anaconda3/envs/gpt4roi/lib/python3.10/site-packages/setuptools/_distutils/command/build_ext.py", line 560, in build_extension
objects = self.compiler.compile(
File "/home/user/anaconda3/envs/gpt4roi/lib/python3.10/site-packages/torch/utils/cpp_extension.py", line 683, in unix_wrap_ninja_compile
_write_ninja_file_and_compile_objects(
File "/home/user/anaconda3/envs/gpt4roi/lib/python3.10/site-packages/torch/utils/cpp_extension.py", line 1783, in _write_ninja_file_and_compile_objects
_run_ninja_build(
File "/home/user/anaconda3/envs/gpt4roi/lib/python3.10/site-packages/torch/utils/cpp_extension.py", line 2123, in _run_ninja_build
raise RuntimeError(message) from e
RuntimeError: Error compiling objects for extension
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
does anyone have the same problem and how should this be fix?
(gpt4roi) user@mdeep:~/gpt4roi/mmcv-1.4.7$ nvcc -V
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2022 NVIDIA Corporation
Built on Tue_May__3_18:49:52_PDT_2022
Cuda compilation tools, release 11.7, V11.7.64
Build cuda_11.7.r11.7/compiler.31294372_0
I am using A5000 GPU, and above is my cuda version,
In installation, when running
MMCV_WITH_OPS=1 pip install -e .
, I got error as below:does anyone have the same problem and how should this be fix?
I am using A5000 GPU, and above is my cuda version,