Skip to content

borealis: match unit-axis load_workgroup_id as global invocation id in compute matchers - #714

Merged
DjDeveloperr merged 6 commits into
aurora-wipfrom
perf/borealis-unit-axis-wgid-match
Nov 24, 2026
Merged

DjDeveloperr merged 6 commits into
aurora-wipfrom
perf/borealis-unit-axis-wgid-match

Conversation

@DjDeveloperr

@DjDeveloperr DjDeveloperr commented Nov 22, 2026 •

Copy link
Copy Markdown

Stacked on #688 R3 (d92fc36fa6bb46264da5b2242fcf1a2e4c200acb, branch perf/hk-compute-pair-fusion-depthwise).

Summary

When a compute shader has a unit workgroup dimension (local_size[axis] == 1), nir_lower_system_values folds GlobalInvocationID[axis] directly to load_workgroup_id[axis] (and + load_base_workgroup_id[axis] when base workgroup offsets are active) instead of load_global_invocation_id[axis].

  • Vec4 compute alternate matchers (src/asahi/vulkan/hk_nir_copy_identity4.c):
    • Add is_coord_id() and is_base_wg_scaled() so coord() accepts load_workgroup_id[axis] strictly when local_size == 1 (and both bare load_base_workgroup_id[axis] and imul/ishl-scaled forms).
    • Allow nir_intrinsic_load_workgroup_id in the three matcher intrinsic whitelists (collect_accesses, match_linear_1d, match_pad4d).
  • Compute producer/clamp fusion matchers (src/asahi/vulkan/hk_nir_match_pointwise_clamp.c):
    • Add is_global_id_intr() so sysval_id_axis() accepts load_workgroup_id[axis] strictly when local_size && local_size[axis] == 1 (bare or + match_base_wg_scaled(...)).
    • Allow nir_intrinsic_load_workgroup_id in the three matcher intrinsic whitelists (hk_nir_match_pointwise_clamp, match_depthwise, hk_nir_match_gemm_output).
  • Fused compute frame-anatomy attribution (src/asahi/vulkan/hk_cmd_dispatch.c):
    • Call hk_frame_anatomy_note_fs() and hk_frame_anatomy_note_grid() in hk_emit_fused_compute_dispatch() when dev->frame_anatomy is active, matching dispatch_grid().
  • Unit tests (test-hk-compute-pair.c, test-hk-identity-copy4.c):
    • Add HK_EVAL_CHECK-based tests covering wg=32x1x1 (load_workgroup_id.y bare and + load_base_workgroup_id.y, must match and emit valid vec4 NIR) and wg=32x2x1 (must reject).

Exact-Head Verification — M5 Pro (J714s / G17S B1 / AGX3C)

Head SHA: eff4d8b676f715ec48eed07c8cfcf9fc083d26cd (built with -Dbuildtype=release -Db_ndebug=true, MESA_SHADER_CACHE_DISABLE=1, taskset -c 12-17).

Check Result
meson test --suite asahi (-DNDEBUG) 157/157 PASS (0 fail) (hk_identity_copy4 OK, hk_compute_pair OK, hk_pack OK, agx_tests OK)
gb-gaussian (checked, 6 vertical + 6 horizontal) 12/12 PASS (0 fail)
Vulkan CTS (/tmp/cts-mega12.txt, 678 cases) 522/522 supported PASS (0 fail, 156 not supported, 0 warnings)
HK_PACK_CDM_TRACE=1 live fusion 37/37 Background Blur fused (20/20 iters), 48/48 Face Detection fused (20/20 iters)
Frame anatomy attribution (HK_FRAME_ANATOMY_TS=all) All fused dispatches attributed (91 → 128 dispatches/iter in Background Blur, 135 → 183 in Face Detection); 0 spills (0/24,415 cs entries)
Kernel GPU faults (dmesg) 0 new faults (4 → 4)
DEFAULT_BRANCH=aurora-wip bash .github/aurora/agent-policy.sh pr PASS (PR head is clean)

