More than one operator "=" error while compiling with CUDA 12.2

I am trying to build Spconv library with CUDA 12.2 and GCC 9 (for some reasons I can’t use GCC version > 10)

There is a problem related to implicit conversions:

[build] /usr/include/c++/9/bits/stl_algobase.h(342): error: more than one operator “=” matches these operands:
[build] function “__half::operator=(float)” (declared at line 341 of /usr/local/cuda/include/cuda_fp16.hpp)

I have defined


macros as suggested in documentation, but it doesn’t help.

There are conditional compilation strings in





If I try to modify these strings like that:


Spconv library can be compiled succesfully (disable implicit converts macros are applied). So there is some error related to __CUDACC__ macro…
Also I can compile Spconv with CUDA 12.1 without errors.

Could you help with this problem?