[clang] [CUDA/HIP] fix propagate -cuid to a host-only compilation. (PR #111650)
Artem Belevich via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 9 10:40:51 PDT 2024
Artem-B wrote:
> This does not seem to be the right fix. I tends to think the test https://github.com/ROCm/hip-tests/tree/amd-staging/samples/2_Cookbook/16_assembly_to_executable needs fix. Since it does not expect host-only compilation to use CUID, it should add `-fuse-cuid=none` to the host-only compilation.
I agree. The reason I did the change is that we have builds where we do host and per-GPU sub-compilations separately, but they all need to be in sync.
Another way to look at it is that sub-compilation of the same TU file, with the same options should produce the same results if they were done as part of a combined compilation or partial compilation done with `--cuda-host-only`/`--cuda-device-only`.
Not setting/propagating CUID for the host-only compilation makes the host build inconsistent.
https://github.com/llvm/llvm-project/pull/111650
More information about the cfe-commits
mailing list