When I’m compiling custom cuda extensions I get the following warning but the extensions still compile and seem to work just fine.
                               !! WARNING !!

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Your compiler (c++) is not compatible with the compiler Pytorch was
built with for this platform, which is g++ on linux. Please
use g++ to to compile your extension. Alternatively, you may
compile PyTorch from source using c++, and then you can also use
c++ to compile your extension.

See https://github.com/pytorch/pytorch/blob/master/CONTRIBUTING.md for help
with compiling PyTorch from source.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

                              !! WARNING !!

I had a quick look at the source code 11 of torch.utils.cpp_extension.py and saw that the accepted compilers on Linux are ['g++', 'gcc', 'gnu-c++', 'gnu-cc']. The compiler used to build the extensions on my Linux machine (5.4.33-3-MANJARO) is /usr/bin/c++. The output of c++ --version is c++ (Arch Linux 9.3.0-1) 9.3.0.
Can someone tell me if there is actually an incompatibility between the compilers or if this is a bug in PyTorch?
Thanks a lot!