Add RISC-V QEMU test coverage - #45
Open
carlosqwqqwq wants to merge 1 commit into
Open
Conversation
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.
Why
FP16already has a portable scalar implementation for its conversion routines, and the existing architecture-specific fast paths are optional optimizations rather than hard requirements.For this project, the missing part is official
riscv64verification coverage:F16C, AArch64 FP16, and related native conversion options are unavailable;riscv64today, but upstream CI did not exercise it;riscv64test run, the portability claim stays weaker than it needs to be.This patch keeps the conversion logic unchanged and adds a reproducible
riscv64Linux + QEMU test path to the existing CMake workflow.What changed
.github/workflows/cmake.yml:cmake-linux-riscv64job onubuntu-24.04;g++-riscv64-linux-gnu,qemu-user-static, andninja-build;riscv64cross-compilation withCMAKE_CROSSCOMPILING_EMULATOR;qemu-riscv64-static;riscv64job to keep the job focused on correctness and runtime manageable.README.md:riscv64Linux under QEMU.Verification
cmake -S . -B build-native -G Ninja -DCMAKE_BUILD_TYPE=Release -DFP16_BUILD_BENCHMARKS=OFF -DFP16_BUILD_COMPARATIVE_BENCHMARKS=OFFcmake --build build-native --parallel 4ctest --test-dir build-native --output-on-failure7/7tests passed.__riscv=1/__riscv_xlen=64compile probe againstinclude/fp16/macros.handinclude/fp16/fp16.h;FP16_USE_NATIVE_CONVERSION == 0,FP16_USE_FLOAT16_TYPE == 0, andFP16_USE_FP16_TYPE == 0on the conservative RISC-V path.riscv64Linux cross-compilation and QEMU execution in Docker (ubuntu:24.04):riscv64-linux-gnu-gcc,riscv64-linux-gnu-g++,CMAKE_SYSTEM_PROCESSOR=riscv64, andCMAKE_CROSSCOMPILING_EMULATOR=qemu-riscv64-static;-L;/usr/riscv64-linux-gnu;ctestsuite under QEMU with no failures.Start testing: Jun 18 13:43 UTCEnd testing: Jun 18 14:00 UTCPassedCount = 7FailedCount = 0LastTest.logconfirms execution throughqemu-riscv64-static.build-riscv/CMakeCache.txtrecordsCMAKE_C_COMPILER=/usr/bin/riscv64-linux-gnu-gccCMAKE_CXX_COMPILER=/usr/bin/riscv64-linux-gnu-g++CMAKE_SYSTEM_PROCESSOR=riscv64CMAKE_CROSSCOMPILING_EMULATOR=qemu-riscv64-static;-L;/usr/riscv64-linux-gnuNotes
riscv64, not to claim new architecture-specific acceleration.