[PR #2419] [CLOSED] arm64: build + run Strata on NVIDIA DGX Spark (GB10, sm_121) - rebased onto v0.1.41, IQ3_S validated #4034

Closed
opened 2026-11-07 15:32:38 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Niko1221/Strata/pull/2419
Author: @ccatzin-zumwalt
Created: 10/14/2026
Status: ❌ Closed

Base: main ← Head: dgx-spark-gb10-aarch64


📝 Commits (5)

  • f213e2e arm64: DGX Spark GB10 (aarch64) build + run support (rebased onto v0.1.41)
  • 536f2aa Merge origin/main (v0.1.44.1) into dgx-spark-gb10-aarch64
  • b223100 arm64: link portable kernel fallbacks in Metal builds
  • 8d66d95 Merge branch 'main' of https://github.com/Niko1221/Strata into update-pr-2419-conflict-20261017
  • ce16205 fix ARM64 verifier and native expert build

📊 Changes

21 files changed (+695 additions, -113 deletions)

View changed files

📝 CMakeLists.txt (+74 -36)
📝 Dockerfile (+17 -3)
📝 README.md (+1 -0)
➕ docs/DGX_SPARK.md (+130 -0)
➕ include/strata/platform/cpu_relax.hpp (+20 -0)
📝 metal/CMakeLists.txt (+4 -0)
📝 setup.py (+99 -24)
📝 src/core/expert_source.cpp (+6 -0)
📝 src/core/graph.cpp (+2 -3)
📝 src/core/mtp.cpp (+3 -11)
📝 src/core/session.cpp (+4 -9)
📝 src/core/verify.cpp (+18 -17)
📝 src/kernels/cpu/expert_layout.cpp (+41 -1)
📝 src/kernels/cpu/native_expert.cpp (+16 -0)
📝 src/kernels/cpu/pool.cpp (+4 -4)
➕ src/kernels/cpu/portable.cpp (+221 -0)
📝 src/kernels/cpu/router_dot_parity.cpp (+4 -0)
📝 src/program/generate.cpp (+12 -3)
📝 tools/test_setup_golden.py (+1 -0)
📝 tools/test_setup_unsloth.py (+15 -1)

...and 1 more files

📄 Description

What this adds

Builds and runs Strata on the NVIDIA DGX Spark: an aarch64 host (10 Cortex-X925 +
10 Cortex-A725) with a Blackwell GPU (GB10, sm_121) sharing 128 GB of unified
memory. Up to now the Spark could only use the community aarch64 port; this branch
rebases that port onto v0.1.41 (after the upstream history cleanup), fixes the
drift the new base introduced, and validates it end-to-end with IQ3_S.

## Attribution

This is a rebase of the community aarch64 port — PRs #409 (eelgaev), #901
(githubhjs) and #1077 (johnlockejrr) — onto v0.1.41 (`fb58e0d`), plus the drift
fixes the new base required. All original authorship is preserved in the
history; our own changes are the rebase fixes, marked "DGX Spark GB10 (aarch64)"
in the affected blocks.

## Changes

- `include/strata/platform/cpu_relax.hpp`: portable `_mm_pause` / `_mm_sfence`
  (yield / `dmb oshst` on aarch64).
- `src/kernels/cpu/portable.cpp`: scalar + NEON activation quantizer and the BF16
  router dot. The AVX-only kernels are refused on ARM; native packs (IQ3_S
  included) fall through to ggml-cpu's NEON dot products.
- `CMakeLists.txt`: `STRATA_CPU_X86` guard drops the AVX kernel files on aarch64
  and sets `-ffp-contract=off`; passes `GGML_CPU_ARM_ARCH` to ggml-cpu.
- `setup.py` / `Dockerfile`: aarch64 detection, ggml CPU features read from
  `/proc/cpuinfo` (gcc's `-mcpu=native` finds none on GB10's big.LITTLE part),
  sm_121 auto-selection, and GB10 unified-memory handling (the GPU reports no
  memory of its own; setup counts system RAM).
- x86-intrinsic guards in graph/session/verify/mtp/pool/expert_layout/generate,
  including the `expert_layout.cpp` / `native_expert.cpp` blocks this base had
  moved.
- `docs/DGX_SPARK.md`: documents the rebase, the install path, and the IQ3_S
  validation numbers.

x86 builds are untouched: every change is behind an aarch64 guard or in
aarch64-only files.

## Validation (one DGX Spark, 2026-10-08)

IQ3_S (GSQ-RCO), 256K context, `--parallel 4`, `--kv int8`, `--mmap-experts`,
all 24,576 experts in the cache:

- decode 58.8–66.0 tok/s; prompt 103–111 tok/s on short requests;
- 127K-token long prompt prefilled at 1512 tok/s, with a needle-in-haystack
  marker retrieved correctly from that depth;
- MTP accepting 13/14 and 60/79 proposals;
- above the community reference on Spark (47 tok/s, UD-IQ4_XS).

## Testing notes / known gaps

- Validated on aarch64 only; we could not re-run the x86 build matrix on an
  x86_64 host, though the diff is guard-only for x86.
- Needle-in-haystack was verified at 127K depth, not the full 256K.
- A 1h+ soak (docs/TEST_REQUESTS.md) has not been run on this rebase yet.

Happy to run any of these if you want them before merge.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Niko1221/Strata/pull/2419 **Author:** [@ccatzin-zumwalt](https://github.com/ccatzin-zumwalt) **Created:** 10/14/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `dgx-spark-gb10-aarch64` --- ### 📝 Commits (5) - [`f213e2e`](https://github.com/Niko1221/Strata/commit/f213e2e1a153c6f74285f10f7803a3549028dcc5) arm64: DGX Spark GB10 (aarch64) build + run support (rebased onto v0.1.41) - [`536f2aa`](https://github.com/Niko1221/Strata/commit/536f2aa4411747b950aaad14ece2e05c8e50502a) Merge origin/main (v0.1.44.1) into dgx-spark-gb10-aarch64 - [`b223100`](https://github.com/Niko1221/Strata/commit/b2231006d011cfd676215c37a495b1a7cf799b8c) arm64: link portable kernel fallbacks in Metal builds - [`8d66d95`](https://github.com/Niko1221/Strata/commit/8d66d95c97b5ea7375c1cb202ce308771a8ba7f2) Merge branch 'main' of https://github.com/Niko1221/Strata into update-pr-2419-conflict-20261017 - [`ce16205`](https://github.com/Niko1221/Strata/commit/ce16205d8b72fd489c7a2717f872133dcdbf3bd8) fix ARM64 verifier and native expert build ### 📊 Changes **21 files changed** (+695 additions, -113 deletions) <details> <summary>View changed files</summary> 📝 `CMakeLists.txt` (+74 -36) 📝 `Dockerfile` (+17 -3) 📝 `README.md` (+1 -0) ➕ `docs/DGX_SPARK.md` (+130 -0) ➕ `include/strata/platform/cpu_relax.hpp` (+20 -0) 📝 `metal/CMakeLists.txt` (+4 -0) 📝 `setup.py` (+99 -24) 📝 `src/core/expert_source.cpp` (+6 -0) 📝 `src/core/graph.cpp` (+2 -3) 📝 `src/core/mtp.cpp` (+3 -11) 📝 `src/core/session.cpp` (+4 -9) 📝 `src/core/verify.cpp` (+18 -17) 📝 `src/kernels/cpu/expert_layout.cpp` (+41 -1) 📝 `src/kernels/cpu/native_expert.cpp` (+16 -0) 📝 `src/kernels/cpu/pool.cpp` (+4 -4) ➕ `src/kernels/cpu/portable.cpp` (+221 -0) 📝 `src/kernels/cpu/router_dot_parity.cpp` (+4 -0) 📝 `src/program/generate.cpp` (+12 -3) 📝 `tools/test_setup_golden.py` (+1 -0) 📝 `tools/test_setup_unsloth.py` (+15 -1) _...and 1 more files_ </details> ### 📄 Description ## What this adds Builds and runs Strata on the NVIDIA DGX Spark: an aarch64 host (10 Cortex-X925 + 10 Cortex-A725) with a Blackwell GPU (GB10, sm_121) sharing 128 GB of unified memory. Up to now the Spark could only use the community aarch64 port; this branch rebases that port onto v0.1.41 (after the upstream history cleanup), fixes the drift the new base introduced, and validates it end-to-end with IQ3_S. ## Attribution This is a rebase of the community aarch64 port — PRs #409 (eelgaev), #901 (githubhjs) and #1077 (johnlockejrr) — onto v0.1.41 (`fb58e0d`), plus the drift fixes the new base required. All original authorship is preserved in the history; our own changes are the rebase fixes, marked "DGX Spark GB10 (aarch64)" in the affected blocks. ## Changes - `include/strata/platform/cpu_relax.hpp`: portable `_mm_pause` / `_mm_sfence` (yield / `dmb oshst` on aarch64). - `src/kernels/cpu/portable.cpp`: scalar + NEON activation quantizer and the BF16 router dot. The AVX-only kernels are refused on ARM; native packs (IQ3_S included) fall through to ggml-cpu's NEON dot products. - `CMakeLists.txt`: `STRATA_CPU_X86` guard drops the AVX kernel files on aarch64 and sets `-ffp-contract=off`; passes `GGML_CPU_ARM_ARCH` to ggml-cpu. - `setup.py` / `Dockerfile`: aarch64 detection, ggml CPU features read from `/proc/cpuinfo` (gcc's `-mcpu=native` finds none on GB10's big.LITTLE part), sm_121 auto-selection, and GB10 unified-memory handling (the GPU reports no memory of its own; setup counts system RAM). - x86-intrinsic guards in graph/session/verify/mtp/pool/expert_layout/generate, including the `expert_layout.cpp` / `native_expert.cpp` blocks this base had moved. - `docs/DGX_SPARK.md`: documents the rebase, the install path, and the IQ3_S validation numbers. x86 builds are untouched: every change is behind an aarch64 guard or in aarch64-only files. ## Validation (one DGX Spark, 2026-10-08) IQ3_S (GSQ-RCO), 256K context, `--parallel 4`, `--kv int8`, `--mmap-experts`, all 24,576 experts in the cache: - decode 58.8–66.0 tok/s; prompt 103–111 tok/s on short requests; - 127K-token long prompt prefilled at 1512 tok/s, with a needle-in-haystack marker retrieved correctly from that depth; - MTP accepting 13/14 and 60/79 proposals; - above the community reference on Spark (47 tok/s, UD-IQ4_XS). ## Testing notes / known gaps - Validated on aarch64 only; we could not re-run the x86 build matrix on an x86_64 host, though the diff is guard-only for x86. - Needle-in-haystack was verified at 127K depth, not the full 256K. - A 1h+ soak (docs/TEST_REQUESTS.md) has not been run on this rebase yet. Happy to run any of these if you want them before merge. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-07 15:32:38 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#4034
No description provided.