Skip to content

borealis: remove ad-hoc M5 and CDM-packing runtime env flags - #1467

Merged
DjDeveloperr merged 1 commit into
aurora-wipfrom
gates/hk-m5-behavior-envvars
Dec 1, 2026
Merged

DjDeveloperr merged 1 commit into
aurora-wipfrom
gates/hk-m5-behavior-envvars

Conversation

@RyanTheTide

@RyanTheTide RyanTheTide commented Dec 1, 2026 •

Copy link
Copy Markdown

Removes seven ad-hoc runtime behaviour env vars outside ASAHI_MESA_DEBUG and HK_PERFTEST:

  • ASAHI_M5_RQ_KEEP_LOOPS (hk_shader.c, default-off opt-in knob + unused hk_keep_m5_ray_query_loops / hk_cf_list_has_indexed_ray_query)
  • ASAHI_M5_IMAGE_STORE_FORWARD (hk_shader.c, default-off opt-in knob; G17P uses agx_chip_image_load_misses_own_store())
  • ASAHI_M5_HOST_ALIAS_STATIC (hk_device.c, default-off A/B knob; per-resource host-alias tracking is default-on)
  • ASAHI_M5_STORAGE_COMPRESSION (hk_image.c, runtime bitmask; use the settled HK_M5_STORAGE_COMPRESSION_DEFAULT mask directly, while ASAHI_MESA_DEBUG=nocompress remains the global disable)
  • HK_PACK_CDM_SUBMIT and ASAHI_M5_PACK_CDM_SUBMIT (hk_queue.c, redundant with ASAHI_MESA_DEBUG=nomerge; updated aurora_packtest.c to check ASAHI_MESA_DEBUG=nomerge)
  • HK_PACK_GEMM_DW (hk_queue.c, default-on knob whose sibling switches were already removed in 97efb18d7444)

