ci: add riscv64 RVV cross-compile workflow ported from faiss - #705
Open
ihb2032 wants to merge 2 commits into
Open
ci: add riscv64 RVV cross-compile workflow ported from faiss#705ihb2032 wants to merge 2 commits into
ihb2032 wants to merge 2 commits into
Conversation
Port faiss's linux-riscv64-DD-cmake job (build-pull-request.yml) so PRs get riscv64 coverage without native hardware: - .github/workflows/08-linux-riscv64-rvv-cross.yml: cross-compile with gcc-14-riscv64-linux-gnu using faiss's proven multiarch apt setup (minus libopenblas-dev/libgomp1: no BLAS, ENABLE_OPENMP=OFF), then build and run the whole ailego unit test suite (61 targets) under qemu-user-static with -cpu rv64,v=true,zihintpause=true. - cmake/toolchains/riscv64-linux-gnu.cmake: riscv64-linux-gnu toolchain file ported from faiss, with overridable compiler names. - .github/workflows/01-ci-pipeline.yml: wire the new workflow into the main pipeline. - .github/workflows/10-cmake-subproject-integration.yml: renumbered from 08 to free the slot (standalone nightly, no references by filename). The job passes -DENABLE_RISCV64/-DENABLE_RISCV_VECTOR/ -DENABLE_RISCV_ZIHINTPAUSE; until the RISC-V platform support lands on main these are unused warnings and the job runs as a plain rv64gc cross-compile smoke test. Co-authored-by: lyd1992 <liuyudong@iscas.ac.cn> Co-authored-by: YuanSheng <yuansheng@isrc.iscas.ac.cn>
Ubuntu 24.04 ships qemu-user-static 8.2, which does not emulate the riscv_hwprobe syscall (emulation added in qemu 9.2, reporting V and ZVFH from the -cpu config), so the hwprobe-based CpuFeatures detection would always report false once the RISC-V platform support lands. Install the newest static qemu build from the Ubuntu package pool (currently 9.2.1), enable ENABLE_RISCV_ZVFH, and run the tests with -cpu rv64,v=true,zvfh=true,zihintpause=true. Co-authored-by: lyd1992 <liuyudong@iscas.ac.cn> Co-authored-by: YuanSheng <yuansheng@isrc.iscas.ac.cn>
ihb2032
force-pushed
the
ci/rvv-cross-test
branch
from
August 27, 2026 09:38
cb0dcfd to
8ee9c35
Compare
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.
Ports faiss's
linux-riscv64-DD-cmakejob so PRs get riscv64 coverage without native hardware.08-linux-riscv64-rvv-cross.yml: cross-compile with the gcc-14 riscv64 toolchain (faiss's proven multiarch apt setup, minuslibopenblas-dev/libgomp1— no BLAS,ENABLE_OPENMP=OFF), then build & run the full ailego unit test suite (61 targets) under qemu-user with-cpu rv64,v=true,zvfh=true,zihintpause=true.riscv_hwprobesyscall, which the CpuFeatures runtime detection relies on.cmake/toolchains/riscv64-linux-gnu.cmakeported from faiss (overridable compiler names).01-ci-pipeline.yml;08-cmake-subproject-integration.ymlrenumbered to 10 to free the slot (standalone nightly, unreferenced by filename).Passes
-DENABLE_RISCV64/-DENABLE_RISCV_VECTOR/-DENABLE_RISCV_ZVFH/-DENABLE_RISCV_ZIHINTPAUSE; until #311 lands these are unused-variable warnings and the job runs as a plain rv64gc cross-compile smoke test.