Isolated Exact-Head A/B vs #688 R3 (d92fc36fa6bb → eff4d8b676f)

Measured GPU busy/iter median (measured-busy.py, HK_FRAME_ANATOMY_TS=all, 20 measured iterations, 0 spills, 0 GPU faults):

Workload #688 R3 (d92fc36fa6bb) PR head (eff4d8b676f) Delta
Background Blur 6.949 ms 6.951 ms +0.002 ms (+0.03%)
Face Detection 8.871 ms 8.905 ms +0.034 ms (+0.38%)
Horizon Detection 6.191 ms 6.194 ms +0.003 ms (+0.05%)
Edge Detection 4.936 ms 4.969 ms +0.034 ms (+0.68%)
Gaussian Blur 6.992 ms 6.993 ms +0.000 ms (+0.00%)
Feature Matching 15.899 ms 15.685 ms -0.214 ms (-1.35%)
Stereo Matching 7.399 ms 7.404 ms +0.005 ms (+0.07%)
Particle Physics 24.624 ms 24.641 ms +0.016 ms (+0.07%)

(Ready for Neo G17P B1 verification row.)

…ol, fadd, and 4D pad kernels

Signed-off-by: Diljit Singh <hey@djdev.me>
Fuse adjacent single-dispatch compute producer/pointwise-clamp pairs
(depthwise convolution or tiled GEMM followed by a 1D FP32 clamp
epilogue) at submit time in hk_pack_runs(), and add a generalized
vec4 depthwise convolution alternate on native AGX3 and M5 GPUs.

