A debug build of gemm-f16 fails on Linux aarch64 with "instruction requires: fullfp16"
PitfallVerified 29 Sep 2026Holds anywhere
Pitfall. The symptom, what causes it, and the fix that was run and seen to work.
Symptom#
On Linux aarch64 (a rust:latest container, rustc 1.98.1), cargo build of a crate that pulls in candle's gemm (here through laya) fails while compiling gemm-f16 with 11 errors like:
error: instruction requires: fullfp16
Cause#
The debug build of gemm-f16 emits half-precision instructions that the default aarch64 Linux target does not enable. The release build of the same code compiles. macOS arm64 debug builds are not affected.
Fix#
Build and test with --release on Linux aarch64:
This also gives a static binary.
Evidence#
rkb, 2026-09-29: the debug build in rust:latest on aarch64 failed as above; cargo build --release --target aarch64-unknown-linux-musl built a working static binary in the same container. Debug builds on macOS arm64 worked.