Skip to content

Enable ARM SHA-256 acceleration for package hashing - #41

Merged
lukealonso merged 1 commit into
mainfrom
eugr/rust-sha-fix
Oct 23, 2026
Merged

lukealonso merged 1 commit into
mainfrom
eugr/rust-sha-fix

Conversation

@eugr

@eugr eugr commented Oct 23, 2026

Copy link
Copy Markdown
Collaborator

sha2 0.10.9 selects software SHA-256 on ARM unless its asm feature is enabled. Large export manifests must hash their source files before rank handoff, making that work CPU bound on DGX Spark and capable of exceeding the receiver's 30-second readiness timeout.

Enable asm for Linux ARM64 in Heliopause, Flare, and Helios, covering export hashing, content-addressed package caches, and frontend asset digests. Each Cargo lockfile adds sha2-asm 0.6.4. Helios's frontend dependency remains optional, other targets retain their existing feature selection, and SHA-256 digests and package formats remain compatible.

Validation:

  • Linux ARM64: 92 export tests passed (3 ignored), 7 Flare package-cache tests passed, and 1 Helios frontend digest test passed.
  • Locked Cargo feature graphs select asm,default,sha2-asm,std on Linux ARM64 and default,std on Linux x86_64 and Windows x86_64.
  • DGX Spark SHA-256 measurements with 512 updates of an 8 MiB buffer: approximately 575 MB/s with software hashing versus 2.16 GB/s with asm, with identical digests over 4 GiB in all three trials.

Windows and x86 binaries were not built.

Enable sha2's asm feature on Linux aarch64 in Heliopause, Flare,
and Helios. sha2 0.10.9 otherwise selects software SHA-256 on ARM,
slowing export manifest hashing and content-addressed blob verification.

Retain Helios's optional frontend dependency and existing feature
selection on other targets. Add sha2-asm 0.6.4 to each Cargo lockfile.
SHA-256 digests and runtime package formats remain compatible.

Validation on Linux ARM64: 92 export tests passed (3 ignored),
7 Flare package-cache tests passed, and the Helios frontend digest
test passed. Locked feature graphs enable asm on Linux ARM64 and
retain default,std on Linux x86_64 and Windows x86_64. Windows and
x86 binaries were not built.

Design-Signed-Off-By: Codex (GPT-6); design-review=6aeb
@lukealonso
lukealonso merged commit 21ab06a into main Oct 23, 2026
1 of 2 checks passed
@eugr
eugr deleted the eugr/rust-sha-fix branch October 23, 2026 05:26
lukealonso pushed a commit that referenced this pull request Oct 23, 2026
Hosts cabled as a chain (in rank order, with no link between the first
and last rank) cannot serve a multi-host package: --roce-ring needs that
last link, and direct mode needs links between every pair of ranks.

--roce-chain selects a chain for flare run (including --hosts), flare
orbit run, flare orbit push, and ignition export and serve; it excludes
--roce-ring. Ranks exchange their shape before planning routes and
refuse a mismatch. Status: implemented and experimental, like
--roce-ring.

Serving: Helios connects RoCE queue pairs between neighbors only and
uses the native proxy's open-chain mode (ring_open): every rank between
a sender and a non-neighbor target relays the transfer, and the end
ranks relay nothing.

Fabric TCP transfers (checkpoint reads, export transfers, package
distribution, Orbit push): the fabric plan (Topology) carries a chain
flag, so each path walks the consecutive ranks between its ends. Orbit
grants and saved groups carry roce_chain.

Preparation: recipes pass ring_open to the collectives; RebuildManifest
field 22 records roce_chain.

Compatibility: ring and direct behavior is unchanged. Rebuild metadata,
grants, saved groups and fabric plans without the chain field read as
not a chain, so existing packages serve unchanged; a peer without the
field rejects a chain plan. Packages need proxy ABI 10.
helios/native/roce_proxy.c equals the proxy of the pinned FlashInfer
3563f331, which includes local-inference-lab/flashinfer#40 and #41.

Validation on main at df8c2ab: cargo build --locked adds no warning;
cargo test flare 128 passed, helios 895 passed; pytest tests/ without
CUDA-only files fails the same tests as main. On main at e5bd6a6, its
ancestor, on four DGX Sparks cabled in rank order 0-1-2-3 with no link
between ranks 0 and 3, flare orbit run --roce-chain staged a DeepSeek
V4.1 Flash chain package to the peers over the chain and served it at
51.2 / 81.0 / 102.9 / 159.9 tok/s at 1 / 2 / 4 / 8 streams and 3,113
tok/s prefill (llm-inference-bench 0.7.6, 32K context); the package was
prepared with the same changes on main at 27aba89, with the checkpoint
on rank 0 only. The same changes on main at 639bd5e and 3d35caf passed
a Qwen3.8 Flash Next chain export with the checkpoint on rank 0 only,
serving that package into empty peer caches, flare run --hosts, and
tests/preparation/validate_checkpoint_fabric.py --chain on five hosts.
Chains above five hosts are not exercised.

AI-assisted implementation and review.

Design-Signed-Off-By: FujitsuPolycom; design-review=6aeb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants