添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

Can't install with CUDA 12.1 #543

@BEE1214

Description

I have two docker containers based on ubuntu 20.04.

  • In first container I need to install Minkowski Engine using pip.
    First I define my graphics card architecture:
  • export TORCH_CUDA_ARCH_LIST="8.9"
    

    And simple pip installation:

    pip install -U  git+https://github.com/NVIDIA/MinkowskiEngine@8f81ae6 -v --install-option="--blas=openblas" --install-option="--force_cuda" --no-deps
    

    But I always get error with thrust

    FAILED: /tmp/pip-req-build-iprqa3__/build/temp.linux-x86_64-3.8/tmp/pip-req-build-iprqa3__/src/coordinate_map_manager.o
        /usr/local/cuda/bin/nvcc  -I/usr/local/lib/python3.8/dist-packages/torch/include -I/usr/local/lib/python3.8/dist-packages/torch/include/torch/csrc/api/include -I/usr/local/lib/python3.8/dist-packages/torch/include/TH -I/usr/local/lib/python3.8/dist-packages/torch/include/THC -I/usr/local/cuda/include -I/tmp/pip-req-build-iprqa3__/src -I/tmp/pip-req-build-iprqa3__/src/3rdparty -I/usr/include/python3.8 -c -c /tmp/pip-req-build-iprqa3__/src/coordinate_map_manager.cu -o /tmp/pip-req-build-iprqa3__/build/temp.linux-x86_64-3.8/tmp/pip-req-build-iprqa3__/src/coordinate_map_manager.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'"'"'' --expt-relaxed-constexpr --expt-extended-lambda -O3 -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1013"' -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=1 -gencode=arch=compute_89,code=sm_89 -std=c++17
        /tmp/pip-req-build-iprqa3__/src/3rdparty/concurrent_unordered_map.cuh(503): error: namespace "thrust" has no member "device"
              return thrust::count_if(thrust::device, m_hashtbl_values, m_hashtbl_values + m_capacity,
    
    ==========System==========
    Linux-5.4.0-149-generic-x86_64-with-glibc2.29
    DISTRIB_ID=Ubuntu
    DISTRIB_RELEASE=20.04
    DISTRIB_CODENAME=focal
    DISTRIB_DESCRIPTION="Ubuntu 20.04.6 LTS"
    3.8.10 (default, Mar 13 2023, 10:26:41) 
    [GCC 9.4.0]
    ==========Pytorch==========
    2.0.0a0+gite9ebda2
    /usr/local/lib/python3.8/dist-packages/torch/cuda/__init__.py:107: UserWarning: CUDA initialization: Unexpected error from cudaGetDeviceCount(). Did you run some cuda functions before calling NumCudaDevices() that might have already set an error? Error 804: forward compatibility was attempted on non supported HW (Triggered internally at /pytorch/c10/cuda/CUDAFunctions.cpp:109.)
      return torch._C._cuda_getDeviceCount() > 0
    torch.cuda.is_available(): False
    ==========NVIDIA-SMI==========
    /usr/bin/nvidia-smi
    Driver Version 525.116.04
    CUDA Version 12.1
    VBIOS Version 95.03.2B.00.77
    Image Version G002.0000.00.03
    GSP Firmware Version N/A
    ==========NVCC==========
    /usr/local/cuda/bin/nvcc
    nvcc: NVIDIA (R) Cuda compiler driver
    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
    ==========CC==========
    /usr/bin/c++
    c++ (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0
    This is free software; see the source for copying conditions.  There is NO
    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
    
  • In second container I have minkowski as submodule to my gitlab project and compiling it with this project.
    When I try to compile my project using cmake I get same thrust error as on pip installation of Minkowski.
    I tried solving this issue by manualy including headers #include <thrust/execution_policy.h> in concurrent_unordered_map.cuh but then i ended up with error.
  • ==========System==========
    Linux-5.4.0-149-generic-x86_64-with-glibc2.29
    DISTRIB_ID=Ubuntu
    DISTRIB_RELEASE=20.04
    DISTRIB_CODENAME=focal
    DISTRIB_DESCRIPTION="Ubuntu 20.04.6 LTS"
    3.8.10 (default, Mar 13 2023, 10:26:41) 
    [GCC 9.4.0]
    ==========Pytorch==========
    torch not installed
    ==========NVIDIA-SMI==========
    /usr/bin/nvidia-smi
    Driver Version 525.116.04
    CUDA Version 12.1
    VBIOS Version 95.03.2B.00.77
    Image Version G002.0000.00.03
    GSP Firmware Version N/A
    ==========NVCC==========
    /usr/local/cuda/bin/nvcc
    nvcc: NVIDIA (R) Cuda compiler driver
    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
    ==========CC==========
    /usr/bin/c++
    c++ (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0
    This is free software; see the source for copying conditions.  There is NO
    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
    ==========MinkowskiEngine==========
    MinkowskiEngine not installed
    

    I do have installed libtorch 2.0.1 in 2nd container.