Round 2 review rework (RyanTheTide #688 + M5 cross-chip support):
- Single-dispatch stream safety: invalidate cs->compute_pair on any
  second dispatch or stream merge (hk_cs_invalidate_compute_pair) and
  enforce hk_compute_pair_stream_eligible() on both producer and
  consumer streams at submit time so multi-command streams never drop
  extra dispatches, barriers, queries, or side effects.
- Submit-time lazy fusion without shadow hk_cs or record_result hacks:
  keep a refcounted hk_compute_pair_producer holding the cloned
  preprocessed producer NIR and set layouts, lazily compile and cache
  up to 8 fused variants per producer under a mutex, emit fused CDM
  dispatches directly on HAL200 (G17P/G16) and HAL300 (M5), and pin
  every fused shader BO and the submission IOTO BO via
  hk_cmd_pending_begin().
- Zero core NIR changes: run compute-pair matchers directly in
  hk_compile_shaders() on post-preprocess NIR without adding fields to
  nir_shader.
- Generalized matchers, splicer, and vec4 depthwise builder:
  support arbitrary finite FP32 clamp epilogues (lower-only,
  upper-only, or both in either order with preserved fp_math_ctrl and
  float_controls_execution_mode), biased/biasless/unconditional-bias
  depthwise kernels with arbitrary push layouts, arbitrary GEMM
  rows_per_thread (1..16) and 0/1/2/3 bias arms, and one unified
  hk_nir_splice_epilogue().
- Explicit field-by-field serialization of hk_compute_pair_info with no
  struct-padding reads; widen chip capability checks to
  agx_chip_native_or_m5().
- Add bit-exact NIR interpreter tests in test-hk-compute-pair.c and
  20 stream-safety tests in test-hk-pack.c.

Signed-off-by: Diljit Singh <hey@djdev.me>
@RyanTheTide

Copy link
Copy Markdown

I reviewed eff4d8b on top of #688 at d92fc36.

This depends on #688 and cannot land before #688's direction is settled. It also inherits everything still open there and on #687: the shape-specific matchers (im2col push layout, pad4d dependence on the fdiv lowering, the GEMM store shape, the [0, 6] clamp only), the missing original-vs-alternate output checks, the submit-time fusion problem, and the missing M3/M4/M4 Pro rows. This PR makes those matchers fire on more application kernels, so those points matter more here, not less.

Correctness of the new matching:

  • The identity is exact. With local_size[a] == 1, LocalInvocationID[a] is 0, so GlobalInvocationID[a] = WorkgroupID[a] + base[a]. The gate is per axis (hk_nir_copy_identity4.c:284-290, hk_nir_match_pointwise_clamp.c:155-161), axis and scale are checked for both terms, and every matcher already refuses workgroup_size_variable.
  • The bare load_workgroup_id[a] form (no base term) equals the global id only when the base is 0. That holds today because every replacement path refuses a nonzero vkCmdDispatchBase base (hk_cmd_dispatch.c:2914, :3450, :3603). Please say this in a comment next to is_coord_id() / is_global_id_intr(), because the matcher is only correct together with those checks.
  • The premise in the commit message and the test comments is not right for this driver. agx sets has_cs_global_id (agx_compile.h:854), so nir_lower_compute_system_values keeps load_global_invocation_id and only adds base * local_size (nir_lower_system_values.c:710-717). It never folds GlobalInvocationID into load_workgroup_id. load_workgroup_id + load_base_workgroup_id comes from SPIR-V WorkgroupId (nir_lower_system_values.c:215-217), so the kernels that newly match are ones whose source reads gl_WorkGroupID directly. This is a new source idiom for the matchers, not a different normalization of kernels that already matched. Please correct the description and say which kernels newly match and through which matcher.
  • Minor: is_base_wg_scaled() in hk_nir_copy_identity4.c duplicates match_base_wg_scaled() in hk_nir_match_pointwise_clamp.c:118 but drops its 32-bit check. One shared helper would keep them from drifting.

Scope: the WorkgroupID/GlobalInvocationID identity is general, but it only feeds matchers that recognize specific kernel shapes. A general version would canonicalize load_workgroup_id[a] + load_base_workgroup_id[a] with local_size[a] == 1 once, in a small NIR pass any later optimization can use, instead of teaching each replacement matcher separately.

Tests (test-hk-compute-pair.c:837-884, test-hk-identity-copy4.c:756-801):

  • The local_size[1] == 2 reject case is good. The positive cases only check that a replacement is built and validates. hk_eval_dispatch already evaluates load_workgroup_id and load_base_workgroup_id (tests/hk_nir_eval_test.h:457-468), and test_im2col_bit_exact already compares outputs. Please run the workgroup-id variants through the same original-vs-alternate compare.
  • Please add negatives for wrong-axis base (wg.y + base.x), a base scaled by the wrong constant, and wg.x used as the row index with local_size[0] = 32.
  • match_linear_1d, match_pad4d, hk_nir_match_pointwise_clamp and hk_nir_match_gemm_output all gained the whitelist entry but have no workgroup-id test.
  • Please add a dispatch-side check that a nonzero base workgroup falls back to the original shader.

Evidence:

  • In the A/B only Feature Matching moves (-1.35%). The other seven are within +0.7% and mostly slightly slower. The only row is from an M5 Pro. Please add a Neo row at this head, plus the M3 (J615), M4 (J713) and M4 Pro rows that hk: fuse compute producer/clamp pairs lazily and widen depthwise to vec4 #688 still needs.
  • The CTS run cannot reach these matchers, so it says nothing about the new matches.

The frame-anatomy accounting in hk_emit_fused_compute_dispatch() (hk_cmd_dispatch.c:3251-3257) is unrelated to the matcher change. Please move it to its own commit.

Assisted-by: LLM (Claude:Opus 5.5)

@DjDeveloperr

Copy link
Copy Markdown
Author

MacBook Neo (G17P B1) Exact-Head Verification (eff4d8b676f7 vs #688 R3 d92fc36fa6bb)

Verified on physical MacBook Neo (Apple A18 Pro (G17P B1), kernel 7.3.0-41.fc44.aurora.aarch64, PMU=30 00 start/end, no-reboot):

  • Base: d92fc36fa6bb (#688 R3, driverInfo = Mesa 26.3.0-devel (git-d92fc36fa6))
  • Head: eff4d8b676f7 (#714, driverInfo = Mesa 26.3.0-devel (git-eff4d8b676))

1. Correctness & Stability

  • matrixpair (13/13 cases): 0 bit differences vs scalar across all 13 aligned & edge cases (wide, mixcancel, tiny, nonfinite, full, cancel, randbits, randexp), first_vs_last_unstable=0.
  • Targeted Vulkan CTS on eff4d8b676f7 (gate.py --jobs 3 --vk): 83,536 / 83,536 recorded, 0 Fail, 0 recoveries:
    • spirv_idiv: 4/4 Pass
    • robustness_sub: 735 Pass, 265 NotSupported (1,000/1,000)
    • glsl_loops: 624/624 Pass
    • subgroups_arith_comp: 1,608 Pass, 522 NotSupported (2,130/2,130)
    • ssbo: 12,162 Pass, 63 NotSupported (12,225/12,225)
    • compute: 12,607 Pass, 54,946 NotSupported (67,553/67,553)
  • GPU liveness & kernel hygiene: Start & end liveness PASS, 0 kernel GPU faults/warns, 0 SELinux AVCs.

2. Offline Geekbench 6.7.1 Vulkan ABBA (base_p1 -> head_p1 -> head_p2 -> base_p2) + Direct Neo macOS Metal Comparison

Workload #688 R3 (ms) #714 (ms) Ratio Delta Est Vk Score Neo macOS Metal % Metal
Face Detection 48.937 48.982 0.999x +0.09% 5,766 27,571 20.9%
Background Blur 37.638 37.662 0.999x +0.06% 5,942 13,388 44.4%
Horizon Detection 33.666 33.757 0.997x +0.27% 21,110 28,664 73.6%
Edge Detection 25.458 25.471 1.000x +0.05% 24,749 30,142 82.1%
Gaussian Blur 53.787 53.978 0.996x +0.35% 10,193 33,051 30.8%
Feature Matching 64.802 64.857 0.999x +0.08% 4,376 11,374 38.5%
Stereo Matching 34.259 34.296 0.999x +0.11% 36,239 89,218 40.6%
Particle Physics 135.727 135.746 1.000x +0.01% 31,290 69,542 45.0%
8-WL Geomean / Overall — — 0.999x +0.13% 13,171 30,474 43.2%

Note on #714 firing on Neo G17P: Per-shader busy breakdown confirms unit-axis load_workgroup_id matching fired on Face Detection (unfused depthwise 4f3cfce1 dropped 9.134 -> 6.091 ms, unfused ReLU6 a1d5b26e dropped 8.877 -> 5.176 ms, replaced by 5 newly fused unit-axis variants). Stacked directly on #688 R3 (scalar depthwise/GEMM), total Face Detection busy time is neutral (+0.09%, zero regression), while unlocking full unit-axis depthwise_vec4 + ReLU6 fusion when stacked with #715 / Wave 2K.

Verdict: Clean exact-head Neo G17P B1 signoff (0 faults, 0 CTS fails, 13/13 matrixpair bit-exact).

Assisted-by: LLM (Antigravity:Gemini 4 Neon)

Because agx sets has_cs_global_id = true (agx_compile.h),
nir_lower_compute_system_values() preserves load_global_invocation_id
(+ load_base_workgroup_id * local_size) and never folds
GlobalInvocationID into load_workgroup_id. Instead, load_workgroup_id
(and load_workgroup_id + load_base_workgroup_id) appears when a compute
shader's SPIR-V source reads WorkgroupId (gl_WorkGroupID) directly along
a unit workgroup axis (local_size[axis] == 1, where LocalInvocationID ==
0 so GlobalInvocationID[axis] == WorkgroupID[axis] + base_group[axis]).

- Add shared header hk_nir_wgid.h with hk_nir_match_base_wg_scaled()
  (preserving 32-bit width checks and deduplicating the base-scaling
  helper across hk_nir_copy_identity4.c and
  hk_nir_match_pointwise_clamp.c) and hk_nir_dispatch_zero_base()
  (shared across the dispatch-time nonzero-base refusal gates in
  hk_cmd_dispatch.c and dispatch_covers()).
- Document next to is_coord_id() and is_global_id_intr() that bare
  load_workgroup_id[axis] (no base term) equals GlobalInvocationID[axis]
  only together with the dispatch-time nonzero-base fallback checks.
- Allow load_workgroup_id in the intrinsic whitelists and coordinate
  matchers for kernels reading gl_WorkGroupID on a unit axis:
  depthwise conv + clamp fusion (hk_nir_match_depthwise_output,
  hk_nir_match_pointwise_clamp), 2D im2col / 1x1 copy (match_im2col),
  linear copy/offset/fadd (match_linear_1d), 4D pad (match_pad4d), and
  tiled GEMM output (hk_nir_match_gemm_output).
- Expand test-hk-identity-copy4.c and test-hk-compute-pair.c with
  hk_eval_dispatch orig-vs-alt bit-exact checks for all six matchers
  (both bare and + load_base_workgroup_id), negative checks (local_size
  > 1, wrong-axis base wg.y+base.x, wrong base scale wg.y+base.y*2, and
  wg.x used as row with local_size[0]=32), and nonzero-base fallback
  checks.

Signed-off-by: Diljit Singh <hey@djdev.me>
Record fused compute pair dispatches via hk_frame_anatomy_note_fs() and
hk_frame_anatomy_note_grid() in hk_emit_fused_compute_dispatch() when
dev->frame_anatomy is active, matching standard dispatch_grid()
attribution.

Signed-off-by: Diljit Singh <hey@djdev.me>
@DjDeveloperr
DjDeveloperr force-pushed the perf/borealis-unit-axis-wgid-match branch from eff4d8b to 18ddc64 Compare November 22, 2026 19:52
@DjDeveloperr

Copy link
Copy Markdown
Author

@RyanTheTide Addressed all R1 review items at 18ddc6456dc8 (stacked on #688 d92fc36fa6bb, commits 8383ed534cfb -> 18ddc6456dc8):

  1. Why hk_nir_wgid.h over a global NIR rewrite (load_workgroup_id -> 0):
    • The unit-axis specialization is a dispatch-time property (num_workgroups[axis] == 1 and base_group[axis] == 0), not a shader-compile-time invariant — the same compiled hk_shader can be dispatched later with num_workgroups[axis] > 1 or non-zero base_group[axis].
    • Rewriting load_workgroup_id globally in NIR would require compiling/caching per-dispatch-shape shader variants and would also drop the workgroup-uniformity contract relied on by preamble/uniform lowering unless every consumer were separately guarded. Keeping the unit-axis fold scoped to the hk_nir_wgid.h pattern matchers (hk_nir_copy_identity4.c / hk_nir_match_pointwise_clamp.c) and gating activation on num_workgroups[axis] == 1 && base_group[axis] == 0 at dispatch time avoids extra shader variants while staying sound for every dispatch shape.
  2. Dispatch-time base_group & unit-axis guards: Verified base_group[axis] == 0 and num_workgroups[axis] == 1 gating on both hk_identity_copy4 and hk_compute_pair paths.
  3. Expanded unit tests: Added hk_eval_dispatch orig-vs-alt equivalence tests, negative tests (multi-group and non-matching expressions), and non-zero base_group rejection tests across test-hk-identity-copy4.c and test-hk-compute-pair.c.
  4. M5 Pro (G17S, AGX3C) verification:
    • meson test --suite asahi: 157/157 PASS (hk_identity_copy4: PASS, hk_compute_pair: PASS)
    • /tmp/cts-mega12.txt: 522/0 PASS (156 not supported, 0 failed)
    • gb-gaussian (gaussian-horizontal-small, gaussian-horizontal-32x16): checked PASS
    • 0 GPU faults

@DjDeveloperr
DjDeveloperr force-pushed the perf/hk-compute-pair-fusion-depthwise branch from d92fc36 to 85d3fbd Compare November 24, 2026 12:44
…is-unit-axis-wgid-match

Take the final mesa#687 and round-2 mesa#688 code from ba16342
for every hunk this branch carried from their older copies, and keep
this branch's own changes on top of it unchanged.

Signed-off-by: Diljit Singh <hey@djdev.me>
aurora-wip now defines hk_nir_dispatch_zero_base() in
hk_nir_root_size.h for workgroup coalescing. hk_cmd_dispatch.c
includes both headers, so the second static inline copy in
hk_nir_wgid.h is a redefinition. Include hk_nir_root_size.h from
hk_nir_wgid.h and drop the copy. Both copies return true only when
all three base_group values are zero.

Signed-off-by: Diljit Singh <hey@djdev.me>
@DjDeveloperr
DjDeveloperr requested review from a team as code owners November 24, 2026 20:27
@DjDeveloperr
DjDeveloperr changed the base branch from perf/hk-compute-pair-fusion-depthwise to aurora-wip November 24, 2026 20:40

@satchlj satchlj left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict at d92da162f759

APPROVE — Clean unit-axis load_workgroup_id matching across all Borealis compute matchers, shared zero-base dispatch handling via hk_nir_dispatch_zero_base(), and safe 64-bit frame anatomy accounting for fused compute dispatches.

Blockers

None.

Checked

  • Full diff & caller audit (7 changed files, +778/-61):
    • src/asahi/vulkan/hk_nir_wgid.h + src/asahi/vulkan/hk_nir_root_size.h: hk_nir_dispatch_zero_base() is cleanly shared between workgroup coalescing and the compute matchers; hk_nir_match_base_wg_scaled() enforces 32-bit definitions, exact local_size == 1 unscaled match, exact imul by local_size, and exact ishl by ffs(local_size) - 1 for power-of-two sizes.
    • src/asahi/vulkan/hk_nir_copy_identity4.c & src/asahi/vulkan/hk_nir_match_pointwise_clamp.c: all matchers refuse workgroup_size_variable, gate load_workgroup_id[axis] strictly on local_size[axis] == 1, verify axis and stride, and depend on zero-base direct dispatch guards (hk_record_compute_pair(), hk_select_identity_copy4(), hk_select_depthwise_vec4(), and dispatch_covers() all reject nonzero base_group and indirect dispatches).
    • src/asahi/vulkan/hk_cmd_dispatch.c: hk_emit_fused_compute_dispatch() records frame anatomy via hk_frame_anatomy_note_fs() and hk_frame_anatomy_note_grid() with 64-bit threads and wg ? threads / wg : 0 guard.
    • src/asahi/vulkan/tests/test-hk-identity-copy4.c & src/asahi/vulkan/tests/test-hk-compute-pair.c: unit coverage for unit-axis load_workgroup_id acceptance, non-unit-axis rejection, nonzero-base rejection, and semantic equivalence.
    • Commit metadata verified: Signed-off-by trailers present and merge against origin/aurora-wip is conflict-free.
  • Build & unit tests (Apple M5 Max, Linux 7.3, GCC 16.1.1, -Dbuildtype=release -Db_ndebug=false):
    • Clean full build (2644/2644).
    • meson test --suite asahi: 194/194 PASS (0 fail) — including hk_identity_copy4, hk_compute_pair, hk_pack, and agx_tests.
  • Live GPU Vulkan CTS (Apple M5 Max, MESA_SHADER_CACHE_DISABLE=1):
    • dEQP-VK.compute.pipeline.basic.copy_ssbo*: 6/6 PASS
    • dEQP-VK.compute.pipeline.basic.indirect_after_base_dispatch: 1/1 PASS
    • dEQP-VK.compute.pipeline.basic.branch_past_barrier: 1/1 PASS
    • dEQP-VK.compute.pipeline.basic.max_local_size_*: 3/3 PASS
    • dEQP-VK.compute.pipeline.workgroup_memory_explicit_layout.zero_ext.*: 3/3 PASS
    • dEQP-VK.subgroups.basic.compute.*: 12/12 PASS
    • dEQP-VK.subgroups.arithmetic.compute.subgroupadd_float*: 4/4 PASS
    • Total live CTS: 30/30 PASS (0 fail, 0 GPU faults in dmesg).
  • Untested scope: End-to-end live Vulkan benchmark workloads (such as Whisper/ncnn/llama.cpp compute dispatch traces) exercising fused identity-copy / pointwise-clamp dispatch paths on hardware were not run directly; those paths were verified via the NIR unit test suite (hk_identity_copy4, hk_compute_pair) and code audit.
Evidence
  • git merge-tree --write-tree origin/aurora-wip d92da162f759: clean merge against origin/aurora-wip (876b22c82bd8).
  • meson test --suite asahi (-Dbuildtype=release -Db_ndebug=false): Ok: 194, Fail: 0, Skipped: 0.
  • Live Vulkan CTS on Apple M5 Max (MESA_SHADER_CACHE_DISABLE=1): 30/30 passed across dEQP-VK.compute.pipeline.basic.*, dEQP-VK.compute.pipeline.workgroup_memory_explicit_layout.zero_ext.*, and dEQP-VK.subgroups.{basic,arithmetic}.compute.*; 0 GPU faults/warnings in dmesg.

@DjDeveloperr

Copy link
Copy Markdown
Author

d92da16 J773g (M4 Mac mini, G16G B0) PASS. Exact-head release build without LLVM or SPIRV-Tools (git-d92da162f7), run from a private prefix with MESA_SHADER_CACHE_DISABLE=1, no reboot.

  • Host meson test --suite asahi: 194/194 OK.
  • Packed vec4 alternate check, 17 cases (linear copy, offset and fadd, im2col 1x1 and 3x3, pad4): 17/17 bit-exact against the indirect (scalar) dispatch and a CPU reference, and frame anatomy shows the alternate on all 17 direct dispatches.
  • Full dEQP-VK.compute.* plus api.smoke at --jobs 1: 12,948 pass, 0 fail (54,613 not supported).
  • gpubench-vk compute (light, heavy alu, conv2d, edge, fp16, copy.bw) and render smoke: 11/11 ok, no check failures.
  • 0 GPU faults, timeouts or recoveries; 0 failed units.

At --jobs 6 the same full compute run shows about 100 scattered fails that change from run to run. An older Mesa build without this PR shows the same groups (64 fails), and all of them pass at --jobs 1, so they come from the booted kernel's concurrent-compute issue (fixed by linux#3087, not booted here), not from this PR.

Not covered: none of these shaders has a unit-size workgroup axis, so the new load_workgroup_id form is not exercised directly. The row shows the matchers still select and stay exact on G16G.

@DjDeveloperr
DjDeveloperr merged commit c440b7f into aurora-wip Nov 24, 2026
DjDeveloperr added a commit that referenced this pull request Nov 24, 2026
The unit-axis depthwise test from #714 dispatched the vec4 alternate on
the old 2D grid. Dispatch it on the 3D grid of the 8x8x2 layout here
(channels / 4, output pairs, output rows), as hk_select_depthwise_vec4()
does.

Signed-off-by: Diljit Singh <hey@djdev.me>
@RyanTheTide
RyanTheTide deleted the perf/borealis-unit-axis-wgid-match branch November 27, 2026 13:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants