Skip to content

Building C++ API from source failed #239

@juntingzh

Description

@juntingzh

I have CUDA 11.2 and CUDNN 8.2.1, PyTorch 1.10 and when I try to build pytorch_scatter from source I hit this error:

[  9%] Building CXX object CMakeFiles/torchscatter.dir/csrc/cpu/scatter_cpu.cpp.o
[ 18%] Building CXX object CMakeFiles/torchscatter.dir/csrc/cpu/segment_coo_cpu.cpp.o
[ 27%] Building CXX object CMakeFiles/torchscatter.dir/csrc/cpu/segment_csr_cpu.cpp.o
[ 36%] Building CUDA object CMakeFiles/torchscatter.dir/csrc/cuda/scatter_cuda.cu.o
/home/junting_zhang/projects/pytorch_scatter/csrc/cuda/utils.cuh(12): error: more than one user-defined conversion from "const c10::Half" to "__half" applies:
            function "__half::__half(float)"
            function "__half::__half(__half &&)"

/home/junting_zhang/projects/pytorch_scatter/csrc/cuda/utils.cuh(18): error: more than one user-defined conversion from "const c10::Half" to "__half" applies:
            function "__half::__half(float)"
            function "__half::__half(__half &&)"

2 errors detected in the compilation of "/home/junting_zhang/projects/pytorch_scatter/csrc/cuda/scatter_cuda.cu".
CMakeFiles/torchscatter.dir/build.make:120: recipe for target 'CMakeFiles/torchscatter.dir/csrc/cuda/scatter_cuda.cu.o' failed
make[2]: *** [CMakeFiles/torchscatter.dir/csrc/cuda/scatter_cuda.cu.o] Error 1
CMakeFiles/Makefile2:94: recipe for target 'CMakeFiles/torchscatter.dir/all' failed
make[1]: *** [CMakeFiles/torchscatter.dir/all] Error 2
Makefile:148: recipe for target 'all' failed
make: *** [all] Error 2

Any idea on how to fix?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions