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

Error while set up the environment for Instance Segmentation in Ubuntu 20.04 #29

Open
madanmch opened this issue Mar 24, 2023 · 2 comments

Comments

@madanmch
Copy link

Hi @meidachen

Thanks for the great work.

I am setting up the environment for the Instance Segmentation as per your instructions. I am using Ubuntu 20.04 with Cuda 11.6 support.

Before I ran the python setup.py bdist_wheel command, I exported CUDACXX with "/usr/local/cuda-11.6/bin/nvcc" and ran python setup.py bdist_wheel command.

(hais) spartan@spartan-NUC11BTMi9:~/GitHubCode/STPLS3D/HAIS/lib/spconv$ python setup.py bdist_wheel running bdist_wheel running build running build_py running build_ext /home/spartan/GitHubCode/STPLS3D/HAIS/lib/spconv/build/lib.linux-x86_64-cpython-37 Release -- Caffe2: CUDA detected: 11.6 -- Caffe2: CUDA nvcc is: /usr/local/cuda-11.6/bin/nvcc -- Caffe2: CUDA toolkit directory: /usr/local/cuda-11.6 -- Caffe2: Header version is: 11.6 CMake Warning (dev) at /home/spartan/anaconda3/envs/hais/lib/python3.7/site-packages/cmake/data/share/cmake-3.26/Modules/FindPackageHandleStandardArgs.cmake:438 (message): The package name passed to find_package_handle_standard_args(CUDNN) does not match the name of the calling package (Caffe2). This can lead to problems in calling code that expectsfind_packageresult variables (e.g.,_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
/home/spartan/anaconda3/envs/hais/lib/python3.7/site-packages/torch/share/cmake/Caffe2/public/cuda.cmake:107 (find_package_handle_standard_args)
/home/spartan/anaconda3/envs/hais/lib/python3.7/site-packages/torch/share/cmake/Caffe2/Caffe2Config.cmake:88 (include)
/home/spartan/anaconda3/envs/hais/lib/python3.7/site-packages/torch/share/cmake/Torch/TorchConfig.cmake:40 (find_package)
CMakeLists.txt:23 (find_package)
This warning is for project developers. Use -Wno-dev to suppress it.

-- Found cuDNN: v8.8.1 (include: /usr/local/cuda-11.6/include, library: /usr/local/cuda-11.6/lib64/libcudnn.so)
-- Autodetected CUDA architecture(s): 8.6
-- Added CUDA NVCC flags for: -gencode;arch=compute_86,code=sm_86
CMake Warning (dev) at /home/spartan/anaconda3/envs/hais/lib/python3.7/site-packages/cmake/data/share/cmake-3.26/Modules/FindPackageHandleStandardArgs.cmake:438 (message):
The package name passed to find_package_handle_standard_args (torch) does
not match the name of the calling package (Torch). This can lead to
problems in calling code that expects find_package result variables
(e.g., _FOUND) to follow a certain pattern.
Call Stack (most recent call first):
/home/spartan/anaconda3/envs/hais/lib/python3.7/site-packages/torch/share/cmake/Torch/TorchConfig.cmake:93 (find_package_handle_standard_args)
CMakeLists.txt:23 (find_package)
This warning is for project developers. Use -Wno-dev to suppress it.

-- Found torch: /home/spartan/anaconda3/envs/hais/lib/python3.7/site-packages/torch/lib/libtorch.so
-- Found PythonInterp: /home/spartan/anaconda3/envs/hais/bin/python3.7 (found suitable version "3.7.16", minimum required is "3.7")
-- Found PythonLibs: /home/spartan/anaconda3/envs/hais/lib/libpython3.7m.so
-- Performing Test HAS_CPP14_FLAG
-- Performing Test HAS_CPP14_FLAG - Success
-- pybind11 v2.3.dev0
-- Configuring done (0.6s)
CMake Warning (dev) in src/spconv/CMakeLists.txt:
Policy CMP0104 is not set: CMAKE_CUDA_ARCHITECTURES now detected for NVCC,
empty CUDA_ARCHITECTURES not allowed. Run "cmake --help-policy CMP0104"
for policy details. Use the cmake_policy command to set the policy and
suppress this warning.

CUDA_ARCHITECTURES is empty for target "spconv".
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) in src/spconv/CMakeLists.txt:
Policy CMP0104 is not set: CMAKE_CUDA_ARCHITECTURES now detected for NVCC,
empty CUDA_ARCHITECTURES not allowed. Run "cmake --help-policy CMP0104"
for policy details. Use the cmake_policy command to set the policy and
suppress this warning.

