Repository navigation
borealis: keep render-dependent tiled workgroups at their launch size - #1304
Conversation
On HAL200, coalescing tiled compute after a render shortens the compute interval in rt.scene but lengthens the interval before the next render completes. Preserve the launch granularity when the stream records a dependency on a render and the workgroup spans multiple rows. Independent dispatches still use the original coalescing policy. Fixes: 887b5bd ("borealis: coalesce small pure-global compute workgroups on AGX3") Signed-off-by: DjDeveloperr <hey@djdev.me>
There was a problem hiding this comment.
Verdict: MERGE at bd0c677f
Blockers: none
Checked:
src/asahi/vulkan/hk_cmd_dispatch.c(dispatch_grid_shader): verifiedrender_dependent = agx_chip_native_hal200(dev->dev.chip) && local_size.y > 1 && cs->sync.dep[HK_SYNC_VDM].cutcleanly gates onlyhk_coalesce_workgroup_size_ex(), leavinghk_split_workgroup_size_ex(), 1D dispatches (local_size.y == 1), independent dispatches (dep[HK_SYNC_VDM].cut == NULL), and non-HAL200 chips completely unchanged.- Verified exact-head MacBook Neo (
J700,G17P B1) same-boot ABBA/BAAB (702dd0165bdvsbd0c677f1b1, stock7.3.0-41, SLC enabled):rt.sceneraster 1080p d=2+1.89%(4/4 pairs, 145.20 -> 147.95 fps), alpha-off d=2+1.76%, standalone pure-global WG32/WG64 controls neutral (-0.32%/+0.25%), all CRCs and ray-query controlb500519bidentical, 0 GPU faults, 0 AVCs. - Verified 1,801 targeted Vulkan CTS cases (
1,557Pass,244NotSupported,0fail) and Fedora 44 Mesaasahisuite222/222in both release and-Db_ndebug=false.
Evidence
- Diff reviewed at
bd0c677f(+11/-4insrc/asahi/vulkan/hk_cmd_dispatch.c). - Minor body nit (non-blocking):
## Riskdescribes the scope clearly, though explicitly taggingtwo-way · MacBook Neo (HAL200 / G17P) Vulkanmakes the rollback posture immediately scannable.
DjDeveloperr
left a comment
There was a problem hiding this comment.
Verdict — HOLD at bd0c677f1b177c552b1ef5a239d6b3da4afb888b
Blocker — second-generation hardware row. M4 Pro (T6040) and M4 Max (T6041) use the G17P profile on the G17 runtime, so both reach the changed coalescing branch. J700 covers A18 Pro. Before merge, run a same-boot baseline/head comparison on a T6040 or T6041 with tiled raster d=2 and the pure-global controls. Chip mapping
Checked — clean merge tree against aurora-wip at 702dd0165bd, matching DCO, provenance, and Fedora 44 Asahi 222/222 with b_ndebug=true and b_ndebug=false.
Evidence
- The launch decision reads the compute stream's local VDM cut after barrier tracking. Reset clears that state, and secondary buffers replay into the primary. Render suspension/resumption and submit packing retain the existing sync machinery. Cross-buffer history and semaphore waits still resolve at submit. Shader binaries are independent of this launch decision.
- The focused CPU check passed 13/13. Reverting the change produced 32×8 instead of 8×8 for the render-dependent case on all three G17P-profile identities. Independent 2D, 1D, small-grid splitting and the G15G, G16G and M5 controls passed in both versions.
- Raw J700 ABBA/BAAB logs support the reported +1.89% raster d=2 and +1.76% with alpha off. CRCs matched and standalone WG32/WG64 timings stayed within 0.32%. Targeted CTS recorded 1,557 Pass, 244 NotSupported and 0 Fail.
|
@DjDeveloperr, code-owner heads-up: App approval at |
|
Merge-train landing at
Revert: |
What
Keep the original workgroup size for multi-row HAL200 compute dispatches with a recorded render dependency. J700’s 1080p
rt.scenecomposite dispatch grew from 8×8 to 32×8 after workgroup coalescing landed. That reduced the compute interval and increased the time before the next render completed. Independent dispatches continue to use the existing coalescing policy. Mesa #936Tested
MacBook Neo J700, G17P B1, stock
7.3.0-41.fc44.aurora.aarch64, SLC enabled. Same-boot ABBA/BAAB compared Fedora aarch64 builds of702dd0165bdandbd0c677f1b1. GPU fault and AVC deltas were zero and the stock snapshots matched.rt.sceneraster 1080p, d=296c503ecrt.sceneraster 1080p, d=196c503ecrt.sceneraster alpha off, d=2d9464b1287b7809287b78092The light ray-query control matched
b500519bacross eight runs. The compute-end to next render-end interval fell from 6018.2 to 5876.4 µs. The standalone controls used 16,777,216 invocations per dispatch and checked every output word on the CPU.asahisuite passed 222/222 in both the normal and -Db_ndebug=false configurations.Benchmark command and per-run medians
gpubench 8679dd1 · Original workgroup benchmark harness
Risk
The condition uses the recorded render dependency on the compute stream and applies only to multi-row HAL200 dispatches eligible for coalescing.