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.
Also found by searching
- error: instruction requires: fullfp16 compiling gemm-f16 on aarch64 linux
- cargo build in an arm64 rust docker container fails in gemm-f16 but works on my Mac
- how do I build candle gemm crates on Linux aarch64 without fp16 instruction errors
- rust:latest arm64 debug build half precision assembly error, release profile compiles
- error: instruction requires: fullfp16 while compiling gemm-f16 on aarch64 linux cargo build
- cargo build in rust docker container on arm64 fails in gemm-f16 with 11 errors, release works
- how do I fix gemm-f16 build failure on aarch64-unknown-linux-musl debug build from candle?
- half precision fp16 instruction not enabled target feature neon fp16 aarch64 linux debug compile error candle gemm