Repository navigation
borealis: share VDM indirect bounds, tri-merge, workgroup coalescing, and weak WAR barriers to G15 and G16G - #1130
Conversation
… and weak WAR barriers to G15 and G16G Promote four AGX3B hardware and command-stream capabilities in agx_chip_caps.h / agx_chip.h from G17P+M5 to G15 and G16G: - AGX_CAP_VDM_INDIRECT_INDEX_BOUNDS (G15G/S/C, G16G): eliminates the software compute index-buffer rewrite pre-pass on dword-aligned 16/32-bit indirect indexed draws within 32-bit byte bounds. - AGX_CAP_TRI_MERGE_ACROSS_SIDE_EFFECTS (G16G): enables HAL200 fragment triangle merging across memory writes and wide subgroup operations. - AGX_CAP_COALESCE_PURE_GLOBAL_WORKGROUPS (G15G/S/C, G16G): coalesces small pure-global direct compute workgroups to 256/512 threads on large grids. - AGX_CAP_CDM_WAR_WEAK_BARRIER (G15G/S/C, G16G): uses the preceding launch's weak ordering record instead of a strong cache flush on execution-only and WAR compute barriers. Update test-chip, test-chip-caps, and test-hk-index-robustness to match. Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
DjDeveloperr
left a comment
There was a problem hiding this comment.
Verdict merge at e51e2bf82b79 after a forward merge (see below).
Blockers none.
Checked
- VDM indirect-index bounds, pure-global workgroup coalescing and weak WAR barriers move from the G17P row to
AGX_CAPS_NATIVE. Tri-merge across side effects is added for G16G only. The quirk table matches: the VDM index-bounds quirk moves toAGX_QUIRKS_NATIVE, and G16G gains the tri-merge quirk. - The rows at this head are on G15G and G16G, and G17P is identical.
- This, #1131 and #1132 each edit the same lines of
agx_chip_caps.h, so only one can land as is. #1131 goes first. After that, please merge aurora-wip into this branch and re-run your G15G/G16G set at the new head, because #1131's two capabilities will be on alongside these. I'll only check the resolution.
|
J516s (MacBook Pro 16" M3 Pro, G15S, 27.2 stub) row for |
|
J773g (M4 Mac mini, G16G B0) at VK CTS: 24,498 cases per build, 3 parallel workers:
Both builds: 9,985 pass, 14,513 not supported, 0 fail. 0 cases differ. gpubench-vk, same-boot ABBA (
Health: 0 GPU faults or recoveries, and 0 failed units. The kits were removed from the Mac afterwards. |
#1131 (73b0941) moved AGX_CAP_MOD3_REG_BANK_RA and AGX_CAP_SIGNED_ZERO_MINMAX_SELECT from AGX_CAPS_G17P to AGX_CAPS_NATIVE, and ba468be enabled tri-merge across side effects on M5. Resolve: AGX_CAPS_NATIVE takes both sets of moved capabilities, AGX_CAPS_G17P drops all five, and the tri-merge test row has both G16G and the M5 parts set. Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
|
Forward-merged Resolution in Local x86 drm-shim gate: 335 OK / 0 FAIL at @DjDeveloperr Please check the resolution, as you offered. Row needed at |
Bring in aurora-wip 9ce6bc3. The only conflict is in test-hk-root-size.c: keep aurora-wip's new small-grid workgroup split asserts, and keep this branch's capability comment (pure-global coalescing on native AGX3 and M5). agx_chip_caps.h merged cleanly: the new G13-only capabilities do not change the G15/G16G/G17 sets. Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
|
Forward-merged aurora-wip |
There was a problem hiding this comment.
Verdict: HOLD at 0ad5d37f
Blockers:
src/asahi/lib/agx_chip.h:849(comment onagx_chip_vdm_indirect_index_bounds()): this PR turns the hardware index bound on for G15 and G16G, but the evidence isrobustness.index_access.*indirect*22/28 and the indexed indirect draws. The same comment records the bar used for G17P and M5: the 28-case bit-exact comparison against the software rewrite (partial and full out-of-range draws, 32-bit firstIndex wrap, signed vertexOffset, multi-draw firstInstance, primitive restart, indirect count), plusvertex_access.*index*androbustness2. If G15 or G16G does not zero-fill in one of those cases, an out-of-range index fetch reads past the buffer under robustBufferAccess2, and the software rewrite that prevented that is gone. Fix: run that comparison and thevertex_accessindex group on J615 and J713, put the numbers in the PR, and rewrite the comment to say G15 and G16G are measured.- Conflict with
aurora-wipinsrc/asahi/lib/tests/test-chip.c. The rows were taken on base69179743. Since thenaurora-wiphas changedagx_chip.handagx_chip_caps.hagain (for exampleAGX_CAP_COMPUTE_COHERENT_STOREand the PBE queued buffer copy cap). After the merge the changed files are no longer byte-identical to what was tested. Re-run the host suite and one J615 and one J713 CTS row (synchronization, compute and robustness groups) at the merged head.
Checked: The change is table-only: the four caps move into the shared native macros, and the code paths read the caps, not the chip. G17P keeps all four (index bounds through AGX_QUIRKS_NATIVE, tri-merge still in AGX_QUIRKS_G17P and AGX_CAPS_G17P, coalescing and the weak barrier through AGX_CAPS_NATIVE). The M5 rows are unchanged, and G15D, G16S and G16C (not admitted) are unaffected. In hk_cmd_buffer.c the weak-barrier path still requires no cache-flush dependency, no host access, no alias scope and no pending transfer, so only the gate changes, not what the path allows. No Apple material, no attribution.
Evidence and non-blocking notes
- Read at
0ad5d37f(PR commite51e2bf8plus two merges ofaurora-wip):agx_chip.hquirk macros and chip rows,agx_chip_caps.hcap macros and rows, consumershk_cmd_draw.c:15031(index bounds),agx_chip.h:1271(tri-merge),hk_cmd_dispatch.c:5085andhk_shader.c:6319(coalescing),hk_cmd_buffer.c:1685(weak barrier). git merge-treeagainstaurora-wip(fetched 15:37 AEDT): conflict insrc/asahi/lib/tests/test-chip.conly.- Comments that are now wrong and should change with the rows (not blocking on their own):
agx_chip_caps.hAGX_CAP_COALESCE_PURE_GLOBAL_WORKGROUPS: "off on G15, G16 ... until per-generation hardware A/B and CTS rows are collected".agx_chip_caps.hAGX_CAP_CDM_WAR_WEAK_BARRIER: "G15 and G16G keep the flush until measured there".agx_chip_tri_merge_across_side_effects(): the G17P basis is the native program metadata; "on other chips it is unverified" is now wrong for G16G. Say what the G16G basis is (the fragment atomics and subgroup framebuffer rows).
- G15S and G15C stand-in by J615 (G15G) is stated in Not yet; fine.
|
Forward-merged Conflict: Host check at |
There was a problem hiding this comment.
The forward merge preserves the intended G15/G16G capability changes, and the test-chip resolution retains the new base column. The correctness gate is still open: the host chip-table test proves the bit is selected, while the G15/G16G rows must prove the hardware bound matches the software rewrite. Please attach the exact 28-case comparison and classify the six failures in the prior 22/28 result, or leave VDM indirect index bounds off on the unqualified chips and split that capability from the other changes.
|
G15G row for the open review point, at J615 (MacBook Air M3, G15G,
Per-case table: |
|
Pushed the forward merge |
There was a problem hiding this comment.
Verified the forward merge has no manual resolutions. The exact J615 comparison reports 22 Pass and six matching NotSupported device-address cases plus 41/41 indirect draw passes. This closes the G15G status classification. The G16G comparison is still outstanding, as are the requested vertex-index and robustness checks if they are outside the reported filters. Keep the VDM bound gated on that evidence.
|
G16G half of the review point, at
Together with the G15G row above, that's the exact 28-case comparison on both chips the capability is promoted to, with the six non-passes classified. Table: |
There was a problem hiding this comment.
Verdict: MERGE at 35ebceb after the combined regression checks.
Checked: Both exact-head G15G and G16G A/B posts report identical results in all 28 indirect robustness cases and 41/41 indexed indirect passes in each arm. The six NotSupported cases require the unexposed device-address extension. No GPU recoveries or submit failures were reported. This clears the earlier missing G16G comparison and classification. Keep the broad regression and live-base checks.
|
Broad G16G row at Result: 0 status changes. Both arms (and the sibling PR arm) have identical totals: 10,981 Pass, 14,000 NotSupported, 59 Crash, 1,555 DeviceLost. 0 GPU firmware crashes. The DeviceLost/Crash set is the known fleet85 kernel submit-EINVAL baseline on this Mac and is the same case by case on every arm. Table: |
|
Merge-train landing at
Revert: |
What
Promote four AGX3B hardware and command-stream capabilities in
src/asahi/lib/agx_chip_caps.handsrc/asahi/lib/agx_chip.hfromG17P+M5 toG15(G15G/G15S/G15C) andG16G:AGX_CAP_VDM_INDIRECT_INDEX_BOUNDS(G15,G16G): uses hardware dword-granular out-of-range zero-fill on aligned 16/32-bit indirect indexed draws within 32-bit byte bounds, eliminating the software compute index-rewrite pre-pass.AGX_CAP_TRI_MERGE_ACROSS_SIDE_EFFECTS(G16G): enables HAL200 fragment triangle merging across memory writes and wide subgroup operations (agx_ppp_hal200_fragment_controls_pack).AGX_CAP_COALESCE_PURE_GLOBAL_WORKGROUPS(G15,G16G): coalesces small pure-global direct compute workgroups up to 256/512 threads on large grids.AGX_CAP_CDM_WAR_WEAK_BARRIER(G15,G16G): retains the preceding launch's weak ordering record instead of upgrading to a strong cache flush for execution-only and WAR compute barriers.Update
test-chip,test-chip-caps,test-hk-index-robustness, andtest-hk-root-sizeto match.Tested
Tested: exact-head
e51e2bf82b79hostmeson test --suite asahi325/325 PASS (0 fail), plus isolatedVK_DRIVER_FILESdEQP-VK CTS and same-machinegpubench-vkABBA acrossG15G,G16G, andG17Pregression (base69179743d9aevse51e2bf82b79, 0 failures, 0 GPU faults, 0 new AVCs, Enforcing, 0 failed units):7.3.0-aurora-fleet85):robustness.index_access.*indirect*22/28 Pass,draw.renderpass.indirect_draw.indexed.*41/41 Pass,robustness.{bind_index_buffer2,robustness2}+compute.pipeline52/175 Pass,atomic_operations.*fragment*28/80 Pass,subgroups.ballot.framebuffer.*4/4 Pass,subgroups.arithmetic.framebuffer.subgroupadd_*160/220 Pass,synchronization{,2}.*compute*153/160 Pass,compute.pipeline.basic.*78/81 Pass,compute.pipeline.builtin_var.*11/11 Pass,control96/96 Pass (0 Fail).gpubench-vkABBA:compute.heavy d=1 +0.84%,compute.light d=16 +0.39%,render.light d=1 +0.36%, 0 regressions.7.3.0-aurora-fleet85):robustness.index_access.*indirect*22/28 Pass,draw.renderpass.indirect_draw.indexed.*41/41 Pass,b9_extra52/175 Pass,atomic_operations.*fragment*28/80 Pass,subgroups.ballot.framebuffer.*4/4 Pass,subgroups.arithmetic.framebuffer.subgroupadd_*160/220 Pass,synchronization{,2}.*compute*153/160 Pass,compute.pipeline.basic.*78/81 Pass,compute.pipeline.builtin_var.*11/11 Pass (0 Fail).gpubench-vkABBA:render.light d=1 +0.71% (gpu +1.0%),render.light d=16 +0.89% (gpu +1.5%),render.mdi d=4 gpu +0.9%, 0 regressions.7.3.0-aurora-fleet89): 100% identical CTS (22/28,41/41,74/175,28/80,4/4,160/220,160/160,80/81,11/11,control 96/96), 0 Fail, 0 regressions.Risk
Risk: Low — capability-table promotions only (no new code paths or chip gates); all four paths are already live on
G17Pand M5 and each can be toggled independently inagx_chip_caps.h.G15S/G15Cshare theG15command-stream generation withG15Gand are represented here by J615 (G15G).Not yet
G15S/G15C(J514s/J516c) hardware rows (lab holdsG15GJ615,G16GJ713,G17PNeo/J616s).Detailed hardware receipts & SHA-256 provenance
aurora-wip:69179743d9ae4(libvulkan_asahi.base5.soSHA-256686333bb0f10d665f76f03e5e0cf4e1763f4844210cc4615e877edfa46db4ec9)e51e2bf82b792(libvulkan_asahi.b9.soSHA-256dc9098cf0d432af13a746e51610dbec63e1c6b44ed7eb49a0a91af2ee81b50a2)meson test --suite asahi, release + assertions): 325/325 OK, 0 Fail.Enforcing,FAILED_UNITS=0,GPU_FAULTS_AFTER=0,AVC_AFTER=0, temporary/var/lib/aurora-testcleaned.