mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #3622] [CLOSED] [Engine] Build and run the engine on ARM64 (DGX Spark / GB10) #4719
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#4719
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Niko1221/Strata/pull/3622
Author: @ferstar
Created: 10/21/2026
Status: ❌ Closed
Base:
main← Head:gb10-022📝 Commits (1)
d891f00feat(aarch64): build and run the engine on ARM64 (DGX Spark / GB10)📊 Changes
12 files changed (+359 additions, -51 deletions)
View changed files
📝
CMakeLists.txt(+24 -7)➕
include/strata/platform/cpu_relax.hpp(+21 -0)📝
setup.py(+20 -2)📝
src/core/expert_source.cpp(+5 -0)📝
src/core/graph.cpp(+2 -2)📝
src/core/mtp.cpp(+3 -7)📝
src/core/session.cpp(+4 -9)📝
src/core/verify.cpp(+18 -18)📝
src/kernels/cpu/expert_layout.cpp(+39 -1)📝
src/kernels/cpu/pool.cpp(+5 -5)➕
src/kernels/cpu/portable.cpp(+209 -0)📝
src/program/generate.cpp(+9 -0)📄 Description
Problem and result
The engine only builds and runs on x86 today: the CPU expert path assumes the x86 AVX kernels and CPUID probes. On an ARM64 machine (NVIDIA DGX Spark / GB10, CUDA 13.0) the build fails at the x86 kernel sources and intrinsics. After this change the engine builds on aarch64 and loads and answers requests there. On x86 the x86 sources and flags are still selected as before.
Related discussion
none. This is a platform port, not a feature or default change, but it touches CMake and the CPU kernel selection, so maintainer review of scope is requested.
Approach
STRATA_CPU_X86is decided fromCMAKE_SYSTEM_PROCESSOR. x86-only kernel sources and per-file flags are added only on x86. On aarch64,src/kernels/cpu/portable.cppprovides the kernel entry points, and native experts use the ggml-cpu NEON dot products.-ffp-contract=offon aarch64 so the host quantizers do not diverge from x86 at exact ties.include/strata/platform/cpu_relax.hppmaps the x86 spin-wait intrinsics (_mm_pause,_mm_sfence) per architecture.setup.py: whennvidia-smireports[N/A]for memory (GB10 unified memory), the pool size comes from/proc/meminfo. The CPU feature check no longer expects the x86flags:line.--cpu-oracle-q8-0is rejected with a message on non-x86 builds.Compatibility: the x86 build keeps every x86 source and flag it had before, but the header and intrinsic indirection touches shared files (
verify.cpp,pool.cpp,session.cpp,mtp.cpp,graph.cpp), so x86 review is needed.Validation
Passed:
gb10-022atd891f006):strataengine target builds; model load and chat completions work with Qwen3.8-Flash IQ3_S (three completions of 512 tokens at temperature 0 observed at 55–59 tok/s; no comparison run, so no speedup is claimed).setup.pysucceeds.Failed:
2a148442) failed to compile on both platforms; it was replaced byd891f006.Not run:
cteston either machine.Limits
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.