Repository navigation
Conversation
jel221
force-pushed
the
feature/dxa-overlap
branch
from
November 23, 2026 02:42
6fd23e4 to
35b6554
Compare
….cp/tc.commit, tmem.ld/st, tmem.alloc/dealloc), with VX_CFG_TCU_WMMA_ENABLE; perf baselines re-recorded with pytest ci -m perf_gate --update-baselines, Beacon baselines with ci/logic_gate.py --update-baseline [--tool beacon_asic] --against-rev 1061088
… x bandwidth, keep read slots and transfer contexts in RAM; add the B200 profile; perf baselines re-recorded with pytest ci -m perf_gate --update-baselines (DXA/TMEM cycles move, the rest only take the new config hash), Beacon dxa/tensor baselines with ci/logic_gate.py --update-baseline --against-rev 1061088
jel221
force-pushed
the
feature/dxa-overlap
branch
from
November 23, 2026 10:32
35b6554 to
42f7aa5
Compare
This branch has not been deployed
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.
Human comment:
IMPORTANT: This is something added on TOP of the TMEM branch, so ideally that should be added before this one.
In the new profiles you created like h100, the modeled memory latency is a lot bigger than the default. This makes the DXA the bottleneck for WGMMA/TMEM. So first, the number of in flight DXA transfers is sized as a function of the memory latency and BW. Also, the DXA doesn't need to complete requests in-order.
Lastly, there's a b200-like profile in there. This is a push on TOP of the TMEM PR, so I added it so that I can see how TMEM behaves under that profile.
AI-generated comment:
DXA: overlapping transfers, latency-sized read window, read slots and transfer contexts in RAM; B200 profile
Builds on #495 (
feature/tmem-dataflow); the diff against that branch is the DXA change and the B200 profile.A DXA worker used to run one transfer at a time with at most
VX_CFG_DXA_MAX_INFLIGHT = 8line reads in flight. Each transfer therefore cost a full memory round trip plus its drain, and behind a long memory latency the read window, not the tensor core, set the speed of DXA-fed kernels.What changes
Overlapping transfers. A worker starts issuing the next transfer while earlier ones drain. A new transfer table (
VX_dxa_xfer_table.sv) holds each transfer's context and counts its lines still to be written. A transfer completes when its last line lands, whichever line that is, so transfers can complete out of order. The SMEM writer's deferred last-line register is gone.Read window sized from the configuration. The in-flight reads per worker follow Little's law, as the cache MSHRs do:
Read slots and transfer contexts in RAM. Read slots and tags come from a RAM and a free-list FIFO (block RAM at large windows). The transfer contexts sit in a RAM read one cycle ahead, so no cycle is added. The few fields needed as a line arrives sit in a small LUTRAM.
SimX: the DXA model follows the RTL. Separately, SimX's local memory now sleeps only when no request is queued toward it. Before, a request placed in the same cycle could wait for a later wake-up. This can make SimX slightly faster for any shared-memory kernel; RTL is unchanged.
B200 profile (
profiles/b200.json): XLEN=32, 148 cores, TMEM (512 columns), FEDP2K, MX/FP4. It is here, on top of Tensor accumulator take 2 #495, to show how TMEM behaves under a Blackwell-like machine. Its L1, L2 and DRAM latencies are calibrated withci/profile_check.pyto the measured B200 values (39, 296 and 824 cycles). The B200 row of the sizing table and the 445-cycle runs below come from it.Unchanged: the ISA, the descriptor format,
expect_tx(still counts transfers) and the barrier path. No kernel changes.Performance
Perf gates (rtlsim, default configuration, re-recorded):
perf_gate-tmemwgmma-sp-dxawgmma-dxawgmma-dxa-mcast-nt16copy-nt16sgemm2-dxa-mcast-nt4wgmma-dxa-mcast-nt4sgemm2-dxa-nt4sgemm2-dxa-nt16sgemm2-dxa-mcast-nt16copy-mcastcopy-nt4The default configuration has no platform memory latency, so its window stays at 8 reads. The gains above come from overlapping transfers only.
Behind a real memory latency (rtlsim). These runs use the default 1-core model plus
-DVX_CFG_PLATFORM_MEMORY_LATENCY=445, B200's DRAM latency. Both kernels use the same configuration: NT=8, 16 warps, issue width 4, FEDP2K, fp16 → fp32. At this latency the new DXA sizes itself to 512 reads and 16 transfers; the old one stays at 8 reads.sgemm_tcu_tmem)sgemm_tcu_wg_dxa,WGMMA_NRC=32)Area (Beacon,
dxaDUT: NT=16, 16 warps)smem_wrgoes from 15 to 13 levels andgmem_reqfrom 9 to 8. The DXA's worst path stays at 15.Tests
model_parity-tmem-lat300(dxa.yaml): TMEM GEMM 64×64×256, 2 CTAs, 300-cycle memory latency, so several transfers overlap.pytest ci -m perf_gate -k 'dxa or tmem' --update-baselines. Every perf gate runs on rtlsim, and builds without the DXA are unchanged, so the other gates keep their baselines.ci/logic_gate.py -b dxa --update-baseline.