mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #272] [CLOSED] feat(cpu): add hybrid architecture awareness and --pool-affinity for P/E-core CPUs #2539
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#2539
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/272
Author: @praveshkhatana
Created: 9/30/2026
Status: ❌ Closed
Base:
main← Head:feat/hybrid-cpu-affinity📝 Commits (1)
640706ffeat(cpu): add hybrid architecture awareness and --pool-affinity for P/E-core CPUs📊 Changes
3 files changed (+261 additions, -35 deletions)
View changed files
📝
include/strata/kernels/cpu/pool.hpp(+33 -2)📝
src/kernels/cpu/pool.cpp(+205 -30)📝
src/program/generate.cpp(+23 -3)📄 Description
Summary
On hybrid CPU architectures (e.g. Intel 12th–14th Gen / Core Ultra Alder Lake, Raptor Lake, Arrow Lake, and hybrid Linux systems), the CPU expert pool previously treated all physical cores as homogeneous and populated worker affinities linearly.
This created two issues on hybrid platforms:
wait_done/wait_parked) causes fast P-core workers to stall waiting for E-core workers, lowering aggregate CPU drain bandwidth.What this PR introduces
detect_cpu_topology):GetLogicalProcessorInformationEx(RelationProcessorCore)to inspectProcessor.EfficiencyClassandLTP_PC_SMTflags to identify P-cores vs E-cores and logical thread pairings./sys/devices/system/cpu/cpu*/cpu_capacityand topology sysfs files to identify core types.pool_workersis unspecified (<= 0), it defaults to(p_cores - 1)so that all workers run unthrottled on dedicated physical P-cores.--pool-affinity auto|p-cores|all(defaultauto).--pool-affinity auto: Prioritizes P-cores, defaults pool workers to P-core count minus host core.--pool-affinity p-cores: Strictly restricts workers to P-cores and their SMT siblings.--pool-affinity all: Preserves legacy sequential physical core allocation.%d P-cores / %d threads, %d E-cores) and effective worker count and affinity mode.Verification & Benchmarks
is_hybrid == falsefalls back to identical legacy behavior.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.