CUDA_ARCHITECTURES is empty for target "spconv".
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning at src/spconv/CMakeLists.txt:1 (add_library):
Cannot generate a safe runtime search path for target spconv because files
in some directories may conflict with libraries in implicit directories:

runtime library [libnvToolsExt.so.1] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
  /usr/local/cuda-11.6/lib64

Some of these libraries may not be found correctly.

CMake Warning (dev) in src/utils/CMakeLists.txt:
Policy CMP0104 is not set: CMAKE_CUDA_ARCHITECTURES now detected for NVCC,
empty CUDA_ARCHITECTURES not allowed. Run "cmake --help-policy CMP0104"
for policy details. Use the cmake_policy command to set the policy and
suppress this warning.

CUDA_ARCHITECTURES is empty for target "spconv_nms".
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) in src/utils/CMakeLists.txt:
Policy CMP0104 is not set: CMAKE_CUDA_ARCHITECTURES now detected for NVCC,
empty CUDA_ARCHITECTURES not allowed. Run "cmake --help-policy CMP0104"
for policy details. Use the cmake_policy command to set the policy and
suppress this warning.

CUDA_ARCHITECTURES is empty for target "spconv_nms".
This warning is for project developers. Use -Wno-dev to suppress it.

-- Generating done (0.0s)
-- Build files have been written to: /home/spartan/GitHubCode/STPLS3D/HAIS/lib/spconv/build/temp.linux-x86_64-cpython-37
[ 7%] Building CUDA object src/utils/CMakeFiles/spconv_nms.dir/nms.cu.o
[ 15%] Building CXX object src/spconv/CMakeFiles/spconv.dir/all.cc.o
[ 23%] Building CUDA object src/spconv/CMakeFiles/spconv.dir/indice.cu.o
[ 30%] Building CXX object src/spconv/CMakeFiles/spconv.dir/indice.cc.o
[ 38%] Linking CUDA shared library /home/spartan/GitHubCode/STPLS3D/HAIS/lib/spconv/build/lib.linux-x86_64-cpython-37/spconv/libspconv_nms.so
[ 38%] Built target spconv_nms
[ 46%] Building CXX object src/spconv/CMakeFiles/spconv.dir/reordering.cc.o
In file included from /home/spartan/GitHubCode/STPLS3D/HAIS/lib/spconv/include/spconv/pool_ops.h:21:0,
from /home/spartan/GitHubCode/STPLS3D/HAIS/lib/spconv/src/spconv/all.cc:16:
/home/spartan/GitHubCode/STPLS3D/HAIS/lib/spconv/include/torch_utils.h: In function ‘void tv::check_torch_dtype(const at::Tensor&)’:
/home/spartan/GitHubCode/STPLS3D/HAIS/lib/spconv/include/torch_utils.h:32:29: error: ‘remove_const_t’ is not a member of ‘std’
auto val = std::is_same<std::remove_const_t, double>::value;
^
/home/spartan/GitHubCode/STPLS3D/HAIS/lib/spconv/include/torch_utils.h:32:29: note: suggested alternative:
In file included from /home/spartan/anaconda3/envs/hais/lib/python3.7/site-packages/torch/include/c10/util/ArrayRef.h:19:0,
from /home/spartan/anaconda3/envs/hais/lib/python3.7/site-packages/torch/include/c10/core/ScalarType.h:3,
from /home/spartan/anaconda3/envs/hais/lib/python3.7/site-packages/torch/include/c10/core/Scalar.h:9,
from /home/spartan/anaconda3/envs/hais/lib/python3.7/site-packages/torch/include/ATen/core/Type.h:8,
from /home/spartan/anaconda3/envs/hais/lib/python3.7/site-packages/torch/include/ATen/Type.h:2,
from /home/spartan/anaconda3/envs/hais/lib/python3.7/site-packages/torch/include/ATen/Context.h:4,
from /home/spartan/anaconda3/envs/hais/lib/python3.7/site-packages/torch/include/ATen/ATen.h:5,
from /home/spartan/anaconda3/envs/hais/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/types.h:3,
from /home/spartan/anaconda3/envs/hais/lib/python3.7/site-packages/torch/include/torch/script.h:3,
from /home/spartan/GitHubCode/STPLS3D/HAIS/lib/spconv/include/spconv/pool_ops.h:20,
from /home/spartan/GitHubCode/STPLS3D/HAIS/lib/spconv/src/spconv/all.cc:16:
/home/spartan/anaconda3/envs/hais/lib/python3.7/site-packages/torch/include/c10/util/C++17.h:39:77: note: ‘c10::guts::remove_const_t’
template using remove_const_t = typename std::remove_const::type;
^
In file included from /home/spartan/GitHubCode/STPLS3D/HAIS/lib/spconv/include/spconv/pool_ops.h:21:0,
from /home/spartan/GitHubCode/STPLS3D/HAIS/lib/spconv/src/spconv/all.cc:16:
/home/spartan/GitHubCode/STPLS3D/HAIS/lib/spconv/include/torch_utils.h:32:29: error: ‘remove_const_t’ is not a member of ‘std’
auto val = std::is_same<std::remove_const_t, double>::value;
^
/home/spartan/GitHubCode/STPLS3D/HAIS/lib/spconv/include/torch_utils.h:32:29: note: suggested alternative:
In file included from /home/spartan/anaconda3/envs/hais/lib/python3.7/site-packages/torch/include/c10/util/ArrayRef.h:19:0,
from /home/spartan/anaconda3/envs/hais/lib/python3.7/site-packages/torch/include/c10/core/ScalarType.h:3,
from /home/spartan/anaconda3/envs/hais/lib/python3.7/site-packages/torch/include/c10/core/Scalar.h:9,
from /home/spartan/anaconda3/envs/hais/lib/python3.7/site-packages/torch/include/ATen/core/Type.h:8,
from /home/spartan/anaconda3/envs/hais/lib/python3.7/site-packages/torch/include/ATen/Type.h:2,
from /home/spartan/anaconda3/envs/hais/lib/python3.7/site-packages/torch/include/ATen/Context.h:4,
from /home/spartan/anaconda3/envs/hais/lib/python3.7/site-packages/torch/include/ATen/ATen.h:5,
from /home/spartan/anaconda3/envs/hais/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/types.h:3,
from /home/spartan/anaconda3/envs/hais/lib/python3.7/site-packages/torch/include/torch/script.h:3,
from /home/spartan/GitHubCode/STPLS3D/HAIS/lib/spconv/include/spconv/pool_ops.h:20,
from /home/spartan/GitHubCode/STPLS3D/HAIS/lib/spconv/src/spconv/all.cc:16:
/home/spartan/anaconda3/envs/hais/lib/python3.7/site-packages/torch/include/c10/util/C++17.h:39:77: note: ‘c10::guts::remove_const_t’
template using remove_const_t = typename std::remove_const::type;
^
In file included from /home/spartan/GitHubCode/STPLS3D/HAIS/lib/spconv/include/spconv/pool_ops.h:21:0,
from /home/spartan/GitHubCode/STPLS3D/HAIS/lib/spconv/src/spconv/all.cc:16:
/home/spartan/GitHubCode/STPLS3D/HAIS/lib/spconv/include/torch_utils.h:32:50: error: wrong number of template arguments (1, should be 2)
auto val = std::is_same<std::remove_const_t, double>::value;
^
In file included from /home/spartan/anaconda3/envs/hais/gcc/include/c++/bits/move.h:57:0,
from /home/spartan/anaconda3/envs/hais/gcc/include/c++/bits/stl_pair.h:59,
from /home/spartan/anaconda3/envs/hais/gcc/include/c++/utility:70,
from /home/spartan/anaconda3/envs/hais/gcc/include/c++/algorithm:60,
from /home/spartan/GitHubCode/STPLS3D/HAIS/lib/spconv/include/tensorview/tensorview.h:16,
from /home/spartan/GitHubCode/STPLS3D/HAIS/lib/spconv/include/spconv/maxpool.h:17,
from /home/spartan/GitHubCode/STPLS3D/HAIS/lib/spconv/include/spconv/pool_ops.h:19,
from /home/spartan/GitHubCode/STPLS3D/HAIS/lib/spconv/src/spconv/all.cc:16:
/home/spartan/anaconda3/envs/hais/gcc/include/c++/type_traits:958:12: note: provided for ‘template<class, class> struct std::is_same’
struct is_same;
^
In file included from /home/spartan/GitHubCode/STPLS3D/HAIS/lib/spconv/include/spconv/pool_ops.h:21:0,
from /home/spartan/GitHubCode/STPLS3D/HAIS/lib/spconv/src/spconv/all.cc:16:
/home/spartan/GitHubCode/STPLS3D/HAIS/lib/spconv/include/torch_utils.h:37:29: error: ‘remove_const_t’ is not a member of ‘std’
auto val = std::is_same<std::remove_const_t, float>::value;
^
In file included from /home/spartan/GitHubCode/STPLS3D/HAIS/lib/spconv/include/spconv/spconv_ops.h:22:0,
from /home/spartan/GitHubCode/STPLS3D/HAIS/lib/spconv/src/spconv/indice.cc:17:
/home/spartan/GitHubCode/STPLS3D/HAIS/lib/spconv/include/torch_utils.h: In function ‘tv::TensorView tv::torch2tv(const at::Tensor&)’:
/home/spartan/GitHubCode/STPLS3D/HAIS/lib/spconv/include/torch_utils.h:64:40: error: ‘remove_const_t’ is not a member of ‘std’
return tv::TensorView(tensor.data<std::remove_const_t>(), shape);
^
/home/spartan/GitHubCode/STPLS3D/HAIS/lib/spconv/include/torch_utils.h:64:40: note: suggested alternative:
In file included from /home/spartan/anaconda3/envs/hais/lib/python3.7/site-packages/torch/include/c10/util/ArrayRef.h:19:0,
from /home/spartan/anaconda3/envs/hais/lib/python3.7/site-packages/torch/include/c10/core/ScalarType.h:3,
from /home/spartan/anaconda3/envs/hais/lib/python3.7/site-packages/torch/include/c10/core/Scalar.h:9,
from /home/spartan/anaconda3/envs/hais/lib/python3.7/site-packages/torch/include/ATen/core/Type.h:8,
from /home/spartan/anaconda3/envs/hais/lib/python3.7/site-packages/torch/include/ATen/Type.h:2,
from /home/spartan/anaconda3/envs/hais/lib/python3.7/site-packages/torch/include/ATen/Context.h:4,
from /home/spartan/anaconda3/envs/hais/lib/python3.7/site-packages/torch/include/ATen/ATen.h:5,
from /home/spartan/anaconda3/envs/hais/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/types.h:3,
from /home/spartan/anaconda3/envs/hais/lib/python3.7/site-packages/torch/include/torch/script.h:3,
from /home/spartan/GitHubCode/STPLS3D/HAIS/lib/spconv/include/spconv/spconv_ops.h:21,
from /home/spartan/GitHubCode/STPLS3D/HAIS/lib/spconv/src/spconv/indice.cc:17:
/home/spartan/anaconda3/envs/hais/lib/python3.7/site-packages/torch/include/c10/util/C++17.h:39:77: note: ‘c10::guts::remove_const_t’
template using remove_const_t = typename std::remove_const::type;
^
In file included from /home/spartan/GitHubCode/STPLS3D/HAIS/lib/spconv/include/spconv/spconv_ops.h:22:0,
from /home/spartan/GitHubCode/STPLS3D/HAIS/lib/spconv/src/spconv/indice.cc:17:
/home/spartan/GitHubCode/STPLS3D/HAIS/lib/spconv/include/torch_utils.h:64:40: error: ‘remove_const_t’ is not a member of ‘std’
return tv::TensorView(tensor.data<std::remove_const_t>(), shape);
^
/home/spartan/GitHubCode/STPLS3D/HAIS/lib/spconv/include/torch_utils.h:64:40: note: suggested alternative:
In file included from /home/spartan/anaconda3/envs/hais/lib/python3.7/site-packages/torch/include/c10/util/ArrayRef.h:19:0,
from /home/spartan/anaconda3/envs/hais/lib/python3.7/site-packages/torch/include/c10/core/ScalarType.h:3,
from /home/spartan/anaconda3/envs/hais/lib/python3.7/site-packages/torch/include/c10/core/Scalar.h:9,
from /home/spartan/anaconda3/envs/hais/lib/python3.7/site-packages/torch/include/ATen/core/Type.h:8,
from /home/spartan/anaconda3/envs/hais/lib/python3.7/site-packages/torch/include/ATen/Type.h:2,
from /home/spartan/anaconda3/envs/hais/lib/python3.7/site-packages/torch/include/ATen/Context.h:4,
from /home/spartan/anaconda3/envs/hais/lib/python3.7/site-packages/torch/include/ATen/ATen.h:5,
from /home/spartan/anaconda3/envs/hais/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/types.h:3,
from /home/spartan/anaconda3/envs/hais/lib/python3.7/site-packages/torch/include/torch/script.h:3,
from /home/spartan/GitHubCode/STPLS3D/HAIS/lib/spconv/include/spconv/spconv_ops.h:21,
from /home/spartan/GitHubCode/STPLS3D/HAIS/lib/spconv/src/spconv/indice.cc:17:
/home/spartan/anaconda3/envs/hais/lib/python3.7/site-packages/torch/include/c10/util/C++17.h:39:77: note: ‘c10::guts::remove_const_t’
template using remove_const_t = typename std::remove_const::type;
^
In file included from /home/spartan/GitHubCode/STPLS3D/HAIS/lib/spconv/include/spconv/spconv_ops.h:22:0,
from /home/spartan/GitHubCode/STPLS3D/HAIS/lib/spconv/src/spconv/indice.cc:17:
/home/spartan/GitHubCode/STPLS3D/HAIS/lib/spconv/include/torch_utils.h:64:35: error: parse error in template argument list
return tv::TensorView(tensor.data<std::remove_const_t>(), shape);
^
/home/spartan/GitHubCode/STPLS3D/HAIS/lib/spconv/include/torch_utils.h:64:27: error: expected primary-expression before ‘(’ token
return tv::TensorView(tensor.data<std::remove_const_t>(), shape);
^
/home/spartan/GitHubCode/STPLS3D/HAIS/lib/spconv/include/torch_utils.h:64:64: error: expected primary-expression before ‘)’ token
return tv::TensorView(tensor.data<std::remove_const_t>(), shape);
^
make[2]: *** [src/spconv/CMakeFiles/spconv.dir/build.make:90: src/spconv/CMakeFiles/spconv.dir/indice.cc.o] Error 1
make[2]: *** Waiting for unfinished jobs....
[ 53%] Building CXX object src/utils/CMakeFiles/spconv_utils.dir/all.cc.o
make[2]: *** [src/spconv/CMakeFiles/spconv.dir/build.make:76: src/spconv/CMakeFiles/spconv.dir/all.cc.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:136: src/spconv/CMakeFiles/spconv.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 61%] Linking CXX shared library /home/spartan/GitHubCode/STPLS3D/HAIS/lib/spconv/build/lib.linux-x86_64-cpython-37/spconv/spconv_utils.cpython-37m-x86_64-linux-gnu.so
[ 61%] Built target spconv_utils
make: *** [Makefile:136: all] Error 2
Traceback (most recent call last):
File "setup.py", line 86, in
zip_safe=False,
File "/home/spartan/anaconda3/envs/hais/lib/python3.7/site-packages/setuptools/init.py", line 87, in setup
return distutils.core.setup(**attrs)
File "/home/spartan/anaconda3/envs/hais/lib/python3.7/site-packages/setuptools/_distutils/core.py", line 185, in setup
return run_commands(dist)
File "/home/spartan/anaconda3/envs/hais/lib/python3.7/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
dist.run_commands()
File "/home/spartan/anaconda3/envs/hais/lib/python3.7/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
self.run_command(cmd)
File "/home/spartan/anaconda3/envs/hais/lib/python3.7/site-packages/setuptools/dist.py", line 1208, in run_command
super().run_command(command)
File "/home/spartan/anaconda3/envs/hais/lib/python3.7/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
cmd_obj.run()
File "/home/spartan/anaconda3/envs/hais/lib/python3.7/site-packages/wheel/bdist_wheel.py", line 325, in run
self.run_command("build")
File "/home/spartan/anaconda3/envs/hais/lib/python3.7/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
self.distribution.run_command(command)
File "/home/spartan/anaconda3/envs/hais/lib/python3.7/site-packages/setuptools/dist.py", line 1208, in run_command
super().run_command(command)
File "/home/spartan/anaconda3/envs/hais/lib/python3.7/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
cmd_obj.run()
File "/home/spartan/anaconda3/envs/hais/lib/python3.7/site-packages/setuptools/_distutils/command/build.py", line 132, in run
self.run_command(cmd_name)
File "/home/spartan/anaconda3/envs/hais/lib/python3.7/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
self.distribution.run_command(command)
File "/home/spartan/anaconda3/envs/hais/lib/python3.7/site-packages/setuptools/dist.py", line 1208, in run_command
super().run_command(command)
File "/home/spartan/anaconda3/envs/hais/lib/python3.7/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
cmd_obj.run()
File "setup.py", line 39, in run
self.build_extension(ext)
File "setup.py", line 70, in build_extension
subprocess.check_call(['cmake', '--build', '.'] + build_args, cwd=self.build_temp)
File "/home/spartan/anaconda3/envs/hais/lib/python3.7/subprocess.py", line 363, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--config', 'Release', '--', '-j4']' returned non-zero exit status 2.
`
Does my environment is missing some packages? Above errors belongs to C++14 and C++17 settings. I have gcc 9.4.0 version installed in the ubuntu and GCC 5.4.0 installed in the hais conda environment.

Thanks for the help.

@meidachen
Copy link
Owner

Hi @madanmch,

I was following the setup from HAIS but didn't meet the problem you mentioned. It may be better to raise this issue in the HAIS repo and the author could provide you with better support there. Sorry for the inconvenience.

@madanmch
Copy link
Author

Thanks for the quick message.

I am checking with the HAIS repo manager.

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