Skip to content

[CI] Add LLVMCPU aarch64 and riscv64 lit tests only if LLVM has the target - #25234

Merged
devtbi merged 4 commits into
iree-org:mainfrom
devtbi:byollvm-llvmcpu-arch-tests
Nov 11, 2026
Merged

devtbi merged 4 commits into
iree-org:mainfrom
devtbi:byollvm-llvmcpu-arch-tests

Conversation

@devtbi

@devtbi devtbi commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

The tests

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

devtbi and others added 2 commits November 10, 2026 09:06
…arget

early_data_tiling.mlir, early_data_tiling_convolution.mlir and
early_data_tiling_dynamic.mlir, added in
iree-org#24969, and roundeven_native.mlir,
added in iree-org#25219, compile for
aarch64. roundeven_native.mlir also compiles for riscv64. byo_llvm.sh
builds LLVM with only the X86 target, so iree-compile stops with
"createTargetMachine(...) failed" and the tests fail the scheduled
linux_x64_clang_byollvm job.

Add these tests in the same way as
iree-org#25221 did for
ukernel_inlining.mlir: CMake adds them only if
iree_compiler_targeting_iree_arch() is true for their architecture. The
Bazel build always has these targets.

roundeven_native.mlir has one check prefix per architecture, so its
aarch64 and riscv64 RUN lines move into their own files. The early data
tiling tests check mainly aarch64 output, and their x86-64 RUN lines
reuse the aarch64 check prefixes. Splitting them would copy the IR, so
the whole files move into the aarch64 suite. A build without the
AArch64 target therefore skips their x86-64 RUN lines too.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Tobias Fuchs <[email protected]>
Moving the whole files into the aarch64 suite also removed their x86-64
RUN lines from builds without the AArch64 target. Copy the IR into
*_aarch64.mlir files instead. The x86-64 and vmvx RUN lines stay in the
original files and run in every build. Each file keeps only the check
prefixes that its RUN lines use.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Tobias Fuchs <[email protected]>
@devtbi
devtbi marked this pull request as ready for review November 10, 2026 13:52
@devtbi
devtbi enabled auto-merge (squash) November 10, 2026 14:10

@egebeysel egebeysel left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, maybe just for parity we could have the suffixes on the x86 ones.

iree/async/platform/posix/cts/socket_tests times out in every
linux_x64_clang_byollvm run since the ubuntu-24.04 runner image moved
to kernel 7.0.0-1017-azure. The test log stops at
CTS/SocketPosixTest.UnixDgram_ConnectedLoopback/posix_poll.

That kernel has a NULL pointer dereference in AppArmor, fixed upstream
by torvalds/linux@4de32fd05ce9. It triggers
when an AppArmor-confined process uses write() or writev() on a
connected AF_UNIX datagram socket. This test is the first one that does
so. The fault ends only the calling thread. The worker threads of the
proactor stay alive, so the process prints nothing more and waits until
ctest stops it.

Only this job is affected because it is the only one that runs the
tests in a container on the GitHub-hosted ubuntu-24.04 image. Docker
confines the container with its default AppArmor profile. The runtime
jobs use the same image without a container, so their processes are not
confined and the test passes there.

The kernel log of the runner was not available. The cause follows from
the kernel source of that build and from the upstream fix, which
reports the same call path.

The test still runs in the other Linux jobs. Remove the exclusion when
the runner image has a kernel with the fix.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
Signed-off-by: Tobias Fuchs <[email protected]>
The aarch64 and riscv64 RUN lines are in *_aarch64.mlir and
*_riscv64.mlir files. Name the files that hold the x86-64 RUN lines in
the same way, as materialize_encoding_x86_64.mlir does in
Codegen/Common.

The vmvx RUN line of early_data_tiling.mlir needs no LLVM target. It
stays in early_data_tiling.mlir, and the x86-64 RUN line moves into
early_data_tiling_x86_64.mlir with a copy of the IR. The other three
files are renamed without changes.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
Signed-off-by: Tobias Fuchs <[email protected]>
@devtbi

devtbi commented Nov 11, 2026

Copy link
Copy Markdown
Contributor Author

renamed for parity & disabled CTS test for the BYO LLVM, because it seems to fail due to some known issue in the container image

@devtbi
devtbi merged commit bd1ce59 into iree-org:main Nov 11, 2026
55 checks passed
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.

3 participants