NVIDIA / MinkowskiEngine

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

Fix compilation error (pytorch 1.11.0, cuda 11.6) #481

Closed sitic closed 2 years ago

sitic commented 2 years ago

Compilation failed for src/spmm.cu with

/usr/include/c10/util/ArrayRef.h(142): error: expression must be a pointer to a complete object
 type
          detected during instantiation of "c10::ArrayRef<T>::iterator c10::ArrayRef<T>::end()
const [with T=at::Tensor]"
/usr/include/ATen/cuda/CUDAUtils.h(14): here

/usr/include/ATen/cuda/CUDAUtils.h(15): error: incomplete class type "at::Tensor" is not allowed

/usr/include/ATen/NamedTensorUtils.h(14): error: no instance of function template "std::any_of"
 matches the argument list
            argument types are: (const at::Tensor *, <error-type>, lambda [](const at::Tensor &
)->__nv_bool)

for pytorch 1.11.0 with cuda 11.6.

Fixes #453

StefOe commented 2 years ago

this patch worked for me (pytorch 1.12 cuda 11.3)

chrischoy commented 2 years ago

Thanks for the PR!

123sleaf-123 commented 4 months ago

You are the real hero, sir. Thank you!!

But I'm confused that why I can't see your change in the master branch? (I add this line of code by myself)