(HK_PACK_ATOMICS / ASAHI_M5_PACK_ATOMICS is left untouched to avoid conflicting with open #1184; HK_SYSMEM is left untouched to avoid conflicting with open #1416/#1420.)

Defaults are unchanged on every generation.

Tested: Neo G17P and J714s G17S at 68378cf029c1. Neo Vulkan CTS results matched the baseline. J714s passed CDM packing, synchronization, ray query, storage compression and aliasing. Both recorded zero GPU faults.

Risk: Two-way. Default behavior is unchanged. The removed debug switches no longer override packing, compression, or shader behavior.

Verification

  • x86 host unit tests: meson test --suite asahi -> 232/232 OK, 0 FAIL at 68378cf029c1.
  • Hardware CTS subset row (AGX3B, Neo / A18 Pro G17P, kernel 7.3.0-aurora-edge):
    • Base aurora-wip (8a40c215dec9) vs PR head (68378cf029c1), VK_DRIVER_FILES swap:
    • Groups: dEQP-VK.api.smoke.*, dEQP-VK.compute.pipeline.{basic,builtin_var}.*, dEQP-VK.synchronization.basic.*, dEQP-VK.synchronization2.op.single_queue.barrier.write_clear_color_image_read_copy_image.*, dEQP-VK.memory_model.message_passing.core11.u32.coherent.*, dEQP-VK.image.load_store.with_format.2d.{r8g8b8a8_unorm,r16g16b16a16_sfloat}*
    • Result: 182 Pass -> Pass, 242 NotSupported -> NotSupported, 0 regressions, 0 kernel faults.
  • Not yet run: M5 (AGX3C) hardware row (no available M5 lab Mac; behaviour at defaults is unchanged).

Drop seven ad-hoc runtime behaviour switches outside ASAHI_MESA_DEBUG and
HK_PERFTEST:

- ASAHI_M5_RQ_KEEP_LOOPS (default-off opt-in knob and dead helper)
- ASAHI_M5_IMAGE_STORE_FORWARD (default-off opt-in knob; G17P uses
  agx_chip_image_load_misses_own_store())
- ASAHI_M5_HOST_ALIAS_STATIC (default-off A/B knob; dynamic per-resource
  host-alias tracking is default-on)
- ASAHI_M5_STORAGE_COMPRESSION (runtime bitmask; use the settled
  HK_M5_STORAGE_COMPRESSION_DEFAULT mask directly, while
  ASAHI_MESA_DEBUG=nocompress remains the global disable)
- HK_PACK_CDM_SUBMIT and ASAHI_M5_PACK_CDM_SUBMIT (redundant with
  ASAHI_MESA_DEBUG=nomerge)
- HK_PACK_GEMM_DW (default-on knob whose sibling switches were already
  removed)

Defaults are unchanged on every generation.
@RyanTheTide
RyanTheTide requested review from a team and DjDeveloperr as code owners December 1, 2026 08:10
@tully-8888

Copy link
Copy Markdown

Hardware verification row on J714s (14" MacBook Pro M5 Pro, G17S B1) at exact PR head 68378cf029c17f99b63e5e0d05490663534f2935:

  • Environment: kernel 7.3.0-17.v272-27-ARCH (linux-aurora 7.3.0.aurora17.v272-27), fw 26B123, release build (-Dbuildtype=release -Db_ndebug=true), MESA_SHADER_CACHE_DISABLE=1, VK_DRIVER_FILES pointing to freshly built libvulkan_asahi.so (sha256: 7da5646fede1b17b288939b8bed9524c673c7ffc175931eef06c33f491dc0015).
  • Host unit tests (meson test --suite asahi): 228/228 OK, 0 FAIL.
  • aurora-packtest (default, CDM packing active): PASS, 0 failures
    • indep-order (6 CBs × 5): PASS (packed_cbs=24, best 2792.4 us, mean 3015.2 us)
    • sem (120 CBs × 5): PASS (packed_cbs=120, best 296.6 us, mean 299.2 us)
    • depth (40 CBs × 5): PASS (packed_cbs=40, best 5343.3 us, mean 5418.8 us)
    • split-render (41 CBs × 5): PASS (packed_cbs=40, best 177.0 us, mean 187.1 us)
    • split-event (41 CBs × 5): PASS (packed_cbs=200, best 160.9 us, mean 175.5 us)
  • aurora-packtest (ASAHI_MESA_DEBUG=nomerge, 2 iters indep-order): PASS, 0 failures, packed_cbs=0 (confirms nomerge disables CDM packing cleanly).
  • borealis-sync (--seed 716 --iterations 200): layer-disjoint-queues PASS (200/200), feedback-loop-outside-area PASS (200/200).
  • gpubench-rt-vk (rt.scene, preset=light, trace=query, depths=2, timestamps=on, stamps=pass): PASS, median 1219.49 fps (390.4 Mray/s, image_crc32=20002598, 6,104 frames).
  • vulkan-storage-compression: 35 formats, 0 failed (300x200).
  • vulkan-storage-alias: 41/41 case groups PASS.
  • Kernel GPU faults (journalctl -k -b --after-cursor): 0.

@github-actions github-actions Bot added area:borealis Area from CODEOWNERS (bot) needs-review No approving review from Core or Omarchy Mac yet (bot) needs-template PR body lacks Tested or Risk (bot) labels Dec 1, 2026
@github-actions

github-actions Bot commented Dec 1, 2026 •

Copy link
Copy Markdown

Merge readiness at 68378cf0: not ready yet

Check Detail
CI at head no failing: pr-text / pr-text, selftest
Review no needs one approving review from Core or Omarchy Mac (not the author)
Requested changes ok none
Hardware row at head ok comment at 68378cf0
Conflicts ok none
PR text no add a 'Tested:' line; a 'Risk:' line (door and Macs) (guide)

Areas: area:borealis

Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels.

@github-actions github-actions Bot added the ci-failing A check failed at the PR head (bot) label Dec 1, 2026

@aurora-silicon-review aurora-silicon-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Verdict: MERGE at 68378cf

Not stacked: base is aurora-wip (8a40c21), same parent as #1469/#1470/#1471.

Checked:

  • Every removed switch keeps its default value on every chip. ASAHI_M5_HOST_ALIAS_STATIC defaulted to false, so the !debug_get_option_m5_host_alias_static() term was always true. ASAHI_M5_IMAGE_STORE_FORWARD and ASAHI_M5_RQ_KEEP_LOOPS defaulted to false, so the forward pass still runs only where agx_chip_image_load_misses_own_store() is true, and the loop-keeping pass never ran by default. HK_PACK_GEMM_DW defaulted to true.
  • Storage compression: the default mask was HK_M5_STORAGE_COMPRESSION_DEFAULT, and it is now used directly. Bit 12 (4096, mipmapped images) is set in it, so (info->mipLevels != 1 && !(HK_M5_STORAGE_COMPRESSION_DEFAULT & 4096)) is false, the same as the old default. R16 (bit 10) stays clear.
  • hk_pack_runs_enabled(): with both env vars unset the old code returned true after the virtio, nomerge and boundary checks. The new expression returns the same value on every chip.
  • No meson test environment sets any of the removed variables. The leftover mentions are comments only (see below).
  • No AI attribution in the title, body or commit. No tainted material.

Follow-ups:

  • The hk_image.c comment lost a line. It now reads "...whose image atomics would need 64-bit image atomics that the / B10G11R11 is not compressed...". Restore "device does not expose." before the B10G11R11 sentence.
  • These comments still name removed variables: hk_device.h:519 and hk_device_memory.c:282 (ASAHI_M5_HOST_ALIAS_STATIC=1), meson.build:1459 and the aurora_packtest.c header, lines 10-17 (HK_PACK_CDM_SUBMIT=0/1), vulkan_storage_compression.c:26-28 (ASAHI_M5_STORAGE_COMPRESSION=32767).
  • aurora_packtest now treats "variable unset" as packing on. A plain run without ASAHI_MESA_DEBUG=hktrace therefore prints FAIL "trace unavailable" for every must-pack case; before, it printed WARN. That fits the new default, but the header comment should say how to run it now.
  • pr-text is red because the body has no Tested:/Risk: lines. Edit the body to add them. The red selftest job (aurora-agent-policy) fails the same way on unrelated branches and is not caused by this diff.

@DjDeveloperr DjDeveloperr left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Reviewed the queue, image, aliasing and shader defaults against the removed debug switches. The default paths and the supported nomerge and nocompress controls are preserved. Neo CTS and the J714s packing, synchronization and image checks passed on this head, along with both Asahi builds.

@DjDeveloperr
DjDeveloperr merged commit f6ea9a1 into aurora-wip Dec 1, 2026
16 of 18 checks passed
@DjDeveloperr
DjDeveloperr deleted the gates/hk-m5-behavior-envvars branch December 1, 2026 12:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:borealis Area from CODEOWNERS (bot) ci-failing A check failed at the PR head (bot) needs-review No approving review from Core or Omarchy Mac yet (bot) needs-template PR body lacks Tested or Risk (bot)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants