Skip to content

Commit 1ce55ee

Browse files
danmcleranclaude
andcommitted
Reword Phase 9 docs to match Phase 14 capability-gate principle
Two doc nits flagged after the Phase 14 audit. No code path implication. cpp/qbridge.hpp: replace "A target with FPU (M4F, M7, R82, A55, x86)" with capability-based phrasing. R82 and A55 ship FPU as optional silicon per Arm's published RTL configurations; the bridges' FPU requirement is a capability, not a CPU model. QUANTIZATION.md Phase 9: replace "__fp16 (ARMv8.2) / _Float16 (gcc) / bf16 storage typedefs" with the shipped reality (software-only fp16_t / bf16_t wrapping uint16_t via __builtin_memcpy). Notes the matching SIMD vector specialization lives in Phase 14 simd_neon_fp16.hpp. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 4372319 commit 1ce55ee

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

QUANTIZATION.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ Each phase = self-contained PR. Builds on prior. Ships with regression corner +
148148
- `qValueToAffine<QV>(QValue, AffineParams)` → `int8_t`
149149
- `affineToFloat` / `floatToAffine` promoted from calibration helpers to runtime (freestanding-safe when `FLOAT=1`)
150150
- New gate `TINYMIND_ENABLE_FP16` in `cpp/include/tinymind_platform.hpp`.
151-
- `cpp/include/tinymind_fp16.hpp` — `__fp16` (ARMv8.2) / `_Float16` (gcc) / `bf16` storage typedefs + scalar promote-to-float ops. Pure storage tier, no SIMD yet.
151+
- `cpp/include/tinymind_fp16.hpp` — software-only `fp16_t` (IEEE 754 binary16) and `bf16_t` (bfloat16) storage structs wrapping `uint16_t`, plus scalar promote-to-float ops via `__builtin_memcpy`. No compiler-builtin `__fp16` / `_Float16` dependency — keeps the header capability-gate-clean per the Phase 14 design rule, and the storage tier compiles on any toolchain regardless of ISA. Hosts that natively support `_Float16` / `__fp16` may add a thin adapter without disturbing this header. Pure storage tier; the matching SIMD vector specialization lands in Phase 14 as `cpp/include/simd/simd_neon_fp16.hpp`.
152152
- `unit_test/embedded/Makefile` — expand to 4-way `(FLOAT, STD, QUANT, FP16)` matrix. Add `fp16_hosted` corner.
153153
154154
**Tests:** `unit_test/quantization/test_qbridge.cpp` — round-trip Q8.8 ↔ int8 ↔ Q8.8 within tolerance. fp16 ↔ fp32 round-trip.

cpp/qbridge.hpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,11 @@
4141
* All conversions run scalar at the layer boundary; the inner loops of
4242
* each pipeline stay native to their own type system. The conversions
4343
* themselves use float arithmetic, so this whole file is gated on
44-
* TINYMIND_ENABLE_FLOAT. A target with FPU (M4F, M7, R82, A55, x86) can
45-
* use the bridges at runtime; a pure-integer M0+ build keeps both
46-
* pipelines siloed by simply not including this header.
44+
* TINYMIND_ENABLE_FLOAT. Any target whose silicon ships an FPU (capability,
45+
* not CPU model — Arm publishes thousands of RTL configurations per core
46+
* and FPU is often an optional component) can use the bridges at runtime;
47+
* a pure-integer build keeps both pipelines siloed by simply not
48+
* including this header.
4749
*
4850
* No <cmath> dependency: rounding uses sign-aware float-to-int casting.
4951
* No <type_traits>. Freestanding-safe at FLOAT=1, STD=0.

0 commit comments

Comments
 (0)