mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #4578] [Engine] aarch64 (Jetson AGX Thor): CPU topology reads one physical core (all core_id=0), so the expert pool defaults to 1 worker #2070
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#2070
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?
Originally created by @potoior on GitHub (Oct 29, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/4578
On aarch64 (Jetson AGX Thor, Tegra) the engine's Linux topology detection reads every logical processor as the same physical core, so the CPU expert pool defaults to 1 worker on a 14-core part.
Observed
Startup line (source build, engine 0.1.52,
5e8a4cc):strata tune autoreports the same:facts.workers = 1.Environment
-DCMAKE_CUDA_ARCHITECTURES=110Root cause (reproduced)
The Linux detection (
src/kernels/cpu/pool.cpp,detect_cpu_topology_impl/fill_plan_fields, ~lines 119-132 and 160-177) keys a physical core byphysical_package_id * 1e6 + core_idfrom sysfs:All CPUs therefore map to the same core and the code dedupes them to 1 physical core.
Tegra does expose per-CPU uniqueness elsewhere — there is no SMT, and
thread_siblings_list/core_cpus_listis each CPU alone, whilecluster_idvaries:The
knownpath infill_plan_fieldstreatscore_id/physical_package_idas valid (both >= 0), so it does not fall back to the "topology unknown" path (the comment at ~pool.cppline 288 about taking half the logical processors). It reports one package with one core.Suggested fix
On Linux, when
core_idis not unique across the allowed CPUs butthread_siblings_list(orcore_cpus_list) shows each CPU alone (no SMT), treat each logical processor as its own physical core — or build the core map fromcore_cpus_list/thread_siblings_listinstead ofpkg*1e6+core_idwhen the latter collapses. A guard like "if all core_id identical and only one CPU per core_cpus_list, use the CPU index as the core" would cover Tegra without changing x86/SPMT behavior.Impact (measured here)
With the model's experts mostly GPU-resident, the 1-worker default did not change decode measurably:
strata tune autobaseline (default, 1 worker) 31.9 tok/s vs--pool-workers 1032.0 tok/s (within noise). Prefill 4K/16K went 745/891 -> 776/900 tok/s with 10 workers (small, +/- noise). So this is a correctness/portability issue rather than a proven speed win on this box; it would matter more for CPU-heavy (low-VRAM) configurations and for anyone reading the reported pool size.Reproduction status: reproduced locally (startup log + sysfs on the machine above). A
pool_workers/topology unit-test on an aarch64 host (or a fake sysfs with repeated core_id) would pin it down.@potoior commented on GitHub (Oct 29, 2026):
Fixed in PR #4580: identify the physical core by
thread_siblings_list(falls back to(pkg, core)). On the Thor this changes1 worker (1 physical core)to13 workers (14 physical cores). Closing; please reopen if that PR is not merged.@potoior commented on GitHub (Oct 29, 2026):
Reopened — leaving this open until the linked PR is merged.
@Niko1221 commented on GitHub (Nov 5, 2026):
Thanks for taking the time to report this.
Strata has changed a lot since this was opened, and 0.2.11 is out now, so many older reports no longer apply. We're closing issues older than a week that have had no new reports in the last week. Closed here does not mean rejected.
To reopen it takes about two minutes:
/reopen. A check runs and either reopens the issue or lists what is still missing.The rules are in CONTRIBUTING.md.