[PATCH] D134972: [CMake] Only set LLVM_DEFAULT_TARGET_TRIPLE to LLVM_HOST_TRIPLE when native target is enabled

Xiang Li via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 14 00:54:00 PDT 2022


python3kgae added a comment.

In D134972#3857363 <https://reviews.llvm.org/D134972#3857363>, @smeenai wrote:

> In D134972#3848313 <https://reviews.llvm.org/D134972#3848313>, @python3kgae wrote:
>
>> In D134972#3848302 <https://reviews.llvm.org/D134972#3848302>, @smeenai wrote:
>>
>>> Unfortunately I'm not set up for AMDGPU, so I can't test that locally. Just to confirm, `check-llvm` works for you if `LLVM_DEFAULT_TARGET_TRIPLE` is empty, but not if it's set to a triple corresponding to an enabled backend?
>>
>> Yes. check-llvm works if `LLVM_DEFAULT_TARGET_TRIPLE` is empty. ( except 2 OrcV2Examples in this patch).
>> Then set it to amdgcn-amd-amdhsa get lot of fails.
>
> Hmm. Do you have an example of a failing test and why it's failing? (I see lots of amdhsa failures on my end, but I'm pretty sure it's just because I'm not set up correctly.) I'm trying to understand why the default triple is making a difference here, vs. just having the backend enabled or not enabled, and what the behavior is when the default triple is empty that's making the test pass.

For check-llvm,
amdgcn-amd-amdhsa will cause many amdgpu test failures because amdhsa not work for some tests. Change it to amdgcn-amd- could avoid all amdgpu codeGen test fails.
The rest of fails might caused by amdgcn doesn't support all the things CPU supports and fail in instruction selection.
For default triple empty, these tests are ignored as unsupported by "# REQUIRES: default_triple".

For check-clang,
Lit will report fatal: Could not turn 'amdgcn-amd-' into Itanium ABI triple. Something for empty default triple.
amdgcn-amd-amdhsa will get many tests fail for cannot find ROCm device library.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D134972/new/

https://reviews.llvm.org/D134972



More information about the llvm-commits mailing list