Repository navigation
[CI] Skip tests that need non-X86 LLVM targets in the BYO LLVM build - #25221
Merged
Merged
Conversation
When LLVM cannot create a target machine for the requested triple, usually because the LLVM build does not include that target, populateDefaultsFromTargetMachine printed a message and asserted. Builds without assertions then dereferenced the null target machine and crashed. This is how iree-compile crashes in the bring-your-own-LLVM CI build, which only has the X86 target, on the aarch64 RUN lines of ukernel_inlining.mlir. Report a fatal usage error instead. Every build type now stops with "LLVM ERROR: createTargetMachine(<triple>) failed; machine may not be enabled in LLVM" and exit code 1. Propagating the error to the callers is still open in iree-org#13988. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Tobias Fuchs <[email protected]>
ukernel_inlining.mlir, added in iree-org#24833, compiles for aarch64 and riscv64, but byo_llvm.sh builds LLVM with only the X86 target. The test has failed the scheduled linux_x64_clang_byollvm job since iree-org#24833 landed. Since 2026-10-26 that job fails earlier, while configuring LLVM. Move the aarch64 and riscv64 RUN lines into their own tests, tag them with the LLVM target they need, and exclude those tags in build_and_test_byo_llvm.sh. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Tobias Fuchs <[email protected]>
ukernel_inlining_aarch64.mlir and ukernel_inlining_riscv64.mlir need the LLVM target and the ukernel bitcode of their architecture. CMake builds both only if LLVM_TARGETS_TO_BUILD has the target, and otherwise writes an empty bitcode file, so the tests cannot pass in such a build. Check the same condition as the bitcode build instead of tagging the tests and excluding the tags in build_and_test_byo_llvm.sh. The tag exclusion only covered that script with its default targets. The check also covers byo_llvm.sh test_iree, BYO builds with other targets, and bundled builds with a reduced IREE_DEFAULT_CPU_LLVM_TARGETS. The Bazel build always has these targets. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Tobias Fuchs <[email protected]>
devtbi
force-pushed
the
byollvm-ukernel-inlining
branch
from
November 9, 2026 09:53
9fb8887 to
94fe59a
Compare
devtbi
marked this pull request as ready for review
November 9, 2026 09:55
devtbi
requested review from
Manewing,
egebeysel and
jschuhmacher
as code owners
November 9, 2026 09:55
jschuhmacher
approved these changes
Nov 9, 2026
devtbi
added a commit
that referenced
this pull request
Nov 11, 2026
…arget (#25234) The tests - early_data_tiling.mlir, early_data_tiling_convolution.mlir, early_data_tiling_dynamic.mlir, added in #24969 - roundeven_native.mlir, added in #25219 (also riscv64), compile for aarch64. byo_llvm.sh builds LLVM with only the X86 target, so iree-compile stops with "createTargetMachine(...) failed" and the tests fail linux_x64_clang_byollvm job. Add these tests in the same way as #25221: CMake adds them only if iree_compiler_targeting_iree_arch() is true for their architecture. Theaarch64 and riscv64 RUN lines move into *_aarch64.mlir and *_riscv64.mlir files, which copy the IR. ci-extra: linux_x64_clang_byollvm --------- Signed-off-by: Tobias Fuchs <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ukernel_inlining.mlir, added in #24833, compiles for aarch64 and
riscv64, but byo_llvm.sh builds LLVM with only the X86 target. The test
has failed the scheduled linux_x64_clang_byollvm job since #24833
landed.
Move the aarch64 and riscv64 RUN lines into their own tests. CMake adds
these tests only if iree_compiler_targeting_iree_arch() is true for their
architecture. The same check decides whether CMake builds the ukernel
bitcode for the architecture. Without the LLVM target, CMake writes an
empty bitcode file instead, so the tests cannot pass in such a build.
The Bazel build always has these targets.
The aarch64 RUN lines also crashed iree-compile:
populateDefaultsFromTargetMachine only asserted that LLVM could create
the target machine, so builds without assertions dereferenced a null
pointer. It now reports a fatal usage error.