Repository navigation
runtime: name each refused condition of a compute output buffer - #3229
Conversation
The refusal "an output is not an aliased placed buffer range with unordered access" covered nine conditions. Each now has its own reason in the log and the census: a view token, zero records, a range over 16 MiB or not whole dwords, a range crossing a placed buffer's end, memory outside any placed buffer, a copied placement, a resource not created in the common state, an offset not 16-byte aligned, and no unordered access. What is bound and what is refused do not change. tests/startup_compute_dispatch_output_check.py produces each condition on case A and checks its reason, the census line and an untouched output. dispatch-swapped now expects "an output buffer has no unordered access". AI-assisted. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Creating the view at heap byte 16, which is not a descriptor of the heap, ends the consumer; the view is created at byte 64 and its token words copied. AI-assisted. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
AI-assisted. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
AI-assisted. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
AI-assisted. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
R0Y00
left a comment
There was a problem hiding this comment.
Reviewed de0303d. Its runtime and test files match the independently tested candidate: Debug and Release /O2 each passed all six dispatch, output and input tests on WARP and RTX 4060 Laptop, with no skips. The runtime split is scoped to diagnostics.
Please correct the claim that a startup run “gives the count of every condition” and the interpretation of the two tables. The census records the first refusal once per key (d3d12_compute_dispatch.inl:609–612) and attributes all untranslated invocations of that key to that bucket (713–717). Later invocations can hit different conditions, and the detailed lines are capped. Please label these as first-refusal buckets and qualify zero rows as “no key had this first refusal.” The synthetic nine-way controls can keep their exact per-case statements because each exercises one condition. The PR can keep its current runtime scope.
The census keeps one first refusal per key and counts all of the key's untranslated dispatches under it, so the run tables are first-refusal buckets, not counts per condition. AI-assisted. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thanks, you're right: the census keeps one first refusal per key and counts every untranslated dispatch of that key under it. Fixed in 797954e:
I updated the PR body's Measurement section and both counts comments on #3224 the same way. The runtime scope is unchanged. AI-assisted. |
R0Y00
left a comment
There was a problem hiding this comment.
The requested census wording is resolved at 797954e. The tables distinguish first-refusal buckets from individual dispatches and now limit observations to the first refused dispatch per key. The diagnostic split and nine source-built controls are unchanged.
Independently tested this head over main 7364e6a, candidate tree 4aab644fee01b27113baf6e3925fdae25c8be3a4. Debug and Release /O2 each passed all six dispatch, input and output tests on WARP and RTX, zero skips. The unchanged reference compares 320 words; each refusal preserves every sentinel. Windows 11 26200.9974, RTX 4060 Laptop driver 32.0.16.1656, WARP 10.0.26100.9818.
ctest --preset dev --no-tests=error --output-on-failure -j 1 -R '^startup_compute_dispatch(_output|_input)?_(warp|hardware)$'
Change
The compute Dispatch refusal
an output is not an aliased placed buffer range with unordered accesscovered several conditions. Each one now has its own reason in the refusal log line and the census. They are checked in this order:an output buffer descriptor is a view tokenan output buffer descriptor has zero recordsan output buffer range is over 16 MiB or not whole dwordsan output range crosses the end of a placed bufferan output is in title memory outside any placed bufferan output is in a placed buffer that does not alias title memory(a copied placement)an output buffer's resource was not created in the common statean output buffer range is not 16-byte aligned in its resourcean output buffer has no unordered accessWhat is bound and what is refused do not change. The claim listed five conditions; "no placed buffer aliases the address" is split into reasons 2 to 6, because the input-side split showed one such sub-case can dominate. Reason 7 also covers an aliased resource with no recorded information, which no fixture reaches.
Output view tokens are not lowered here. #2961 binds buffer UAV tokens before these checks, so with it reason 1 is not reached. Both PRs edit the same
placedline. Whichever lands second drops the token test from that line, and the texture-token case here then refuses with #2961's token reason. The fixture mode is nameddispatch-output-texture-tokenso it does not clash with #2961'sdispatch-output-token.Tests
tests/startup_compute_dispatch_output_check.py(new, registered intests/cmake/startup_compute_dispatch_output.cmake) dispatches case A through the stand-in's list. The unchanged recording matches all 320 words. Then each of the nine conditions is produced by one change to the output descriptor or its buffer: five new consumer modes, threeX2W_TEST_DISPATCH_FIELDSvalues, and the existingdispatch-swapped. Each case checks its refusal line, the census reason line and that every output word keeps its sentinel. The common-state case also checks that the slot 133 log shows its buffer as aliased.startup_compute_dispatch_check.pynow expectsan output buffer has no unordered accessfordispatch-swapped.startup_compute_dispatchstartup_compute_dispatch_outputstartup_compute_dispatch_inputThe debug layer was enabled and reported no errors.
Negative control: with only the
d3d12_compute_dispatch.inlchange reverted (local, restored), both tests fail. Run one by one against that build, all nine cases are still refused, each with the old message, and the output stays untouched, so 9/9 per-reason expectations fail. The unchanged dispatch still matches, so the same cases are refused before and after.A texture view created at heap byte 16, which is not a whole descriptor slot, ends the consumer with exit 2173. The fixture creates the view at byte 64 and copies its token words into the output's entry. I did not investigate that exit; it is existing behavior.
Commands
tests/docs_links_check.pyandtests/bidi_controls_check.pypass.Environment
Tested at
b732c44bonmainad306425; the last commit only adds results to the note. Windows 11 build 26300, MSVC (dev preset, Debug), Windows SDK 10.0.26100, DXC from that SDK. WARP 10.0.26100.9818. NVIDIA GeForce RTX 4090, driver 32.0.16.1088.Measurement
Counts only, from one local 300 s start-up run of this build (
79edac55; translator atad306425, whosegfx2hlsl.pyis unchanged since2e12dd8e). The census keeps each key's first refusal and counts all of its untranslated dispatches under it, so these are first-refusal buckets, not counts per condition. The 25 keys whose first refusal was the old reason in a run of the parent build (505,473 of 5,490,863 compute dispatches) fall in two buckets here. For 23 keys (141,224 dispatches) the first refusal is a view token, and in each key's first refused dispatch the token names a device slot 19 view. For 2 keys (2,015 dispatches) the first refusal is zero records, with an all-zero descriptor. No key had reasons 3 to 9 as its first refusal; later dispatches were not recorded per condition. A second run with #2961 merged locally translates every dispatch of 12 of the 23 token keys. 10 have as first refusal an entry value that reads the output descriptor, and 1 has its view range as first refusal. Details are in the note and on #3224, and no second implementation PR follows from these counts.Refs #3224
AI-assisted.
🤖 Generated with Claude Code