NVIDIA / MinkowskiEngine

Minkowski Engine is an auto-diff neural network library for high-dimensional sparse tensors
https://nvidia.github.io/MinkowskiEngine
Other
2.5k stars 369 forks source link

Can't install with CUDA 12.1 #543

Open BEE1214 opened 1 year ago

BEE1214 commented 1 year ago

I have two docker containers based on ubuntu 20.04.

  1. 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
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
==========CC==========
/usr/bin/c++
c++ (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  1. 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
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
==========CC==========
/usr/bin/c++
c++ (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0
Copyright (C) 2019 Free Software Foundation, Inc.
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.

crypdick commented 1 year ago

I'm having the same issue

GdMacmillan commented 1 year ago

I am also experiencing this issue

soCzech commented 1 year ago

I haven't tried compiling it for cuda 12.x but my best bet is that you need to correctly link and include libcu++. I.e., see breaking changes of thrust 2.x. https://github.com/NVIDIA/thrust/releases/tag/2.0.0

kovvas commented 1 year ago

I've also encountered that problem. Ubuntu 22.04, CUDA 12.2, nvcc cuda_12.2.r12.2, PyTorch 2.1.0

I've managed to install it by fixing all errors by adding some headers to 4 files. So you need to download this repo and modify the source code.

1 - .../MinkowskiEngine/src/convolution_kernel.cuh

Add header:
#include <thrust/execution_policy.h>

2 - .../MinkowskiEngine/src/coordinate_map_gpu.cu

Add headers:

#include <thrust/unique.h>
#include <thrust/remove.h>

3 - .../MinkowskiEngine/src/spmm.cu

Add headers:

#include <thrust/execution_policy.h>
#include <thrust/reduce.h> 
#include <thrust/sort.h>

4 - .../MinkowskiEngine/src/3rdparty/concurrent_unordered_map.cuh

Add header: #include <thrust/execution_policy.h>

I'm installing it in venv through python setup.py install

If it is the correct solution may be better to add it to the main readme file about CUDA 12.1+ installation

wzjscut commented 7 months ago

I've also encountered that problem. Ubuntu 22.04, CUDA 12.2, nvcc cuda_12.2.r12.2, PyTorch 2.1.0

It doesn't work in Ubuntu20.04, cuda 12.1, pytorch 2.2.2+cu121

yijing2050 commented 6 months ago

I've also encountered that problem. Ubuntu 22.04, CUDA 12.2, nvcc cuda_12.2.r12.2, PyTorch 2.1.0

I've managed to install it by fixing all errors by adding some headers to 4 files. So you need to download this repo and modify the source code.

1 - .../MinkowskiEngine/src/convolution_kernel.cuh

Add header: #include <thrust/execution_policy.h>

2 - .../MinkowskiEngine/src/coordinate_map_gpu.cu

Add headers:

#include <thrust/unique.h>
#include <thrust/remove.h>

3 - .../MinkowskiEngine/src/spmm.cu

Add headers:

#include <thrust/execution_policy.h>
#include <thrust/reduce.h> 
#include <thrust/sort.h>

4 - .../MinkowskiEngine/src/3rdparty/concurrent_unordered_map.cuh

Add header: #include <thrust/execution_policy.h>

I'm installing it in venv through python setup.py install

If it is the correct solution may be better to add it to the main readme file about CUDA 12.1+ installation

It works for me,my environment is Ubuntu20.04, cuda 12.2, torchvision 0.13,pytorch_lightning 1.6.0, and so on.

kaoutar-elmouh commented 6 months ago

J'ai également rencontré ce problème. Ubuntu 22.04, CUDA 12.2, nvcc cuda_12.2.r12.2, PyTorch 2.1.0

Cela ne fonctionne pas dans Ubuntu20.04, cuda 12.1, pytorch 2.2.2+cu121

The same thing didn't work for me. Have you found a solution?

kaoutar-elmouh commented 6 months ago

J'ai également rencontré ce problème. Ubuntu 22.04, CUDA 12.2, nvcc cuda_12.2.r12.2, PyTorch 2.1.0 J'ai réussi à l'installer en corrigeant toutes les erreurs en ajoutant des en-têtes à 4 fichiers. Vous devez donc télécharger ce dépôt et modifier le code source. 1 - .../MinkowskiEngine/src/convolution_kernel.cuh Ajouter un en-tête :#include <thrust/execution_policy.h> 2 - .../MinkowskiEngine/src/coordonnée_map_gpu.cu Ajouter des en-têtes :

#include <thrust/unique.h>
#include <thrust/remove.h>

3 - .../MinkowskiEngine/src/spmm.cu Ajouter des en-têtes :

#include <thrust/execution_policy.h>
#include <thrust/reduce.h> 
#include <thrust/sort.h>

4 - .../MinkowskiEngine/src/3rdparty/concurrent_unordered_map.cuh Ajouter un en-tête :#include <thrust/execution_policy.h> Je l'installe dans venv viapython setup.py install Si c'est la bonne solution, il est peut-être préférable de l'ajouter au fichier Lisez-moi principal sur l'installation de CUDA 12.1+.

Cela fonctionne pour moi, mon environnement est Ubuntu20.04, cuda 12.2, torchvision 0.13,pytorch_lightning 1.6.0, etc.

Does this work on Google Colab? because ti don't work for me it give me the error: Does this work on Google Colab? Because it doesn't work for me; it gives me an error:

WARNING: Skipping MinkowskiEngine as it is not installed.

| CUDA compilation set |

/content/drive/MyDrive/MinkowskiEngine-master/setup.py:201: DeprecationWarning:

numpy.distutils is deprecated since NumPy 1.23.0, as a result of the deprecation of distutils itself. It will be removed for Python >= 3.12. For older Python versions it will remain present. It is recommended to use setuptools < 60.0 for those Python versions. For more details, see: https://numpy.org/devdocs/reference/distutils_status_migration.html

import numpy.distutils.system_info as sysinfo

Using BLAS=openblas Using the default compiler running install /usr/local/lib/python3.10/dist-packages/setuptools/_distutils/cmd.py:66: SetuptoolsDeprecationWarning: setup.py install is deprecated. !!

    ********************************************************************************
    Please avoid running ``setup.py`` directly.
    Instead, use pypa/build, pypa/installer, pypa/build or
    other standards-based tools.

    See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details.
    ********************************************************************************

!! self.initialize_options() /usr/local/lib/python3.10/dist-packages/setuptools/_distutils/cmd.py:66: EasyInstallDeprecationWarning: easy_install command is deprecated. !!

    ********************************************************************************
    Please avoid running ``setup.py`` and ``easy_install``.
    Instead, use pypa/build, pypa/installer, pypa/build or
    other standards-based tools.

    See https://github.com/pypa/setuptools/issues/917 for details.
    ********************************************************************************

!! self.initialize_options() running bdist_egg running egg_info writing MinkowskiEngine.egg-info/PKG-INFO writing dependency_links to MinkowskiEngine.egg-info/dependency_links.txt writing requirements to MinkowskiEngine.egg-info/requires.txt writing top-level names to MinkowskiEngine.egg-info/top_level.txt /usr/local/lib/python3.10/dist-packages/torch/utils/cpp_extension.py:499: 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.')) reading manifest file 'MinkowskiEngine.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' adding license file 'LICENSE' writing manifest file 'MinkowskiEngine.egg-info/SOURCES.txt' installing library code to build/bdist.linux-x86_64/egg running install_lib running build_py creating build creating build/lib.linux-x86_64-cpython-310 creating build/lib.linux-x86_64-cpython-310/MinkowskiEngine copying ./MinkowskiEngine/MinkowskiPruning.py -> build/lib.linux-x86_64-cpython-310/MinkowskiEngine copying ./MinkowskiEngine/MinkowskiNetwork.py -> build/lib.linux-x86_64-cpython-310/MinkowskiEngine copying ./MinkowskiEngine/MinkowskiSparseTensor.py -> build/lib.linux-x86_64-cpython-310/MinkowskiEngine copying ./MinkowskiEngine/MinkowskiCoordinateManager.py -> build/lib.linux-x86_64-cpython-310/MinkowskiEngine copying ./MinkowskiEngine/sparse_matrix_functions.py -> build/lib.linux-x86_64-cpython-310/MinkowskiEngine copying ./MinkowskiEngine/MinkowskiFunctional.py -> build/lib.linux-x86_64-cpython-310/MinkowskiEngine copying ./MinkowskiEngine/MinkowskiBroadcast.py -> build/lib.linux-x86_64-cpython-310/MinkowskiEngine copying ./MinkowskiEngine/MinkowskiCommon.py -> build/lib.linux-x86_64-cpython-310/MinkowskiEngine copying ./MinkowskiEngine/MinkowskiOps.py -> build/lib.linux-x86_64-cpython-310/MinkowskiEngine copying ./MinkowskiEngine/MinkowskiPooling.py -> build/lib.linux-x86_64-cpython-310/MinkowskiEngine copying ./MinkowskiEngine/MinkowskiNormalization.py -> build/lib.linux-x86_64-cpython-310/MinkowskiEngine copying ./MinkowskiEngine/MinkowskiKernelGenerator.py -> build/lib.linux-x86_64-cpython-310/MinkowskiEngine copying ./MinkowskiEngine/MinkowskiConvolution.py -> build/lib.linux-x86_64-cpython-310/MinkowskiEngine copying ./MinkowskiEngine/MinkowskiTensor.py -> build/lib.linux-x86_64-cpython-310/MinkowskiEngine copying ./MinkowskiEngine/MinkowskiInterpolation.py -> build/lib.linux-x86_64-cpython-310/MinkowskiEngine copying ./MinkowskiEngine/MinkowskiChannelwiseConvolution.py -> build/lib.linux-x86_64-cpython-310/MinkowskiEngine copying ./MinkowskiEngine/MinkowskiTensorField.py -> build/lib.linux-x86_64-cpython-310/MinkowskiEngine copying ./MinkowskiEngine/init.py -> build/lib.linux-x86_64-cpython-310/MinkowskiEngine copying ./MinkowskiEngine/diagnostics.py -> build/lib.linux-x86_64-cpython-310/MinkowskiEngine copying ./MinkowskiEngine/MinkowskiNonlinearity.py -> build/lib.linux-x86_64-cpython-310/MinkowskiEngine copying ./MinkowskiEngine/MinkowskiUnion.py -> build/lib.linux-x86_64-cpython-310/MinkowskiEngine creating build/lib.linux-x86_64-cpython-310/MinkowskiEngine/utils copying ./MinkowskiEngine/utils/coords.py -> build/lib.linux-x86_64-cpython-310/MinkowskiEngine/utils copying ./MinkowskiEngine/utils/init.py -> build/lib.linux-x86_64-cpython-310/MinkowskiEngine/utils copying ./MinkowskiEngine/utils/summary.py -> build/lib.linux-x86_64-cpython-310/MinkowskiEngine/utils copying ./MinkowskiEngine/utils/quantization.py -> build/lib.linux-x86_64-cpython-310/MinkowskiEngine/utils copying ./MinkowskiEngine/utils/gradcheck.py -> build/lib.linux-x86_64-cpython-310/MinkowskiEngine/utils copying ./MinkowskiEngine/utils/init.py -> build/lib.linux-x86_64-cpython-310/MinkowskiEngine/utils copying ./MinkowskiEngine/utils/collation.py -> build/lib.linux-x86_64-cpython-310/MinkowskiEngine/utils creating build/lib.linux-x86_64-cpython-310/MinkowskiEngine/modules copying ./MinkowskiEngine/modules/init.py -> build/lib.linux-x86_64-cpython-310/MinkowskiEngine/modules copying ./MinkowskiEngine/modules/senet_block.py -> build/lib.linux-x86_64-cpython-310/MinkowskiEngine/modules copying ./MinkowskiEngine/modules/resnet_block.py -> build/lib.linux-x86_64-cpython-310/MinkowskiEngine/modules running build_ext /usr/local/lib/python3.10/dist-packages/torch/utils/cpp_extension.py:418: UserWarning: The detected CUDA version (12.2) has a minor version mismatch with the version that was used to compile PyTorch (12.1). Most likely this shouldn't be a problem. warnings.warn(CUDA_MISMATCH_WARN.format(cuda_str_version, torch.version.cuda)) /usr/local/lib/python3.10/dist-packages/torch/utils/cpp_extension.py:428: UserWarning: There are no x86_64-linux-gnu-g++ version bounds defined for CUDA version 12.2 warnings.warn(f'There are no {compiler_name} version bounds defined for CUDA version {cuda_str_version}') building 'MinkowskiEngineBackend._C' extension INFO: C compiler: x86_64-linux-gnu-gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC

creating build/temp.linux-x86_64-cpython-310 creating build/temp.linux-x86_64-cpython-310/content creating build/temp.linux-x86_64-cpython-310/content/drive creating build/temp.linux-x86_64-cpython-310/content/drive/MyDrive creating build/temp.linux-x86_64-cpython-310/content/drive/MyDrive/MinkowskiEngine-master creating build/temp.linux-x86_64-cpython-310/content/drive/MyDrive/MinkowskiEngine-master/src creating build/temp.linux-x86_64-cpython-310/pybind INFO: compile options: '-I/usr/local/lib/python3.10/dist-packages/torch/include -I/usr/local/lib/python3.10/dist-packages/torch/include/torch/csrc/api/include -I/usr/local/lib/python3.10/dist-packages/torch/include/TH -I/usr/local/lib/python3.10/dist-packages/torch/include/THC -I/usr/local/cuda/include -I/content/drive/MyDrive/MinkowskiEngine-master/src -I/content/drive/MyDrive/MinkowskiEngine-master/src/3rdparty -I/usr/include/python3.10 -c' extra options: 'cxx nvcc' /usr/local/lib/python3.10/dist-packages/torch/utils/cpp_extension.py:1967: UserWarning: TORCH_CUDA_ARCH_LIST is not set, all archs for visible cards are included for compilation. If this is not desired, please set os.environ['TORCH_CUDA_ARCH_LIST']. warnings.warn( INFO: nvcc: /content/drive/MyDrive/MinkowskiEngine-master/src/broadcast_gpu.cu INFO: nvcc: /content/drive/MyDrive/MinkowskiEngine-master/src/broadcast_kernel.cu INFO: nvcc: /content/drive/MyDrive/MinkowskiEngine-master/src/convolution_gpu.cu INFO: nvcc: /content/drive/MyDrive/MinkowskiEngine-master/src/convolution_kernel.cu /content/drive/MyDrive/MinkowskiEngine-master/src/convolution_kernel.cu(334): warning #68-D: integer conversion resulted in a change of sign size_t n_active_in_volume, shared_mem_size = -1; ^

Remark: The warnings can be suppressed with "-diag-suppress "

/content/drive/MyDrive/MinkowskiEngine-master/src/convolution_kernel.cu(573): warning #68-D: integer conversion resulted in a change of sign size_t n_active_in_volume, shared_mem_size = -1; ^

/content/drive/MyDrive/MinkowskiEngine-master/src/convolution_kernel.cu(334): warning #68-D: integer conversion resulted in a change of sign size_t n_active_in_volume, shared_mem_size = -1; ^

Remark: The warnings can be suppressed with "-diag-suppress "

/content/drive/MyDrive/MinkowskiEngine-master/src/convolution_kernel.cu(573): warning #68-D: integer conversion resulted in a change of sign size_t n_active_in_volume, shared_mem_size = -1; ^

INFO: nvcc: /content/drive/MyDrive/MinkowskiEngine-master/src/convolution_transpose_gpu.cu INFO: nvcc: /content/drive/MyDrive/MinkowskiEngine-master/src/coordinate_map_gpu.cu /content/drive/MyDrive/MinkowskiEngine-master/src/kernel_region.hpp(428): warning #20014-D: calling a host function from a host device function is not allowed : base_type{other.region_type(), other.coordinate_size(), ^ detected during: instantiation of "minkowski::gpu_kernel_region::gpu_kernel_region(const minkowski::cpu_kernel_region &) [with coordinate_type=int32_t]" at line 627 of /content/drive/MyDrive/MinkowskiEngine-master/src/coordinate_map_gpu.cu instantiation of "minkowski::CoordinateMapGPU<coordinate_type, TemplatedAllocator>::self_type minkowski::CoordinateMapGPU<coordinate_type, TemplatedAllocator>::stride_region(minkowski::cpu_kernel_region &, const minkowski::CoordinateMapGPU<coordinate_type, TemplatedAllocator>::stride_type &) const [with coordinate_type=int32_t, TemplatedAllocator=minkowski::detail::default_allocator]" at line 2462 of /content/drive/MyDrive/MinkowskiEngine-master/src/coordinate_map_gpu.cu

Remark: The warnings can be suppressed with "-diag-suppress "

/content/drive/MyDrive/MinkowskiEngine-master/src/kernel_region.hpp(428): warning #20014-D: calling a host function from a host device function is not allowed : base_type{other.region_type(), other.coordinate_size(), ^ detected during: instantiation of "minkowski::gpu_kernel_region::gpu_kernel_region(const minkowski::cpu_kernel_region &) [with coordinate_type=int32_t]" at line 627 of /content/drive/MyDrive/MinkowskiEngine-master/src/coordinate_map_gpu.cu instantiation of "minkowski::CoordinateMapGPU<coordinate_type, TemplatedAllocator>::self_type minkowski::CoordinateMapGPU<coordinate_type, TemplatedAllocator>::stride_region(minkowski::cpu_kernel_region &, const minkowski::CoordinateMapGPU<coordinate_type, TemplatedAllocator>::stride_type &) const [with coordinate_type=int32_t, TemplatedAllocator=minkowski::detail::default_allocator]" at line 2462 of /content/drive/MyDrive/MinkowskiEngine-master/src/coordinate_map_gpu.cu

/content/drive/MyDrive/MinkowskiEngine-master/src/kernel_region.hpp(428): warning #20014-D: calling a host function from a host device function is not allowed : base_type{other.region_type(), other.coordinate_size(), ^ detected during: instantiation of "minkowski::gpu_kernel_region::gpu_kernel_region(const minkowski::cpu_kernel_region &) [with coordinate_type=int32_t]" at line 627 of /content/drive/MyDrive/MinkowskiEngine-master/src/coordinate_map_gpu.cu instantiation of "minkowski::CoordinateMapGPU<coordinate_type, TemplatedAllocator>::self_type minkowski::CoordinateMapGPU<coordinate_type, TemplatedAllocator>::stride_region(minkowski::cpu_kernel_region &, const minkowski::CoordinateMapGPU<coordinate_type, TemplatedAllocator>::stride_type &) const [with coordinate_type=int32_t, TemplatedAllocator=minkowski::detail::default_allocator]" at line 2462 of /content/drive/MyDrive/MinkowskiEngine-master/src/coordinate_map_gpu.cu

/content/drive/MyDrive/MinkowskiEngine-master/src/kernel_region.hpp(428): warning #20014-D: calling a host function from a host device function is not allowed : base_type{other.region_type(), other.coordinate_size(), ^ detected during: instantiation of "minkowski::gpu_kernel_region::gpu_kernel_region(const minkowski::cpu_kernel_region &) [with coordinate_type=int32_t]" at line 627 of /content/drive/MyDrive/MinkowskiEngine-master/src/coordinate_map_gpu.cu instantiation of "minkowski::CoordinateMapGPU<coordinate_type, TemplatedAllocator>::self_type minkowski::CoordinateMapGPU<coordinate_type, TemplatedAllocator>::stride_region(minkowski::cpu_kernel_region &, const minkowski::CoordinateMapGPU<coordinate_type, TemplatedAllocator>::stride_type &) const [with coordinate_type=int32_t, TemplatedAllocator=minkowski::detail::default_allocator]" at line 2462 of /content/drive/MyDrive/MinkowskiEngine-master/src/coordinate_map_gpu.cu

INFO: nvcc: /content/drive/MyDrive/MinkowskiEngine-master/src/coordinate_map_manager.cu /content/drive/MyDrive/MinkowskiEngine-master/src/coordinate_map_manager.cpp(717): warning #430-D: returning reference to local temporary return detail::empty_map_functor<coordinate_type, TemplatedAllocator, ^ detected during instantiation of "const minkowski::CoordinateMapManager<coordinate_type, coordinate_field_type, TemplatedAllocator, CoordinateMapType>::kernel_map_type &minkowski::CoordinateMapManager<coordinate_type, coordinate_field_type, TemplatedAllocator, CoordinateMapType>::kernel_map(const minkowski::CoordinateMapKey , const minkowski::CoordinateMapKey , const minkowski::CoordinateMapManager<coordinate_type, coordinate_field_type, TemplatedAllocator, CoordinateMapType>::stride_type &, const minkowski::CoordinateMapManager<coordinate_type, coordinate_field_type, TemplatedAllocator, CoordinateMapType>::stride_type &, const minkowski::CoordinateMapManager<coordinate_type, coordinate_field_type, TemplatedAllocator, CoordinateMapType>::stride_type &, minkowski::RegionType::Type, const at::Tensor &, bool, bool) [with coordinate_type=int32_t, coordinate_field_type=float, TemplatedAllocator=std::allocator, CoordinateMapType=minkowski::CoordinateMapCPU]" at line 1451

Remark: The warnings can be suppressed with "-diag-suppress "

/content/drive/MyDrive/MinkowskiEngine-master/src/coordinate_map_manager.cpp(717): warning #430-D: returning reference to local temporary return detail::empty_map_functor<coordinate_type, TemplatedAllocator, ^ detected during instantiation of "const minkowski::CoordinateMapManager<coordinate_type, coordinate_field_type, TemplatedAllocator, CoordinateMapType>::kernel_map_type &minkowski::CoordinateMapManager<coordinate_type, coordinate_field_type, TemplatedAllocator, CoordinateMapType>::kernel_map(const minkowski::CoordinateMapKey , const minkowski::CoordinateMapKey , const minkowski::CoordinateMapManager<coordinate_type, coordinate_field_type, TemplatedAllocator, CoordinateMapType>::stride_type &, const minkowski::CoordinateMapManager<coordinate_type, coordinate_field_type, TemplatedAllocator, CoordinateMapType>::stride_type &, const minkowski::CoordinateMapManager<coordinate_type, coordinate_field_type, TemplatedAllocator, CoordinateMapType>::stride_type &, minkowski::RegionType::Type, const at::Tensor &, bool, bool) [with coordinate_type=int32_t, coordinate_field_type=float, TemplatedAllocator=minkowski::detail::default_allocator, CoordinateMapType=minkowski::CoordinateMapGPU]" at line 401 of /content/drive/MyDrive/MinkowskiEngine-master/src/coordinate_map_manager.cu

/content/drive/MyDrive/MinkowskiEngine-master/src/coordinate_map_manager.cpp(717): warning #430-D: returning reference to local temporary return detail::empty_map_functor<coordinate_type, TemplatedAllocator, ^ detected during instantiation of "const minkowski::CoordinateMapManager<coordinate_type, coordinate_field_type, TemplatedAllocator, CoordinateMapType>::kernel_map_type &minkowski::CoordinateMapManager<coordinate_type, coordinate_field_type, TemplatedAllocator, CoordinateMapType>::kernel_map(const minkowski::CoordinateMapKey , const minkowski::CoordinateMapKey , const minkowski::CoordinateMapManager<coordinate_type, coordinate_field_type, TemplatedAllocator, CoordinateMapType>::stride_type &, const minkowski::CoordinateMapManager<coordinate_type, coordinate_field_type, TemplatedAllocator, CoordinateMapType>::stride_type &, const minkowski::CoordinateMapManager<coordinate_type, coordinate_field_type, TemplatedAllocator, CoordinateMapType>::stride_type &, minkowski::RegionType::Type, const at::Tensor &, bool, bool) [with coordinate_type=int32_t, coordinate_field_type=float, TemplatedAllocator=minkowski::detail::c10_allocator, CoordinateMapType=minkowski::CoordinateMapGPU]" at line 404 of /content/drive/MyDrive/MinkowskiEngine-master/src/coordinate_map_manager.cu

/content/drive/MyDrive/MinkowskiEngine-master/src/kernel_region.hpp(429): warning #20011-D: calling a host function("minkowski::cpu_kernel_region ::device_tensor_stride() const") from a host device function("minkowski::gpu_kernel_region ::gpu_kernel_region") is not allowed

/content/drive/MyDrive/MinkowskiEngine-master/src/kernel_region.hpp(429): warning #20011-D: calling a host function("minkowski::cpu_kernel_region ::device_kernel_size() const") from a host device function("minkowski::gpu_kernel_region ::gpu_kernel_region") is not allowed

/content/drive/MyDrive/MinkowskiEngine-master/src/kernel_region.hpp(430): warning #20011-D: calling a host function("minkowski::cpu_kernel_region ::device_dilation() const") from a host device function("minkowski::gpu_kernel_region ::gpu_kernel_region") is not allowed

/content/drive/MyDrive/MinkowskiEngine-master/src/kernel_region.hpp(431): warning #20011-D: calling a host function("minkowski::cpu_kernel_region ::device_offset() const") from a host device function("minkowski::gpu_kernel_region ::gpu_kernel_region") is not allowed

/content/drive/MyDrive/MinkowskiEngine-master/src/coordinate_map_cpu.hpp(58): warning #177-D: variable "float_type" was declared but never referenced at::ScalarType const float_type = ^ detected during: instantiation of "std::pair<at::Tensor, at::Tensor> minkowski::CoordinateMapCPU<coordinate_type, TemplatedAllocator>::field_map(const coordinate_field_type , minkowski::CoordinateMapCPU<coordinate_type, TemplatedAllocator>::size_type) const [with coordinate_type=int32_t, TemplatedAllocator=std::allocator, coordinate_field_type=float]" at line 329 of /content/drive/MyDrive/MinkowskiEngine-master/src/coordinate_map_manager.cpp instantiation of "std::pair<at::Tensor, at::Tensor> minkowski::CoordinateMapManager<coordinate_type, coordinate_field_type, TemplatedAllocator, CoordinateMapType>::field_to_sparse_map(const minkowski::CoordinateMapKey , const minkowski::CoordinateMapKey *) [with coordinate_type=int32_t, coordinate_field_type=float, TemplatedAllocator=std::allocator, CoordinateMapType=minkowski::CoordinateMapCPU]" at line 1451 of /content/drive/MyDrive/MinkowskiEngine-master/src/coordinate_map_manager.cpp

Remark: The warnings can be suppressed with "-diag-suppress "

/content/drive/MyDrive/MinkowskiEngine-master/src/coordinate_map_manager.cpp(717): warning #430-D: returning reference to local temporary return detail::empty_map_functor<coordinate_type, TemplatedAllocator, ^ detected during instantiation of "const minkowski::CoordinateMapManager<coordinate_type, coordinate_field_type, TemplatedAllocator, CoordinateMapType>::kernel_map_type &minkowski::CoordinateMapManager<coordinate_type, coordinate_field_type, TemplatedAllocator, CoordinateMapType>::kernel_map(const minkowski::CoordinateMapKey , const minkowski::CoordinateMapKey , const minkowski::CoordinateMapManager<coordinate_type, coordinate_field_type, TemplatedAllocator, CoordinateMapType>::stride_type &, const minkowski::CoordinateMapManager<coordinate_type, coordinate_field_type, TemplatedAllocator, CoordinateMapType>::stride_type &, const minkowski::CoordinateMapManager<coordinate_type, coordinate_field_type, TemplatedAllocator, CoordinateMapType>::stride_type &, minkowski::RegionType::Type, const at::Tensor &, __nv_bool, __nv_bool) [with coordinate_type=int32_t, coordinate_field_type=float, TemplatedAllocator=std::allocator, CoordinateMapType=minkowski::CoordinateMapCPU]" at line 1451

/content/drive/MyDrive/MinkowskiEngine-master/src/coordinate_map_manager.cpp(717): warning #430-D: returning reference to local temporary return detail::empty_map_functor<coordinate_type, TemplatedAllocator, ^ detected during instantiation of "const minkowski::CoordinateMapManager<coordinate_type, coordinate_field_type, TemplatedAllocator, CoordinateMapType>::kernel_map_type &minkowski::CoordinateMapManager<coordinate_type, coordinate_field_type, TemplatedAllocator, CoordinateMapType>::kernel_map(const minkowski::CoordinateMapKey , const minkowski::CoordinateMapKey , const minkowski::CoordinateMapManager<coordinate_type, coordinate_field_type, TemplatedAllocator, CoordinateMapType>::stride_type &, const minkowski::CoordinateMapManager<coordinate_type, coordinate_field_type, TemplatedAllocator, CoordinateMapType>::stride_type &, const minkowski::CoordinateMapManager<coordinate_type, coordinate_field_type, TemplatedAllocator, CoordinateMapType>::stride_type &, minkowski::RegionType::Type, const at::Tensor &, __nv_bool, __nv_bool) [with coordinate_type=int32_t, coordinate_field_type=float, TemplatedAllocator=minkowski::detail::default_allocator, CoordinateMapType=minkowski::CoordinateMapGPU]" at line 401 of /content/drive/MyDrive/MinkowskiEngine-master/src/coordinate_map_manager.cu

/content/drive/MyDrive/MinkowskiEngine-master/src/kernel_region.hpp(428): warning #20014-D: calling a host function from a host device function is not allowed : base_type{other.region_type(), other.coordinate_size(), ^ detected during: instantiation of "minkowski::gpu_kernel_region::gpu_kernel_region(const minkowski::cpu_kernel_region &) [with coordinate_type=int32_t]" at line 205 of /content/drive/MyDrive/MinkowskiEngine-master/src/coordinate_map_manager.cu instantiation of "minkowski::gpu_kernel_map<minkowski::type_wrapper<uint32_t, int32_t, float>::index_type, TemplatedAllocator> minkowski::detail::kernel_map_functor<coordinate_type, TemplatedAllocator, minkowski::CoordinateMapGPU, minkowski::gpu_kernel_map<minkowski::type_wrapper<uint32_t, int32_t, float>::index_type, TemplatedAllocator>>::operator()(const minkowski::CoordinateMapGPU<coordinate_type, TemplatedAllocator> &, const minkowski::CoordinateMapGPU<coordinate_type, TemplatedAllocator> &, minkowski::CUDAKernelMapMode::Mode, minkowski::cpu_kernel_region &) [with coordinate_type=int32_t, TemplatedAllocator=minkowski::detail::default_allocator]" at line 753 of /content/drive/MyDrive/MinkowskiEngine-master/src/coordinate_map_manager.cpp instantiation of "const minkowski::CoordinateMapManager<coordinate_type, coordinate_field_type, TemplatedAllocator, CoordinateMapType>::kernel_map_type &minkowski::CoordinateMapManager<coordinate_type, coordinate_field_type, TemplatedAllocator, CoordinateMapType>::kernel_map(const minkowski::CoordinateMapKey , const minkowski::CoordinateMapKey , const minkowski::CoordinateMapManager<coordinate_type, coordinate_field_type, TemplatedAllocator, CoordinateMapType>::stride_type &, const minkowski::CoordinateMapManager<coordinate_type, coordinate_field_type, TemplatedAllocator, CoordinateMapType>::stride_type &, const minkowski::CoordinateMapManager<coordinate_type, coordinate_field_type, TemplatedAllocator, CoordinateMapType>::stride_type &, minkowski::RegionType::Type, const at::Tensor &, __nv_bool, __nv_bool) [with coordinate_type=int32_t, coordinate_field_type=float, TemplatedAllocator=minkowski::detail::default_allocator, CoordinateMapType=minkowski::CoordinateMapGPU]" at line 401 of /content/drive/MyDrive/MinkowskiEngine-master/src/coordinate_map_manager.cu

/content/drive/MyDrive/MinkowskiEngine-master/src/kernel_region.hpp(428): warning #20014-D: calling a host function from a host device function is not allowed : base_type{other.region_type(), other.coordinate_size(), ^ detected during: instantiation of "minkowski::gpu_kernel_region::gpu_kernel_region(const minkowski::cpu_kernel_region &) [with coordinate_type=int32_t]" at line 205 of /content/drive/MyDrive/MinkowskiEngine-master/src/coordinate_map_manager.cu instantiation of "minkowski::gpu_kernel_map<minkowski::type_wrapper<uint32_t, int32_t, float>::index_type, TemplatedAllocator> minkowski::detail::kernel_map_functor<coordinate_type, TemplatedAllocator, minkowski::CoordinateMapGPU, minkowski::gpu_kernel_map<minkowski::type_wrapper<uint32_t, int32_t, float>::index_type, TemplatedAllocator>>::operator()(const minkowski::CoordinateMapGPU<coordinate_type, TemplatedAllocator> &, const minkowski::CoordinateMapGPU<coordinate_type, TemplatedAllocator> &, minkowski::CUDAKernelMapMode::Mode, minkowski::cpu_kernel_region &) [with coordinate_type=int32_t, TemplatedAllocator=minkowski::detail::default_allocator]" at line 753 of /content/drive/MyDrive/MinkowskiEngine-master/src/coordinate_map_manager.cpp instantiation of "const minkowski::CoordinateMapManager<coordinate_type, coordinate_field_type, TemplatedAllocator, CoordinateMapType>::kernel_map_type &minkowski::CoordinateMapManager<coordinate_type, coordinate_field_type, TemplatedAllocator, CoordinateMapType>::kernel_map(const minkowski::CoordinateMapKey , const minkowski::CoordinateMapKey , const minkowski::CoordinateMapManager<coordinate_type, coordinate_field_type, TemplatedAllocator, CoordinateMapType>::stride_type &, const minkowski::CoordinateMapManager<coordinate_type, coordinate_field_type, TemplatedAllocator, CoordinateMapType>::stride_type &, const minkowski::CoordinateMapManager<coordinate_type, coordinate_field_type, TemplatedAllocator, CoordinateMapType>::stride_type &, minkowski::RegionType::Type, const at::Tensor &, __nv_bool, __nv_bool) [with coordinate_type=int32_t, coordinate_field_type=float, TemplatedAllocator=minkowski::detail::default_allocator, CoordinateMapType=minkowski::CoordinateMapGPU]" at line 401 of /content/drive/MyDrive/MinkowskiEngine-master/src/coordinate_map_manager.cu

/content/drive/MyDrive/MinkowskiEngine-master/src/kernel_region.hpp(428): warning #20014-D: calling a host function from a host device function is not allowed : base_type{other.region_type(), other.coordinate_size(), ^ detected during: instantiation of "minkowski::gpu_kernel_region::gpu_kernel_region(const minkowski::cpu_kernel_region &) [with coordinate_type=int32_t]" at line 205 of /content/drive/MyDrive/MinkowskiEngine-master/src/coordinate_map_manager.cu instantiation of "minkowski::gpu_kernel_map<minkowski::type_wrapper<uint32_t, int32_t, float>::index_type, TemplatedAllocator> minkowski::detail::kernel_map_functor<coordinate_type, TemplatedAllocator, minkowski::CoordinateMapGPU, minkowski::gpu_kernel_map<minkowski::type_wrapper<uint32_t, int32_t, float>::index_type, TemplatedAllocator>>::operator()(const minkowski::CoordinateMapGPU<coordinate_type, TemplatedAllocator> &, const minkowski::CoordinateMapGPU<coordinate_type, TemplatedAllocator> &, minkowski::CUDAKernelMapMode::Mode, minkowski::cpu_kernel_region &) [with coordinate_type=int32_t, TemplatedAllocator=minkowski::detail::default_allocator]" at line 753 of /content/drive/MyDrive/MinkowskiEngine-master/src/coordinate_map_manager.cpp instantiation of "const minkowski::CoordinateMapManager<coordinate_type, coordinate_field_type, TemplatedAllocator, CoordinateMapType>::kernel_map_type &minkowski::CoordinateMapManager<coordinate_type, coordinate_field_type, TemplatedAllocator, CoordinateMapType>::kernel_map(const minkowski::CoordinateMapKey , const minkowski::CoordinateMapKey , const minkowski::CoordinateMapManager<coordinate_type, coordinate_field_type, TemplatedAllocator, CoordinateMapType>::stride_type &, const minkowski::CoordinateMapManager<coordinate_type, coordinate_field_type, TemplatedAllocator, CoordinateMapType>::stride_type &, const minkowski::CoordinateMapManager<coordinate_type, coordinate_field_type, TemplatedAllocator, CoordinateMapType>::stride_type &, minkowski::RegionType::Type, const at::Tensor &, __nv_bool, __nv_bool) [with coordinate_type=int32_t, coordinate_field_type=float, TemplatedAllocator=minkowski::detail::default_allocator, CoordinateMapType=minkowski::CoordinateMapGPU]" at line 401 of /content/drive/MyDrive/MinkowskiEngine-master/src/coordinate_map_manager.cu

/content/drive/MyDrive/MinkowskiEngine-master/src/kernel_region.hpp(428): warning #20014-D: calling a host function from a host device function is not allowed : base_type{other.region_type(), other.coordinate_size(), ^ detected during: instantiation of "minkowski::gpu_kernel_region::gpu_kernel_region(const minkowski::cpu_kernel_region &) [with coordinate_type=int32_t]" at line 205 of /content/drive/MyDrive/MinkowskiEngine-master/src/coordinate_map_manager.cu instantiation of "minkowski::gpu_kernel_map<minkowski::type_wrapper<uint32_t, int32_t, float>::index_type, TemplatedAllocator> minkowski::detail::kernel_map_functor<coordinate_type, TemplatedAllocator, minkowski::CoordinateMapGPU, minkowski::gpu_kernel_map<minkowski::type_wrapper<uint32_t, int32_t, float>::index_type, TemplatedAllocator>>::operator()(const minkowski::CoordinateMapGPU<coordinate_type, TemplatedAllocator> &, const minkowski::CoordinateMapGPU<coordinate_type, TemplatedAllocator> &, minkowski::CUDAKernelMapMode::Mode, minkowski::cpu_kernel_region &) [with coordinate_type=int32_t, TemplatedAllocator=minkowski::detail::default_allocator]" at line 753 of /content/drive/MyDrive/MinkowskiEngine-master/src/coordinate_map_manager.cpp instantiation of "const minkowski::CoordinateMapManager<coordinate_type, coordinate_field_type, TemplatedAllocator, CoordinateMapType>::kernel_map_type &minkowski::CoordinateMapManager<coordinate_type, coordinate_field_type, TemplatedAllocator, CoordinateMapType>::kernel_map(const minkowski::CoordinateMapKey , const minkowski::CoordinateMapKey , const minkowski::CoordinateMapManager<coordinate_type, coordinate_field_type, TemplatedAllocator, CoordinateMapType>::stride_type &, const minkowski::CoordinateMapManager<coordinate_type, coordinate_field_type, TemplatedAllocator, CoordinateMapType>::stride_type &, const minkowski::CoordinateMapManager<coordinate_type, coordinate_field_type, TemplatedAllocator, CoordinateMapType>::stride_type &, minkowski::RegionType::Type, const at::Tensor &, __nv_bool, __nv_bool) [with coordinate_type=int32_t, coordinate_field_type=float, TemplatedAllocator=minkowski::detail::default_allocator, CoordinateMapType=minkowski::CoordinateMapGPU]" at line 401 of /content/drive/MyDrive/MinkowskiEngine-master/src/coordinate_map_manager.cu

/content/drive/MyDrive/MinkowskiEngine-master/src/coordinate_map_manager.cpp(717): warning #430-D: returning reference to local temporary return detail::empty_map_functor<coordinate_type, TemplatedAllocator, ^ detected during instantiation of "const minkowski::CoordinateMapManager<coordinate_type, coordinate_field_type, TemplatedAllocator, CoordinateMapType>::kernel_map_type &minkowski::CoordinateMapManager<coordinate_type, coordinate_field_type, TemplatedAllocator, CoordinateMapType>::kernel_map(const minkowski::CoordinateMapKey , const minkowski::CoordinateMapKey , const minkowski::CoordinateMapManager<coordinate_type, coordinate_field_type, TemplatedAllocator, CoordinateMapType>::stride_type &, const minkowski::CoordinateMapManager<coordinate_type, coordinate_field_type, TemplatedAllocator, CoordinateMapType>::stride_type &, const minkowski::CoordinateMapManager<coordinate_type, coordinate_field_type, TemplatedAllocator, CoordinateMapType>::stride_type &, minkowski::RegionType::Type, const at::Tensor &, __nv_bool, __nv_bool) [with coordinate_type=int32_t, coordinate_field_type=float, TemplatedAllocator=minkowski::detail::c10_allocator, CoordinateMapType=minkowski::CoordinateMapGPU]" at line 404 of /content/drive/MyDrive/MinkowskiEngine-master/src/coordinate_map_manager.cu

/content/drive/MyDrive/MinkowskiEngine-master/src/kernel_region.hpp(429): warning #20011-D: calling a host function("minkowski::cpu_kernel_region ::device_tensor_stride() const") from a host device function("minkowski::gpu_kernel_region ::gpu_kernel_region") is not allowed

/content/drive/MyDrive/MinkowskiEngine-master/src/kernel_region.hpp(429): warning #20011-D: calling a host function("minkowski::cpu_kernel_region ::device_kernel_size() const") from a host device function("minkowski::gpu_kernel_region ::gpu_kernel_region") is not allowed

/content/drive/MyDrive/MinkowskiEngine-master/src/kernel_region.hpp(430): warning #20011-D: calling a host function("minkowski::cpu_kernel_region ::device_dilation() const") from a host device function("minkowski::gpu_kernel_region ::gpu_kernel_region") is not allowed

/content/drive/MyDrive/MinkowskiEngine-master/src/kernel_region.hpp(431): warning #20011-D: calling a host function("minkowski::cpu_kernel_region ::device_offset() const") from a host device function("minkowski::gpu_kernel_region ::gpu_kernel_region") is not allowed

INFO: x86_64-linux-gnu-gcc: /content/drive/MyDrive/MinkowskiEngine-master/src/direct_max_pool.cpp /content/drive/MyDrive/MinkowskiEngine-master/src/coordinate_map_manager.cpp: In instantiation of ‘const kernel_map_type& minkowski::CoordinateMapManager<coordinate_type, coordinate_field_type, TemplatedAllocator, CoordinateMapType>::kernel_map(const minkowski::CoordinateMapKey, const minkowski::CoordinateMapKey, const stride_type&, const stride_type&, const stride_type&, minkowski::RegionType::Type, const at::Tensor&, bool, bool) [with coordinate_type = int; coordinate_field_type = float; TemplatedAllocator = std::allocator; CoordinateMapType = minkowski::CoordinateMapCPU; minkowski::CoordinateMapManager<coordinate_type, coordinate_field_type, TemplatedAllocator, CoordinateMapType>::kernel_map_type = minkowski::cpu_kernel_map; minkowski::CoordinateMapManager<coordinate_type, coordinate_field_type, TemplatedAllocator, CoordinateMapType>::stride_type = std::vector<unsigned int, std::allocator >]’: /content/drive/MyDrive/MinkowskiEngine-master/src/coordinate_map_manager.cpp:1451:16: required from here /content/drive/MyDrive/MinkowskiEngine-master/src/coordinate_map_manager.cpp:717:260: warning: returning reference to temporary [-Wreturn-local-addr] 717 | return detail::empty_map_functor<coordinate_type, TemplatedAllocator, | ^ /content/drive/MyDrive/MinkowskiEngine-master/src/coordinate_map_manager.cpp: In instantiation of ‘const kernel_map_type& minkowski::CoordinateMapManager<coordinate_type, coordinate_field_type, TemplatedAllocator, CoordinateMapType>::kernel_map(const minkowski::CoordinateMapKey, const minkowski::CoordinateMapKey, const stride_type&, const stride_type&, const stride_type&, minkowski::RegionType::Type, const at::Tensor&, bool, bool) [with coordinate_type = int; coordinate_field_type = float; TemplatedAllocator = minkowski::detail::default_allocator; CoordinateMapType = minkowski::CoordinateMapGPU; minkowski::CoordinateMapManager<coordinate_type, coordinate_field_type, TemplatedAllocator, CoordinateMapType>::kernel_map_type = minkowski::gpu_kernel_map<unsigned int, minkowski::detail::default_allocator >; minkowski::CoordinateMapManager<coordinate_type, coordinate_field_type, TemplatedAllocator, CoordinateMapType>::stride_type = std::vector<unsigned int, std::allocator >]’: /content/drive/MyDrive/MinkowskiEngine-master/src/coordinate_map_manager.cu:401:16: required from here /content/drive/MyDrive/MinkowskiEngine-master/src/coordinate_map_manager.cpp:717:260: warning: returning reference to temporary [-Wreturn-local-addr] /content/drive/MyDrive/MinkowskiEngine-master/src/coordinate_map_manager.cpp: In instantiation of ‘const kernel_map_type& minkowski::CoordinateMapManager<coordinate_type, coordinate_field_type, TemplatedAllocator, CoordinateMapType>::kernel_map(const minkowski::CoordinateMapKey, const minkowski::CoordinateMapKey, const stride_type&, const stride_type&, const stride_type&, minkowski::RegionType::Type, const at::Tensor&, bool, bool) [with coordinate_type = int; coordinate_field_type = float; TemplatedAllocator = minkowski::detail::c10_allocator; CoordinateMapType = minkowski::CoordinateMapGPU; minkowski::CoordinateMapManager<coordinate_type, coordinate_field_type, TemplatedAllocator, CoordinateMapType>::kernel_map_type = minkowski::gpu_kernel_map<unsigned int, minkowski::detail::c10_allocator >; minkowski::CoordinateMapManager<coordinate_type, coordinate_field_type, TemplatedAllocator, CoordinateMapType>::stride_type = std::vector<unsigned int, std::allocator >]’: /content/drive/MyDrive/MinkowskiEngine-master/src/coordinate_map_manager.cu:404:16: required from here /content/drive/MyDrive/MinkowskiEngine-master/src/coordinate_map_manager.cpp:717:260: warning: returning reference to temporary [-Wreturn-local-addr] /usr/local/lib/python3.10/dist-packages/torch/utils/cpp_extension.py:1967: UserWarning: TORCH_CUDA_ARCH_LIST is not set, all archs for visible cards are included for compilation. If this is not desired, please set os.environ['TORCH_CUDA_ARCH_LIST']. warnings.warn( INFO: nvcc: /content/drive/MyDrive/MinkowskiEngine-master/src/global_pooling_gpu.cu INFO: nvcc: /content/drive/MyDrive/MinkowskiEngine-master/src/gpu.cu /content/drive/MyDrive/MinkowskiEngine-master/src/gpu.cu(104): warning #177-D: function "minkowski::format_size" was declared but never referenced static std::string format_size(uint64_t size) { ^

Remark: The warnings can be suppressed with "-diag-suppress "

INFO: nvcc: /content/drive/MyDrive/MinkowskiEngine-master/src/interpolation_gpu.cu INFO: nvcc: /content/drive/MyDrive/MinkowskiEngine-master/src/local_pooling_gpu.cu INFO: nvcc: /content/drive/MyDrive/MinkowskiEngine-master/src/local_pooling_transpose_gpu.cu INFO: nvcc: /content/drive/MyDrive/MinkowskiEngine-master/src/math_functions_cpu.cpp nvcc fatal : Unknown option '-fopenmp' INFO: nvcc: /content/drive/MyDrive/MinkowskiEngine-master/src/math_functions_gpu.cu INFO: nvcc: /content/drive/MyDrive/MinkowskiEngine-master/src/pooling_avg_kernel.cu /content/drive/MyDrive/MinkowskiEngine-master/src/math_functions_gpu.cu: In function ‘void minkowski::sort_coo_gpu(cusparseHandle_t, int, int, int, int, int, allocator_type&)’: /content/drive/MyDrive/MinkowskiEngine-master/src/math_functions_gpu.cu:181:69: warning: ‘cusparseStatus_t cusparseCreateIdentityPermutation(cusparseHandle_t, int, int)’ is deprecated: The routine will be removed in the next major release [-Wdeprecated-declarations] 181 | CUSPARSE_CHECK(cusparseCreateIdentityPermutation(handle, nnz, P)); | ~~~~~~~~~^
/usr/local/cuda/include/cusparse.h:4060:1: note: declared here 4060 | cusparseCreateIdentityPermutation(cusparseHandle_t handle, | ^~~~~~~~~ /content/drive/MyDrive/MinkowskiEngine-master/src/math_functions_gpu.cu: In instantiation of ‘void minkowski::sort_coo_gpu(cusparseHandle_t, int, int, int, int
, int, allocator_type&) [with allocator_type = minkowski::detail::default_allocator; cusparseHandle_t = cusparseContext]’: /content/drive/MyDrive/MinkowskiEngine-master/src/math_functions_gpu.cu:189:210: required from here /content/drive/MyDrive/MinkowskiEngine-master/src/math_functions_gpu.cu:181:69: warning: ‘cusparseStatus_t cusparseCreateIdentityPermutation(cusparseHandle_t, int, int)’ is deprecated: The routine will be removed in the next major release [-Wdeprecated-declarations] 181 | CUSPARSE_CHECK(cusparseCreateIdentityPermutation(handle, nnz, P)); | ~~~~~~~~~^
/usr/local/cuda/include/cusparse.h:4060:1: note: declared here 4060 | cusparseCreateIdentityPermutation(cusparseHandle_t handle, | ^~~~~~~~~ /content/drive/MyDrive/MinkowskiEngine-master/src/math_functions_gpu.cu:181:69: warning: ‘cusparseStatus_t cusparseCreateIdentityPermutation(cusparseHandle_t, int, int
)’ is deprecated: The routine will be removed in the next major release [-Wdeprecated-declarations] 181 | CUSPARSE_CHECK(cusparseCreateIdentityPermutation(handle, nnz, P)); | ~~~~~~~~~^
/usr/local/cuda/include/cusparse.h:4060:1: note: declared here 4060 | cusparseCreateIdentityPermutation(cusparseHandle_t handle, | ^~~~~~~~~ /content/drive/MyDrive/MinkowskiEngine-master/src/math_functions_gpu.cu:181:69: warning: ‘cusparseStatus_t cusparseCreateIdentityPermutation(cusparseHandle_t, int, int)’ is deprecated: The routine will be removed in the next major release [-Wdeprecated-declarations] 181 | CUSPARSE_CHECK(cusparseCreateIdentityPermutation(handle, nnz, P)); | ~~~~~~~~~^
/usr/local/cuda/include/cusparse.h:4060:1: note: declared here 4060 | cusparseCreateIdentityPermutation(cusparseHandle_t handle, | ^~~~~~~~~ /content/drive/MyDrive/MinkowskiEngine-master/src/math_functions_gpu.cu: In instantiation of ‘void minkowski::sort_coo_gpu(cusparseHandle_t, int, int, int, int
, int, allocator_type&) [with allocator_type = minkowski::detail::c10_allocator; cusparseHandle_t = cusparseContext]’: /content/drive/MyDrive/MinkowskiEngine-master/src/math_functions_gpu.cu:193:202: required from here /content/drive/MyDrive/MinkowskiEngine-master/src/math_functions_gpu.cu:181:69: warning: ‘cusparseStatus_t cusparseCreateIdentityPermutation(cusparseHandle_t, int, int)’ is deprecated: The routine will be removed in the next major release [-Wdeprecated-declarations] 181 | CUSPARSE_CHECK(cusparseCreateIdentityPermutation(handle, nnz, P)); | ~~~~~~~~~^
/usr/local/cuda/include/cusparse.h:4060:1: note: declared here 4060 | cusparseCreateIdentityPermutation(cusparseHandle_t handle, | ^~~~~~~~~ /content/drive/MyDrive/MinkowskiEngine-master/src/math_functions_gpu.cu:181:69: warning: ‘cusparseStatus_t cusparseCreateIdentityPermutation(cusparseHandle_t, int, int
)’ is deprecated: The routine will be removed in the next major release [-Wdeprecated-declarations] 181 | CUSPARSE_CHECK(cusparseCreateIdentityPermutation(handle, nnz, P)); | ~~~~~~~~~^
/usr/local/cuda/include/cusparse.h:4060:1: note: declared here 4060 | cusparseCreateIdentityPermutation(cusparseHandle_t handle, | ^~~~~~~~~ /content/drive/MyDrive/MinkowskiEngine-master/src/math_functions_gpu.cu:181:69: warning: ‘cusparseStatus_t cusparseCreateIdentityPermutation(cusparseHandle_t, int, int*)’ is deprecated: The routine will be removed in the next major release [-Wdeprecated-declarations] 181 | CUSPARSE_CHECK(cusparseCreateIdentityPermutation(handle, nnz, P)); | ~~~~~~~~~^
/usr/local/cuda/include/cusparse.h:4060:1: note: declared here 4060 | cusparseCreateIdentityPermutation(cusparseHandle_t handle, | ^~~~~~~~~ INFO: nvcc: /content/drive/MyDrive/MinkowskiEngine-master/src/pooling_max_kernel.cu INFO: nvcc: /content/drive/MyDrive/MinkowskiEngine-master/src/pruning_gpu.cu INFO: nvcc: /content/drive/MyDrive/MinkowskiEngine-master/src/quantization.cpp nvcc fatal : Unknown option '-fopenmp' INFO: nvcc: /content/drive/MyDrive/MinkowskiEngine-master/src/spmm.cu /content/drive/MyDrive/MinkowskiEngine-master/src/spmm.cu(96): warning #177-D: variable "is_int64" was declared but never referenced constexpr bool is_int64 = std::is_same<th_int_type, int64_t>::value; ^

Remark: The warnings can be suppressed with "-diag-suppress "

/content/drive/MyDrive/MinkowskiEngine-master/src/spmm.cu(358): warning #177-D: variable "is_int64" was declared but never referenced constexpr bool is_int64 = std::is_same<th_int_type, int64_t>::value; ^

INFO: nvcc: pybind/minkowski.cu error: Command "/usr/local/cuda/bin/nvcc -I/usr/local/lib/python3.10/dist-packages/torch/include -I/usr/local/lib/python3.10/dist-packages/torch/include/torch/csrc/api/include -I/usr/local/lib/python3.10/dist-packages/torch/include/TH -I/usr/local/lib/python3.10/dist-packages/torch/include/THC -I/usr/local/cuda/include -I/content/drive/MyDrive/MinkowskiEngine-master/src -I/content/drive/MyDrive/MinkowskiEngine-master/src/3rdparty -I/usr/include/python3.10 -c /content/drive/MyDrive/MinkowskiEngine-master/src/math_functions_cpu.cpp -o build/temp.linux-x86_64-cpython-310/content/drive/MyDrive/MinkowskiEngine-master/src/math_functions_cpu.o -fopenmp -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 -std=c++17" failed with exit status 1

Xiong5Heng commented 4 months ago

J'ai également rencontré ce problème. Ubuntu 22.04, CUDA 12.2, nvcc cuda_12.2.r12.2, PyTorch 2.1.0

Cela ne fonctionne pas dans Ubuntu20.04, cuda 12.1, pytorch 2.2.2+cu121

The same thing didn't work for me. Have you found a solution?

install libopenblas-dev before install MinkowskiEngine, and then the solution works for me. sudo apt install libopenblas-dev

wdczz commented 2 months ago

Thanks for your reply. It works successfully on CUDA12.2 Pytorch2.2!

rayryeng commented 2 months ago

I've also encountered that problem. Ubuntu 22.04, CUDA 12.2, nvcc cuda_12.2.r12.2, PyTorch 2.1.0

I've managed to install it by fixing all errors by adding some headers to 4 files. So you need to download this repo and modify the source code.

1 - .../MinkowskiEngine/src/convolution_kernel.cuh

Add header: #include <thrust/execution_policy.h>

2 - .../MinkowskiEngine/src/coordinate_map_gpu.cu

Add headers:

#include <thrust/unique.h>
#include <thrust/remove.h>

3 - .../MinkowskiEngine/src/spmm.cu

Add headers:

#include <thrust/execution_policy.h>
#include <thrust/reduce.h> 
#include <thrust/sort.h>

4 - .../MinkowskiEngine/src/3rdparty/concurrent_unordered_map.cuh

Add header: #include <thrust/execution_policy.h>

I'm installing it in venv through python setup.py install

If it is the correct solution may be better to add it to the main readme file about CUDA 12.1+ installation

This also worked for me. I'm installing this in a Docker container, so I use the following to insert the appropriate headers into the right files in place, and then I install the Python bindings. In my Dockerfile, I do:

ENV CUDA_HOME=/usr/local/cuda
ENV TORCH_CUDA_ARCH_LIST="6.0 6.1 6.2 7.0 7.2 7.5 8.0 8.6 8.9"
ENV TORCH_NVCC_FLAGS="-Xfatbin -compress-all"
RUN git clone https://github.com/NVIDIA/MinkowskiEngine.git /tmp/MinkowskiEngine \
    && cd /tmp/MinkowskiEngine \
    && sed -i '31i #include <thrust/execution_policy.h>' ./src/convolution_kernel.cuh \
    && sed -i '39i #include <thrust/unique.h>\n#include <thrust/remove.h>' ./src/coordinate_map_gpu.cu \
    && sed -i '38i #include <thrust/execution_policy.h>\n#include <thrust/reduce.h>\n#include <thrust/sort.h>' ./src/spmm.cu \
    && sed -i '38i #include <thrust/execution_policy.h>' ./src/3rdparty/concurrent_unordered_map.cuh \
    && python setup.py install --force_cuda --blas=openblas \
    && cd - \
    && rm -rf /tmp/MinkowskiEngine

I am sharing this here in case someone else is trying to build and install the Python bindings in a Docker container. The base image I use is nvidia/cuda:12.1.1-devel-ubuntu20.04 with PyTorch 2.3.1 and CUDA 12.1.

Take special care that if you are using a GPU from the Ada generation (i.e. A6000), the architecture list needs to include 8.9 as 8.9 is specifically for Ada architectures. If you don't want to use Docker, this should work by just removing RUN and doing this in your native environment, and also replacing ENV with export. Thanks!

Thanks again!

chadrs2 commented 1 month ago

@rayryeng , can you share your whole Dockerfile? I'm getting various dependency issues when I copy and pasted your code above and made sure to pull the base image from FROM nvidia/cuda:12.1.1-devel-ubuntu20.04

chadrs2 commented 1 month ago

I'm getting a new error

4.269 In file included from /usr/local/lib/python3.10/dist-packages/torch/include/pybind11/detail/../attr.h:13,
4.269                  from /usr/local/lib/python3.10/dist-packages/torch/include/pybind11/detail/class.h:12,
4.269                  from /usr/local/lib/python3.10/dist-packages/torch/include/pybind11/pybind11.h:13,
4.269                  from /tmp/MinkowskiEngine/src/types.hpp:32,
4.269                  from /tmp/MinkowskiEngine/src/kernel_region.hpp:36,
4.269                  from /tmp/MinkowskiEngine/src/coordinate_map.hpp:30,
4.269                  from /tmp/MinkowskiEngine/src/broadcast_gpu.cu:28:
4.269 /usr/local/lib/python3.10/dist-packages/torch/include/pybind11/detail/../detail/common.h:274:10: fatal error: Python.h: No such file or directory
4.269 /usr/local/lib/python3.10/dist-packages/torch/include/pybind11/detail/../detail/common.h:274:10: fatal error: Python.h: No such file or directory
4.269   274 | #include <Python.h>
4.269       |          ^~~~~~~~~~
4.269 compilation terminated.
4.269 error: command '/usr/local/cuda/bin/nvcc' failed with exit code 1

Here's my Dockerfile:

FROM nvidia/cuda:12.1.1-devel-ubuntu22.04

RUN apt-get update && apt-get install -y --no-install-recommends \
    git make build-essential libopenblas-dev python3-pip && \
    rm -rf /var/lib/apt/lists/*

RUN pip install torch==2.3.1+cu121 torchvision torchaudio -f https://download.pytorch.org/whl/torch_stable.html

ENV CUDA_HOME=/usr/local/cuda
ENV TORCH_CUDA_ARCH_LIST="6.0 6.1 6.2 7.0 7.2 7.5 8.0 8.6 8.9"
ENV TORCH_NVCC_FLAGS="-Xfatbin -compress-all"
RUN git clone https://github.com/NVIDIA/MinkowskiEngine.git /tmp/MinkowskiEngine \
    && cd /tmp/MinkowskiEngine \
    && sed -i '31i #include <thrust/execution_policy.h>' ./src/convolution_kernel.cuh \
    && sed -i '39i #include <thrust/unique.h>\n#include <thrust/remove.h>' ./src/coordinate_map_gpu.cu \
    && sed -i '38i #include <thrust/execution_policy.h>\n#include <thrust/reduce.h>\n#include <thrust/sort.h>' ./src/spmm.cu \
    && sed -i '38i #include <thrust/execution_policy.h>' ./src/3rdparty/concurrent_unordered_map.cuh \
    && python3 setup.py install --force_cuda --blas=openblas \
    && cd - \
    && rm -rf /tmp/MinkowskiEngine
chadrs2 commented 1 month ago

I added in python-dev into my install scripts and that seemed to fix it. The Dockerfile is now:

FROM nvidia/cuda:12.1.1-devel-ubuntu22.04

RUN apt-get update && apt-get install -y --no-install-recommends \
    git make build-essential libopenblas-dev python3-dev python3-pip && \
    rm -rf /var/lib/apt/lists/*

RUN pip install torch==2.3.1+cu121 torchvision torchaudio -f https://download.pytorch.org/whl/torch_stable.html

ENV CUDA_HOME=/usr/local/cuda
ENV TORCH_CUDA_ARCH_LIST="6.0 6.1 6.2 7.0 7.2 7.5 8.0 8.6 8.9"
ENV TORCH_NVCC_FLAGS="-Xfatbin -compress-all"
RUN git clone https://github.com/NVIDIA/MinkowskiEngine.git /tmp/MinkowskiEngine \
    && cd /tmp/MinkowskiEngine \
    && sed -i '31i #include <thrust/execution_policy.h>' ./src/convolution_kernel.cuh \
    && sed -i '39i #include <thrust/unique.h>\n#include <thrust/remove.h>' ./src/coordinate_map_gpu.cu \
    && sed -i '38i #include <thrust/execution_policy.h>\n#include <thrust/reduce.h>\n#include <thrust/sort.h>' ./src/spmm.cu \
    && sed -i '38i #include <thrust/execution_policy.h>' ./src/3rdparty/concurrent_unordered_map.cuh \
    && python3 setup.py install --force_cuda --blas=openblas \
    && cd - \
    && rm -rf /tmp/MinkowskiEngine
rayryeng commented 1 month ago

@chadrs2 I'm sorry for not getting back to you sooner. I did not install python3-dev, but I used Miniconda and set the environment to Python 3.10 as I need that specific version of Python for my work.

So:

FROM nvidia/cuda:12.1.1-devel-ubuntu20.04
ARG DEBIAN_FRONTEND=noninteractive

# Keeps Python from generating .pyc files in the container
ENV PYTHONDONTWRITEBYTECODE=1
# Turns off buffering for easier container logging
ENV PYTHONUNBUFFERED=1

# Remove any third-party apt sources to avoid issues with expiring keys.
RUN rm -f /etc/apt/sources.list.d/*.list

# Install some basic utilities, useful tools and other required libraries
RUN apt-get update && apt-get install -y \
    curl \
    ca-certificates \
    sudo \
    git \
    bzip2 \
    libx11-6 \
    ninja-build \
    build-essential \
    libopenblas-dev \
    libglib2.0-0 \
    libgl1-mesa-glx \
    libsm6 \
    libxext6 \
    libxrender1 \
    libxi6 \
    libxkbcommon-x11-0 \
    wget \
    && rm -rf /var/lib/apt/lists/*

# Install miniconda - Install in root /miniconda directory and make it accessible
ENV CONDA_AUTO_UPDATE_CONDA=false \
    PATH=/miniconda/bin:$PATH
RUN curl -sLo /tmp/miniconda.sh https://repo.anaconda.com/miniconda/Miniconda3-py310_24.7.1-0-Linux-x86_64.sh \
    && chmod +x /tmp/miniconda.sh \
    && /tmp/miniconda.sh -b -p /miniconda \
    && rm /tmp/miniconda.sh

RUN pip install torch==2.3.1 torchvision==0.18.1 torchaudio==2.3.1 --index-url https://download.pytorch.org/whl/cu121 --no-cache-dir

ENV CUDA_HOME=/usr/local/cuda
ENV TORCH_CUDA_ARCH_LIST="6.0 6.1 6.2 7.0 7.2 7.5 8.0 8.6 8.9"
ENV TORCH_NVCC_FLAGS="-Xfatbin -compress-all"
RUN git clone https://github.com/NVIDIA/MinkowskiEngine.git /tmp/MinkowskiEngine \
    && cd /tmp/MinkowskiEngine \
    && sed -i '31i #include <thrust/execution_policy.h>' ./src/convolution_kernel.cuh \
    && sed -i '39i #include <thrust/unique.h>\n#include <thrust/remove.h>' ./src/coordinate_map_gpu.cu \
    && sed -i '38i #include <thrust/execution_policy.h>\n#include <thrust/reduce.h>\n#include <thrust/sort.h>' ./src/spmm.cu \
    && sed -i '38i #include <thrust/execution_policy.h>' ./src/3rdparty/concurrent_unordered_map.cuh \
    && python3 setup.py install --force_cuda --blas=openblas \
    && cd - \
    && rm -rf /tmp/MinkowskiEngine
chadrs2 commented 1 month ago

@rayryeng, thank you! This finally works! Do you run into the line of installing MinkowskiEngine (i.e. python3 setup.py install --force_cuda --blas=openblas) taking a really long time?

rayryeng commented 1 month ago

@rayryeng, thank you! This finally works! Do you run into the line of installing MinkowskiEngine (i.e. python3 setup.py install --force_cuda --blas=openblas) taking a really long time?

Hi! From what I understand, there are various CUDA kernels that are being compiled before the files are copied over to your Python packages directory. The kernel building took approximately 15 minutes and I have a very heavy compute machine... It will definitely take some time. For my image, end to end it took about 20 minutes to build. I have other dependencies I didn't list for brevity.