A new crate, wai/wai-ops-npu, with no dependency but wai-ops. Its kernel runs on one compute core of a tile array, built at run time with the array's open toolchain; its host side is compiled against the device runtime and loaded. The interpreter runs each graph through wai_ops::run_with and asks the core for every arithmetic operator's outputs: conv and conv_transpose as multiply- accumulate lines (8- and 16-bit operands into 32-bit accumulator lanes, 32-bit operands into 64-bit lanes, the width the certificate's mac record allows), rescale, chscale and mul through the unit's shift-round step under the mode that is the operator's rounding, the elementwise operators, and lut16 a table block at a time. Movement, policies, checks and state stay the interpreter's. The unit's shift-round step is exact for shifts 0..59 only: it takes 60..63 as a left shift by 64 - s (measured), so those shifts go through the core's scalar unit in 64-bit arithmetic. Tests: the corpus (every graph vector in the subset, against the committed results and the interpreter), the rounding, saturation, lane and requantisation probes, twelve kernel edits the corpus must catch, and the graphs outside the subset by acc32 alone, which are not exact here. Co-Authored-By: Claude Opus 5.5 <[email protected]>
14 lines
234 B
TOML
14 lines
234 B
TOML
# This file is automatically @generated by Cargo.
|
|
# It is not intended for manual editing.
|
|
version = 4
|
|
|
|
[[package]]
|
|
name = "wai-ops"
|
|
version = "0.1.0"
|
|
|
|
[[package]]
|
|
name = "wai-ops-npu"
|
|
version = "0.1.0"
|
|
dependencies = [
|
|
"wai-ops",
|
|
]
|