Zen 4 factorial measurement: four-way hardware interaction and a uProf counter-access question
I’m a researcher at Metatron Dynamics working on a relational mathematics framework (ABR/ABRCE) applied to compute-substrate characterization. I’ve been running a structured hardware measurement study on an AMD Ryzen 5 7600X using AMD uProf and have reached a measurement boundary where input from AMD engineers would be particularly useful.
The measured result
I ran a 16-node factorial experiment across four declared factors on Zen 4:
-
A — Access pattern: sequential vs. scrambled
-
D — Dependency structure: independent vs. chain-8
-
S — Working-set size: S0 ≈ 4 MB vs. S1 ≈ 32 MB
-
B — Branch pattern: branch-free vs. data-dependent branching
Each node was measured under uProf assess_ext on a Ryzen 5 7600X / DDR5-5600 / Windows 11 system.
The resulting four-way interaction is:
I_{A,D,S,B} = 1.937
The value was independently reproduced through three paths through the 4-cube.
Within this declared experiment, the measured effect of changing one factor depends substantially on the states of the other factors. Access pattern, dependency structure, working-set size, and branching therefore cannot be treated as independent contributors to the measured hardware response in this domain.
Importantly, this result does not depend on resolving the remaining microarchitectural questions below. Those concern explanation of the measured behavior, not establishment of the interaction itself.
Following the interaction into assembly
To investigate one part of the result, I isolated a pointer-chase workload (chain-only) and emitted the release assembly.
The hot loop (.LBB13_3) contains nine instructions and two branches. It includes an exact-address stack store/load pair at 40(%rsp), with a bounds-check sequence (cmpq / jae) between the store and subsequent load.
The assembly therefore establishes the instruction structure associated with a store-to-load-forwarding candidate.
It does not establish the timing contribution of store-to-load forwarding, the intervening bounds check, or their microarchitectural interaction. Those remain open measurement questions.
Where the instrumentation stops
The chain-only loop contains two distinct load types per iteration:
-
A load from
40(%rsp)associated with the stack recurrence / STLF candidate. -
A load from
chain[current], the pointer chase, which may be serviced at different levels of the memory hierarchy depending on the state.
The available uProf assess_ext measurement aggregates relevant demand fills through ls_dmnd_fills_from_sys. I therefore cannot use that aggregate to assign refills independently to the two load types.
The events I would like to measure are:
-
ls_stlf— PMCx035 -
ls_bad_status2.stli_other— PMCx024, UMask0x02
Neither appears in the uProf predefined event set exposed on this Ryzen 5 7600X configuration, and attempts to specify the raw event codes through AMDuProfCLI are rejected. Data Fabric counters likewise do not appear to be exposed through uProf on this desktop Ryzen configuration.
That leaves a fairly precise instrumentation boundary:
OC-DC-1: load-type-specific refill disaggregation cannot currently be established with the counters available to this experiment.
OC-STLI-1: STLI_OTHER changed from approximately 0 to 75.8 PTI between the chained+values and chain-only measurements, but its timing relation to CPI remains undeclared.
Questions for AMD engineers
1. Is there a supported method for collecting ls_stlf and ls_bad_status2.stli_other on Ryzen 7000 under Windows, either through AMD uProf or another AMD-accessible profiling interface?
2. If these events are not externally accessible on this platform, is there another counter or measurement method AMD would recommend for distinguishing the stack-recurrence behavior from the pointer-chase demand fills?
If those measurements require AMD-internal instrumentation, then I think we’ve reached a useful handoff point: the experiment provides a measured four-factor interaction of 1.937 on Zen 4 silicon, the unresolved relation has been localized to a specific measurement boundary, and the additional counters needed to investigate it are known.
More broadly, this experiment has been an interesting demonstration of something we’re exploring with relational characterization: rather than attempting to model the processor as an undifferentiated collection of every available counter, we expand the declared measurement domain when an observable result requires another relation to be resolved.
The CPU is complex enough that this discipline has become extremely useful.
The complete experiment—including the execution record, factorial measurements, assembly declaration, open-condition register, and processor relation ledger—is available here:
I’d be very interested in technical criticism of either the experiment or the interpretation, and especially in guidance from AMD engineers familiar with Zen 4 performance-monitoring event exposure.