Can not insta DISO library
phongnhhn92 opened this issue · comments
Hi,
I am trying out the code and I found that I can not install diso in my machine. Any suggestion on how to fix this ?
⚡ ~ pip install ninja diso
Collecting ninja
Using cached ninja-1.11.1.1-py2.py3-none-manylinux1_x86_64.manylinux_2_5_x86_64.whl.metadata (5.3 kB)
Collecting diso
Using cached diso-0.1.4.tar.gz (24 kB)
Preparing metadata (setup.py) ... done
Collecting trimesh (from diso)
Using cached trimesh-4.4.3-py3-none-any.whl.metadata (18 kB)
Requirement already satisfied: numpy>=1.20 in /system/conda/miniconda3/envs/cloudspace/lib/python3.10/site-packages (from trimesh->diso) (1.26.4)
Using cached ninja-1.11.1.1-py2.py3-none-manylinux1_x86_64.manylinux_2_5_x86_64.whl (307 kB)
Using cached trimesh-4.4.3-py3-none-any.whl (695 kB)
Building wheels for collected packages: diso
Building wheel for diso (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [91 lines of output]
sources: ['src/pybind.cpp', 'src/cumc.cu', 'src/cudualmc.cu']
running bdist_wheel
/home/zeus/miniconda3/envs/cloudspace/lib/python3.10/site-packages/torch/utils/cpp_extension.py:500: UserWarning: Attempted to use ninja as the BuildExtension backend but we could not find ninja.. Falling back to using the slow distutils backend.
warnings.warn(msg.format('we could not find ninja.'))
running build
running build_py
creating build
creating build/lib.linux-x86_64-cpython-310
creating build/lib.linux-x86_64-cpython-310/diso
copying diso/__init__.py -> build/lib.linux-x86_64-cpython-310/diso
running build_ext
/home/zeus/miniconda3/envs/cloudspace/lib/python3.10/site-packages/torch/utils/cpp_extension.py:425: UserWarning: There are no g++ version bounds defined for CUDA version 12.1
warnings.warn(f'There are no {compiler_name} version bounds defined for CUDA version {cuda_str_version}')
building 'diso._C' extension
creating build/temp.linux-x86_64-cpython-310
creating build/temp.linux-x86_64-cpython-310/src
/usr/local/cuda/bin/nvcc -DWITH_CUDA -Isrc -I/home/zeus/miniconda3/envs/cloudspace/lib/python3.10/site-packages/torch/include -I/home/zeus/miniconda3/envs/cloudspace/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -I/home/zeus/miniconda3/envs/cloudspace/lib/python3.10/site-packages/torch/include/TH -I/home/zeus/miniconda3/envs/cloudspace/lib/python3.10/site-packages/torch/include/THC -I/usr/local/cuda/include -I/home/zeus/miniconda3/envs/cloudspace/include/python3.10 -c src/cudualmc.cu -o build/temp.linux-x86_64-cpython-310/src/cudualmc.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options '-fPIC' -O3 -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE=\"_gcc\" -DPYBIND11_STDLIB=\"_libstdcpp\" -DPYBIND11_BUILD_ABI=\"_cxxabi1011\" -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_50,code=sm_50 -gencode=arch=compute_60,code=sm_60 -gencode=arch=compute_70,code=sm_70 -gencode=arch=compute_75,code=sm_75 -gencode=arch=compute_80,code=sm_80 -gencode=arch=compute_86,code=sm_86 -gencode=arch=compute_90,code=sm_90 -std=c++17
src/cudualmc.cu(738): error: no instance of overloaded function "atomicAdd" matches the argument list
argument types are: (double *, double)
atomicAdd(&adj_deform[v0].x, adj_p0.x);
^
detected during:
instantiation of "void cudualmc::adjComputeMcVert(cudualmc::CUDualMC<Scalar, IndexType> &, const Scalar *, const cudualmc::Vertex<Scalar> *, IndexType, IndexType, IndexType, int, Scalar, Scalar *, cudualmc::Vertex<Scalar> *, cudualmc::Vertex<Scalar>) [with Scalar=double, IndexType=int]" at line 1002
instantiation of "void cudualmc::adj_create_dmc_verts_kernel(cudualmc::CUDualMC<Scalar, IndexType>, const Scalar *, const cudualmc::Vertex<Scalar> *, Scalar, Scalar *, cudualmc::Vertex<Scalar> *, const cudualmc::Vertex<Scalar> *) [with Scalar=double, IndexType=int]" at line 1137
instantiation of "void cudualmc::CUDualMC<Scalar, IndexType>::backward(const Scalar *, const cudualmc::Vertex<Scalar> *, IndexType, IndexType, IndexType, Scalar, Scalar *, cudualmc::Vertex<Scalar> *, const cudualmc::Vertex<Scalar> *, int) [with Scalar=double, IndexType=int]" at line 1144
src/cudualmc.cu(739): error: no instance of overloaded function "atomicAdd" matches the argument list
argument types are: (double *, double)
atomicAdd(&adj_deform[v0].y, adj_p0.y);
^
detected during:
instantiation of "void cudualmc::adjComputeMcVert(cudualmc::CUDualMC<Scalar, IndexType> &, const Scalar *, const cudualmc::Vertex<Scalar> *, IndexType, IndexType, IndexType, int, Scalar, Scalar *, cudualmc::Vertex<Scalar> *, cudualmc::Vertex<Scalar>) [with Scalar=double, IndexType=int]" at line 1002
instantiation of "void cudualmc::adj_create_dmc_verts_kernel(cudualmc::CUDualMC<Scalar, IndexType>, const Scalar *, const cudualmc::Vertex<Scalar> *, Scalar, Scalar *, cudualmc::Vertex<Scalar> *, const cudualmc::Vertex<Scalar> *) [with Scalar=double, IndexType=int]" at line 1137
instantiation of "void cudualmc::CUDualMC<Scalar, IndexType>::backward(const Scalar *, const cudualmc::Vertex<Scalar> *, IndexType, IndexType, IndexType, Scalar, Scalar *, cudualmc::Vertex<Scalar> *, const cudualmc::Vertex<Scalar> *, int) [with Scalar=double, IndexType=int]" at line 1144
src/cudualmc.cu(740): error: no instance of overloaded function "atomicAdd" matches the argument list
argument types are: (double *, double)
atomicAdd(&adj_deform[v0].z, adj_p0.z);
^
detected during:
instantiation of "void cudualmc::adjComputeMcVert(cudualmc::CUDualMC<Scalar, IndexType> &, const Scalar *, const cudualmc::Vertex<Scalar> *, IndexType, IndexType, IndexType, int, Scalar, Scalar *, cudualmc::Vertex<Scalar> *, cudualmc::Vertex<Scalar>) [with Scalar=double, IndexType=int]" at line 1002
instantiation of "void cudualmc::adj_create_dmc_verts_kernel(cudualmc::CUDualMC<Scalar, IndexType>, const Scalar *, const cudualmc::Vertex<Scalar> *, Scalar, Scalar *, cudualmc::Vertex<Scalar> *, const cudualmc::Vertex<Scalar> *) [with Scalar=double, IndexType=int]" at line 1137
instantiation of "void cudualmc::CUDualMC<Scalar, IndexType>::backward(const Scalar *, const cudualmc::Vertex<Scalar> *, IndexType, IndexType, IndexType, Scalar, Scalar *, cudualmc::Vertex<Scalar> *, const cudualmc::Vertex<Scalar> *, int) [with Scalar=double, IndexType=int]" at line 1144
src/cudualmc.cu(741): error: no instance of overloaded function "atomicAdd" matches the argument list
argument types are: (double *, double)
atomicAdd(&adj_deform[v1].x, adj_p1.x);
^
detected during:
instantiation of "void cudualmc::adjComputeMcVert(cudualmc::CUDualMC<Scalar, IndexType> &, const Scalar *, const cudualmc::Vertex<Scalar> *, IndexType, IndexType, IndexType, int, Scalar, Scalar *, cudualmc::Vertex<Scalar> *, cudualmc::Vertex<Scalar>) [with Scalar=double, IndexType=int]" at line 1002
instantiation of "void cudualmc::adj_create_dmc_verts_kernel(cudualmc::CUDualMC<Scalar, IndexType>, const Scalar *, const cudualmc::Vertex<Scalar> *, Scalar, Scalar *, cudualmc::Vertex<Scalar> *, const cudualmc::Vertex<Scalar> *) [with Scalar=double, IndexType=int]" at line 1137
instantiation of "void cudualmc::CUDualMC<Scalar, IndexType>::backward(const Scalar *, const cudualmc::Vertex<Scalar> *, IndexType, IndexType, IndexType, Scalar, Scalar *, cudualmc::Vertex<Scalar> *, const cudualmc::Vertex<Scalar> *, int) [with Scalar=double, IndexType=int]" at line 1144
src/cudualmc.cu(742): error: no instance of overloaded function "atomicAdd" matches the argument list
argument types are: (double *, double)
atomicAdd(&adj_deform[v1].y, adj_p1.y);
^
detected during:
instantiation of "void cudualmc::adjComputeMcVert(cudualmc::CUDualMC<Scalar, IndexType> &, const Scalar *, const cudualmc::Vertex<Scalar> *, IndexType, IndexType, IndexType, int, Scalar, Scalar *, cudualmc::Vertex<Scalar> *, cudualmc::Vertex<Scalar>) [with Scalar=double, IndexType=int]" at line 1002
instantiation of "void cudualmc::adj_create_dmc_verts_kernel(cudualmc::CUDualMC<Scalar, IndexType>, const Scalar *, const cudualmc::Vertex<Scalar> *, Scalar, Scalar *, cudualmc::Vertex<Scalar> *, const cudualmc::Vertex<Scalar> *) [with Scalar=double, IndexType=int]" at line 1137
instantiation of "void cudualmc::CUDualMC<Scalar, IndexType>::backward(const Scalar *, const cudualmc::Vertex<Scalar> *, IndexType, IndexType, IndexType, Scalar, Scalar *, cudualmc::Vertex<Scalar> *, const cudualmc::Vertex<Scalar> *, int) [with Scalar=double, IndexType=int]" at line 1144
src/cudualmc.cu(743): error: no instance of overloaded function "atomicAdd" matches the argument list
argument types are: (double *, double)
atomicAdd(&adj_deform[v1].z, adj_p1.z);
^
detected during:
instantiation of "void cudualmc::adjComputeMcVert(cudualmc::CUDualMC<Scalar, IndexType> &, const Scalar *, const cudualmc::Vertex<Scalar> *, IndexType, IndexType, IndexType, int, Scalar, Scalar *, cudualmc::Vertex<Scalar> *, cudualmc::Vertex<Scalar>) [with Scalar=double, IndexType=int]" at line 1002
instantiation of "void cudualmc::adj_create_dmc_verts_kernel(cudualmc::CUDualMC<Scalar, IndexType>, const Scalar *, const cudualmc::Vertex<Scalar> *, Scalar, Scalar *, cudualmc::Vertex<Scalar> *, const cudualmc::Vertex<Scalar> *) [with Scalar=double, IndexType=int]" at line 1137
instantiation of "void cudualmc::CUDualMC<Scalar, IndexType>::backward(const Scalar *, const cudualmc::Vertex<Scalar> *, IndexType, IndexType, IndexType, Scalar, Scalar *, cudualmc::Vertex<Scalar> *, const cudualmc::Vertex<Scalar> *, int) [with Scalar=double, IndexType=int]" at line 1144
src/cudualmc.cu(749): error: no instance of overloaded function "atomicAdd" matches the argument list
argument types are: (double *, double)
atomicAdd(&adj_data[v0], adj_d0);
^
detected during:
instantiation of "void cudualmc::adjComputeMcVert(cudualmc::CUDualMC<Scalar, IndexType> &, const Scalar *, const cudualmc::Vertex<Scalar> *, IndexType, IndexType, IndexType, int, Scalar, Scalar *, cudualmc::Vertex<Scalar> *, cudualmc::Vertex<Scalar>) [with Scalar=double, IndexType=int]" at line 1002
instantiation of "void cudualmc::adj_create_dmc_verts_kernel(cudualmc::CUDualMC<Scalar, IndexType>, const Scalar *, const cudualmc::Vertex<Scalar> *, Scalar, Scalar *, cudualmc::Vertex<Scalar> *, const cudualmc::Vertex<Scalar> *) [with Scalar=double, IndexType=int]" at line 1137
instantiation of "void cudualmc::CUDualMC<Scalar, IndexType>::backward(const Scalar *, const cudualmc::Vertex<Scalar> *, IndexType, IndexType, IndexType, Scalar, Scalar *, cudualmc::Vertex<Scalar> *, const cudualmc::Vertex<Scalar> *, int) [with Scalar=double, IndexType=int]" at line 1144
src/cudualmc.cu(750): error: no instance of overloaded function "atomicAdd" matches the argument list
argument types are: (double *, double)
atomicAdd(&adj_data[v1], adj_d1);
^
detected during:
instantiation of "void cudualmc::adjComputeMcVert(cudualmc::CUDualMC<Scalar, IndexType> &, const Scalar *, const cudualmc::Vertex<Scalar> *, IndexType, IndexType, IndexType, int, Scalar, Scalar *, cudualmc::Vertex<Scalar> *, cudualmc::Vertex<Scalar>) [with Scalar=double, IndexType=int]" at line 1002
instantiation of "void cudualmc::adj_create_dmc_verts_kernel(cudualmc::CUDualMC<Scalar, IndexType>, const Scalar *, const cudualmc::Vertex<Scalar> *, Scalar, Scalar *, cudualmc::Vertex<Scalar> *, const cudualmc::Vertex<Scalar> *) [with Scalar=double, IndexType=int]" at line 1137
instantiation of "void cudualmc::CUDualMC<Scalar, IndexType>::backward(const Scalar *, const cudualmc::Vertex<Scalar> *, IndexType, IndexType, IndexType, Scalar, Scalar *, cudualmc::Vertex<Scalar> *, const cudualmc::Vertex<Scalar> *, int) [with Scalar=double, IndexType=int]" at line 1144
8 errors detected in the compilation of "src/cudualmc.cu".
error: command '/usr/local/cuda/bin/nvcc' failed with exit code 1
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for diso
Running setup.py clean for diso
Failed to build diso
ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (diso)
This is my current evironment:
⚡ ~ python
Python 3.10.10 (main, Mar 21 2023, 18:45:11) [GCC 11.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import torch
>>> torch.__version__
'2.2.1+cu121'
>>> exit()
⚡ ~ nvcc -V
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2023 NVIDIA Corporation
Built on Mon_Apr__3_17:16:06_PDT_2023
Cuda compilation tools, release 12.1, V12.1.105
Build cuda_12.1.r12.1/compiler.32688072_0
Hi @phongnhhn92 ,
The log shows the following error:
error: no instance of overloaded function "atomicAdd" matches the argument list argument types are: (double *, double)
It seems your graphics card might be an older version. You can refer to this link and add your own atomicAdd implementation to see if it works.