I have built the LLVM project locally. I wish to use my clang build to compile PyTorch source code. Currently I am facing issues during the PyTorch build.
The build command is simply: python setup.py develop
The build fails with some error messages, prominently:
...
...
[611/2206] Performing build step for 'nccl_external'
FAILED: nccl_external-prefix/src/nccl_external-stamp/nccl_external-build ...
...
...
151 | #error -- unsupported clang version! clang version must be less than 16 and greater than 3.2 . The nvcc flag '-allow-unsupported-compiler' can be used to override...
...
...
So, is there a way to build the PyTorch project with the latest/newer versions of LLVM?
Apparently, the problem is that the newer version of clang uses c++17 as the default dialect. As per this NVIDIA forum post, one solution might be, to manually set the C++ dialect version using: -std=c++XX flag.