From ba96084da489d1f4b690320af348df2ecd1a219a Mon Sep 17 00:00:00 2001 From: Roland Edi Date: Mon, 30 Nov 2026 03:31:50 +0000 Subject: [PATCH 1/2] tests: restore green main after the SDWA and UAV merges --- docs/experiments/direct-sdwa-profiles.md | 7 ++++--- tests/native_cvt_f16_i16_check.py | 3 ++- tests/native_sdwa_profiles_check.py | 3 ++- tools/startup/gfx2hlsl.py | 14 ++++++++++++++ tools/startup/triage_run.py | 1 + 5 files changed, 23 insertions(+), 5 deletions(-) diff --git a/docs/experiments/direct-sdwa-profiles.md b/docs/experiments/direct-sdwa-profiles.md index 0190cfb3f9..09d6097443 100644 --- a/docs/experiments/direct-sdwa-profiles.md +++ b/docs/experiments/direct-sdwa-profiles.md @@ -33,8 +33,9 @@ SDWA validation is per operand, mirroring `place_subword` destination placement; no modifier or subword selection is silently ignored. -Still refused in SDWA: `v_sin_f16`/`v_cos_f16` (no direct lowering), -`v_fmac_f32`/`v_fmac_f16` and the rest of `VOP2_SDWA_UNSUPPORTED_OPS`, +The SDWA forms of `v_sin_f16`/`v_cos_f16` are covered by the separate +`native_sin_cos_f16` suite. Still refused in SDWA: `v_fmac_f32`/`v_fmac_f16` +and the rest of `VOP2_SDWA_UNSUPPORTED_OPS`, 64-bit `_f64`/`_b64` forms, and VOP3-only ops (`v_fma_f16`, `v_min3_f16`, `v_med3_f16`, `v_cvt_pknorm_*`). @@ -56,7 +57,7 @@ a second and third program (12, 28 and 6 slots, each under the 32-slot hardware layout) with an independent Python/ISA reference model, plus 15 refusal controls: disallowed VOP2 SDWA ops, float/int modifier violations, omod/clamp on integer destinations, invalid 16-bit destination selection and -unused mode, a byte source pick, literal 255, and `v_sin_f16`. The new +unused mode, a byte source pick, and literal 255. The new profiles also pin the `v_frexp_*_f32` SDWA source pick (a WORD_1 pick reads only the high half, so the picked value is a subnormal) and destination placement (a WORD destination keeps only the result's low half, with the diff --git a/tests/native_cvt_f16_i16_check.py b/tests/native_cvt_f16_i16_check.py index e92cc74afb..dc61801ef5 100644 --- a/tests/native_cvt_f16_i16_check.py +++ b/tests/native_cvt_f16_i16_check.py @@ -209,7 +209,8 @@ def refusal_programs(): programs = [] for op, (vop1_op, vop3_op, _, to_f16) in OPS.items(): programs.append(([vop1(vop1_op, 3, 250), 0xFF00B101, 0xBF810000], 'unsupported DPP arithmetic')) - programs.append(([vop1(vop1_op, 3, 249), 0x06060601, 0xBF810000], 'unimplemented direct SDWA operand profile')) + programs.append(([vop1(vop1_op, 3, 249), 0x06060601, 0xBF810000], + 'unsupported SDWA destination modifier')) programs.append((vop3_unary(vop3_op, 3, 257, omod=1) + [0xBF810000], f'unsupported {op} clamp or omod')) programs.append((vop3_unary(vop3_op, 3, 257, op_sel=1) + [0xBF810000], f'unsupported {op} high-half op_sel')) programs.append((vop3_unary(vop3_op, 3, 257, op_sel=8) + [0xBF810000], f'unsupported {op} high-half op_sel')) diff --git a/tests/native_sdwa_profiles_check.py b/tests/native_sdwa_profiles_check.py index 2e114e4aa2..9437c26be1 100644 --- a/tests/native_sdwa_profiles_check.py +++ b/tests/native_sdwa_profiles_check.py @@ -478,7 +478,8 @@ def refusal_cases(): (sdwa_instruction(profile("v_floor_f16", 0x5B, True, 0, src0=DWORD | 0x80, dst=WORD_0), reg0=255), "literal is unavailable in SDWA"), (sdwa_instruction(profile("v_fmac_f32", 0x2B, False, 0, 0)), SDWA_REFUSAL), - (sdwa_instruction(profile("v_sin_f16", 0x60, True, 0)), SDWA_REFUSAL), + # v_sin_f16/v_cos_f16 are admitted by the SDWA path since #3300; the + # separate native_sin_cos_f16 suite pins their positive forms. ) diff --git a/tools/startup/gfx2hlsl.py b/tools/startup/gfx2hlsl.py index 0c8bdee786..dbf459541a 100644 --- a/tools/startup/gfx2hlsl.py +++ b/tools/startup/gfx2hlsl.py @@ -14081,6 +14081,20 @@ def stage_ok(s): fail_name = base_name + '.fail' fail_entry = files.get(fail_name) recheck = lost and (manifest_entry is not None) + + # A watch pass sees a request written after it started even when an + # earlier pass already recorded its failure. Keep that failure + # unchanged: retrying it every second would rewrite .fail and + # make its mtime look like new work. + if watch_since_ns is not None and fail_entry is not None and not recheck: + try: + fail_stat = fail_entry.stat() + if (fail_stat.st_mtime_ns > watch_since_ns and + fail_stat.st_mtime >= max(entry.stat().st_mtime, described or 0)): + continue + except OSError: + pass + if skip_failed and not recheck and fail_entry is not None: try: fail_mtime = fail_entry.stat().st_mtime diff --git a/tools/startup/triage_run.py b/tools/startup/triage_run.py index 4ee978ed53..e22aa9fb29 100644 --- a/tools/startup/triage_run.py +++ b/tools/startup/triage_run.py @@ -178,6 +178,7 @@ 'an output UAV covers only part of a copied placement', 'an output UAV has no supported byte interval', 'an output UAV interval crosses the end of its buffer', + 'an output UAV interval exceeds the D3D12 buffer view element limit', 'an output UAV interval is empty', 'an output UAV interval is not 16-byte aligned in its buffer', 'an output UAV interval is not whole dwords', From 8dfc23d77b96c9539ef74ea20b0f0ceeaedbc09b Mon Sep 17 00:00:00 2001 From: Roland Edi Date: Mon, 30 Nov 2026 03:28:54 +0000 Subject: [PATCH 2/2] gpu: sync both retire queues before the title settle case6 of startup_resource_retire_title releases the newer wrapper and calls settle() without waiting for the queues. Every release signals a release-time fence on each registered queue, and settle() only resubmits the drain list, so a fence that has not completed leaves both wrappers retained and the stage fails with retained=131072/2 against 65536/1. Sync the direct and gated queues before settle(), as #3457 did for startup_resource_retire. The expectation is unchanged. Refs #3507 --- tests/startup_resource_retire_title.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/startup_resource_retire_title.cpp b/tests/startup_resource_retire_title.cpp index 23c4f51952..e172024908 100644 --- a/tests/startup_resource_retire_title.cpp +++ b/tests/startup_resource_retire_title.cpp @@ -880,6 +880,9 @@ bool case6_written_generation_preserved(Context& c, void* title_mem) std::puts("FAIL: releasing the newer wrapper erased metadata used by the older wrapper's live SRV"); return false; } + // The release above signalled a release-time fence on every registered queue, and the drains never wait for the + // GPU: let both queues pass before settle(), as the other stages do (#3507). + if (!c.sync(c.direct) || !c.sync(c.gated)) return false; Tnew.freed = true; if (!c.settle("newer wrapper retired with older SRV live", "newer wrapper kept or older SRV retired")) return false; if (!x2w_d3d12_written_probe(title_mem, &generation, &bc7_width, nullptr) || generation != 2 || bc7_width != side) {