compute: name why a compiled program gets no runtime manifest #3268
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3268"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from R0Y00/Xbox2Windows. Originally posted by Not-Saii on 2026-11-28T03:04:55Z.
Refs #3224
Behavior
format_compute_runtime_manifest(src/direct_compute_cache.cpp) returnedstd::nulloptfrom 11 places without saying why. A compute program that compiles to DXIL but gets no manifest can't be dispatched translated, and incompile_dxil --requestsit left no trace. In the 878-request census of #3224, 84 shaders fall in this bucket.std::string *reasonparameter. Exits that tested two or three conditions are split, for example a resource heap view, the sampler heap, and a view above root parameter 15. When a view kind has no manifest line, the reason names the kind, and for images the ISA dimension andarray, for exampleSRV kind root_buffer_srvorUAV kind texture_uav cube. The reasons hold no register numbers, offsets or keys.native_compute_output_revisionis unchanged.compile_dxiluses one line for all routes,unsupported startup runtime manifest bindings: <reason>, which keeps the start of the existing--watchtext:--requestsstill publishes<key>.cs.cso, writes no<key>.txt, counts the request as compiled and removes<key>.fail. The exit status and therequests= compiled= refused=line are unchanged. It prints the reason in that job's report asno_manifest input=req_<key>.c67 <line>. It writes no.fail, because.failis the retry marker of both watchers.--watchwrites the reason where it used to write the bare line.--refusalscounts such a request under its reason. Before, it counted it as no refusal.triage_run.pyreports these lines asruntime manifest: <reason>, matched against an allowlist. Any other text is still reported as "other (text omitted)".format_graphics_runtime_manifestis not changed.Tests
native_compute_manifest_reasons(C++) calls the formatter on 18 source-written programs, one or more per reason, and checks the exact reason. It also checks that the accepted program's manifest text is unchanged.native_compute_manifest_reasons_requestsruns one reachable case end to end. The program reads a root CBV and a root SRV (the program ofnative_compute_raw_root), so it compiles but has no manifest line.--requestsruns in a live cache that also holds a genuinely refused request (an undecodable word) and a table-bound control. The control publishes its manifest. The compiled key gets its.cs.cso, no.txt, and no.fail(a stale one is removed); its reason is on stdout. The refused key keeps its.fail.pending_keys(dir, False)selects the compiled key and the refused key;pending_keys(dir, True)still selects the compiled key and skips the refused one.--watch --oncerefuses the compiled key with the reason in its.fail, a genuine watcher failure:pending_keys(dir, True)skips it andpending_keys(dir, False)selects it.--refusals --jsonandtriage_run.py.tests/startup_triage_run_check.pygets a sample line for the new category and a leak control: a disallowed reason text maps to "other".docs/experiments/native-compile-dxil-refusals.mdis updated.Verification
Commits
3ea1a79f+50740b7conmainc827d8ba. Windows 11 build 26300, MSVC x64, Windows SDK 10.0.26100. No GPU is involved.Negative control: with the formatter no longer recording reasons (one line changed),
native_compute_manifest_reasonsreports18 of 19 manifest reasons wrong. All 18 reason cases fail and only the accepted-program case passes.native_compute_manifest_reasons_requestsfails on the missing reason. With--requestswriting the reason to.failagain (the first revision of this PR), it fails atpending_keys(dir, True), which returns[]: the behavior from the review. With the change restored, both pass.Not in this PR
default: return std::nullopt;that would need a reason after rebase. The test uses a cube UAV, which stays refused under that hunk.AI-assisted.
🤖 Generated with Claude Code
Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-28T03:24:54Z.
Review: CHANGES_REQUESTED
--requestsnow writes a newer<key>.failfor a successful DXIL compile that did not produce a manifest. I reproduced a behavior change in the existing Python watcher: with a syntheticreq_<key>.c67, a<key>.cs.csoand no manifest,pending_keys(directory, True)selects the request. Adding the proposed diagnostic.failnewer than the request makes the same call return an empty list.pending_keys(directory, False)still selects it. The normal-Render -Translatelauncher uses--watch, which switches to the repeated-pass behavior after its first successful pass. A request first seen during a run can therefore lose its Python translation attempt if the offline C++ batch writes this diagnostic into the live cache first.Please keep those offline diagnostic entries out of the retry marker, and cover the two watcher selections with an end-to-end control that distinguishes an incomplete C++ publication from a genuine watcher failure. The named reasons, census and byte-identical accepted-manifest control are useful to keep.
Imported from R0Y00/Xbox2Windows. Originally posted by Not-Saii on 2026-11-28T03:30:01Z.
Thanks, you're right: a program that compiles without a manifest isn't a failed request, and
.failis the retry marker. Fixed in50740b7c:--requestsno longer writes.failfor these programs. It removes.failas before and prints the reason in the job report asno_manifest input=req_<key>.c67 unsupported startup runtime manifest bindings: <reason>.--watch(which refuses the key) and--refusalsare as before.native_compute_manifest_reasons_requestsnow runs--requestsin a live cache beside a genuine refusal.pending_keys(dir, False)selects both keys.pending_keys(dir, True)still selects the compiled key and skips the refused one. A--watchrefusal of the same key is skipped withTrueand selected withFalse.--requestswriting the.failagain, the check fails atpending_keys(dir, True) == [], which is your reproduction.Retested on Windows 11 build 26300, Debug, Windows SDK 10.0.26100:
native_compute_manifest_reasons,native_compute_manifest_reasons_requests,native_compile_dxil_refusals,native_compile_dxil_watchandnative_startup_request_cache_controlsall pass. The PR body is updated to match.AI-assisted.
Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-28T03:34:08Z.
Review: APPROVED
The new head fixes the watcher regression. In
--requests, a successful DXIL compile with no runtime manifest stays eligible for a Python watch pass and records its named reason in the job report. An actual watch failure still leaves the standard retry marker. The end-to-end test checks bothpending_keysmodes and includes a genuinely refused request.On main
5033d2d3plus50740b7c(tree5bcfc2d6), Debug and Release /O2 passed all five tests with zero skips. The Python triage check also passed.