Skip to content

[CI] Skip tests that need non-X86 LLVM targets in the BYO LLVM build - #25221

Merged
devtbi merged 3 commits into
iree-org:mainfrom
devtbi:byollvm-ukernel-inlining
Nov 9, 2026
Merged

devtbi merged 3 commits into
iree-org:mainfrom
devtbi:byollvm-ukernel-inlining

Conversation

@devtbi

@devtbi devtbi commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

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.

devtbi and others added 3 commits November 9, 2026 09:51
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
devtbi force-pushed the byollvm-ukernel-inlining branch from 9fb8887 to 94fe59a Compare November 9, 2026 09:53
@devtbi
devtbi marked this pull request as ready for review November 9, 2026 09:55
@devtbi
devtbi merged commit 02765d5 into iree-org:main Nov 9, 2026
55 checks passed
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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants