Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions docs/experiments/direct-sdwa-profiles.md
Original file line number Diff line number Diff line change
Expand Up @@ -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_*`).

Expand All @@ -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
Expand Down
3 changes: 2 additions & 1 deletion tests/native_cvt_f16_i16_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'))
Expand Down
3 changes: 2 additions & 1 deletion tests/native_sdwa_profiles_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
)


Expand Down
3 changes: 3 additions & 0 deletions tests/startup_resource_retire_title.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
14 changes: 14 additions & 0 deletions tools/startup/gfx2hlsl.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 <key>.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
Expand Down
1 change: 1 addition & 0 deletions tools/startup/triage_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
Loading