Repository navigation
Conversation
…o1221#4578) On some aarch64 SoCs (Jetson AGX Thor / Tegra) every CPU reports topology/core_id = 0, so the (physical_package_id, core_id) key collapsed all logical CPUs to one physical core and the CPU expert pool started a single worker on a 14-core part: CPU pool: 1 workers by default (1 physical cores, 14 logical processors) Use thread_siblings_list (the logical CPUs that share one core) as the core identity, with the smallest id in the list as the key. On an SMT x86 core the list ('0,16') still names the same smallest id from both threads, so the grouping is unchanged there; the code falls back to (pkg, core) when the file is absent or unreadable. Sibling lookup and the physical-core count now use the same key. Validated on Jetson AGX Thor (14 logical CPUs): 'CPU pool: 13 workers by default (14 physical cores, 14 logical processors)' (was 1). pool_plan_test passes; pool_test is skipped on aarch64 (no AVX-512). Decode/prefill are unchanged on this GPU-resident workload (~32.9 tok/s decode), so this is a correctness/portability fix, not a speed one. No new automated test: detect_cpu_topology reads /sys directly (no STRATA_TEST_SYSFS_ROOT hook), so it cannot be faked from a unit test yet. Related: Niko1221#4578.
|
Thanks for the pull request. To keep the tracker readable, every item needs an area prefix in the title and the parts of the pull request template filled in. This one is missing:
Edit the pull request (title and description) and this note goes away on its own. If it is still missing parts in 5 days it will be closed, which is not a rejection: fix it and comment Details: CONTRIBUTING.md |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #4578.
Problem
On some aarch64 SoCs (here a Jetson AGX Thor / Tegra, 14 logical CPUs) every CPU reports
topology/core_id = 0andphysical_package_id = 0. The Linux topology reader insrc/kernels/cpu/pool.cppkeys a physical core byphysical_package_id * 1e6 + core_id, so all CPUs collapsed to one core and the CPU expert pool started a single worker:strata tune autoalso reportedfacts.workers = 1.Change
Identify the physical core by
thread_siblings_list(the logical CPUs that share one core), using the smallest CPU id in the list as the key. On an SMT x86 core the list is e.g.0,16, which names the same smallest id from both threads, so the grouping is unchanged there; the code falls back to(pkg, core)when the file is absent or unreadable. Sibling lookup (sibling_of) and the physical-core count (p_cores) now use the same key.Validation (on the affected hardware)
Jetson AGX Thor, aarch64, 14 logical CPUs, source build
-DCMAKE_CUDA_ARCHITECTURES=110:CPU pool: 1 workers by default (1 physical cores, 14 logical processors),1 expert-pool workers + the host threadCPU pool: 13 workers by default (14 physical cores, 14 logical processors),13 expert-pool workers + the host thread/healthok.pool_plan_test: OK (the x86 plan cases are unchanged).pool_test: SKIPPED on aarch64 (needs AVX-512), not a regression.Not done
No new automated test:
detect_cpu_topologyreads/sysdirectly (noSTRATA_TEST_SYSFS_ROOThook, unlikecpu_numa_node), so a fake-sysfs unit test would need that hook first. Happy to add one if you want the refactor.Reproduction status: reproduced and fixed on the machine above.