I am using a library that calls torch.utils.cpp_extension.load()
and I believe I am having trouble specifying the correct compiler. I receive a compiler warning:
!! 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 used conda to build pytorch so I believe the incorrect system default compiler is being called. So I have tried assiging the CXX
environment variable per the documentation:
To compile the sources, the default system compiler (
c++
) is used, which can be overridden by setting theCXX
environment variable.
However I do not think I am specifying the correct path to the compiler that was used to build pytorch with conda on my linux system. Is this diagnosis on the correct path? If so, how do I determine the path to the g++ compiler used to build pytorch?