rt: an observing kernel's indirect dispatches run its partial-threadgroups variant too
decide() moved an observer's whole grids and threadgroup dispatches onto the partial-threadgroups variant but left its indirect dispatches on the plain module, so a state dispatched both ways made a second VkPipeline of the same size on the first indirect dispatch. By the translator's dispatch regions (lower::dispatch), an indirect dispatch states region[1].xyz = 0 and takes the single-region form, and the variant's partial answers sit only under region[1].w NONUNIFORM, which the encoder's indirect region never sets. So the variant runs it unflagged, every invocation live, as it runs a whole grid. decide() now drops the direct-only condition: one module and one VkPipeline a size run every dispatch of an observing kernel where the variant takes the threadgroup. Metrics::partial_variant_whole_grids counts the indirect ones with the whole grids. No key, version or translator file changes. Tests: the observing kernel's run table expects its indirect dispatch on the variant (one first-use wait fewer where it shares a size with a direct dispatch, and one more count); prepare_dispatch's table gains an indirect dispatch at the whole grid's size that finds the variant made (0 makes; 1 before this change); the variant-key table groups the indirect dispatch with the direct ones. The conformance case compute-indirect-threadgroup-grid dispatches region_k, an observer, indirectly; its dispatch-forms line is the check that the replay ran it on the variant. Checks to run on this commit: tests::translate and the conformance replay on a card per vendor.
This commit is contained in:
1 parent
5205d18d12
commit
f090d99c9a
6 files changed
+71
-68
No files matched your search
+4
-3
@@ -1440,9 +1440,10 @@ that plan a grid of whole threadgroups, of `Threads` or `Threadgroups`, takes th
|
||||
unflagged (each `MultiRegion` 1, every thread live), so one `VkPipeline` of a threadgroup size runs
|
||||
all of a kernel's direct dispatches. The runtime lowers a kernel that does not observe its
|
||||
partition once, as that variant, and runs every direct dispatch of it in its tiles; a kernel that
|
||||
observes its partition runs every direct dispatch, a whole grid, threadgroups or a
|
||||
`dispatchThreads` grid that is not a whole number of threadgroups, on its partial-threadgroups
|
||||
variant at its own threadgroup size, and its indirect dispatches on its plain module. A kernel
|
||||
observes its partition runs every dispatch, a whole grid, threadgroups, an indirect dispatch or
|
||||
a `dispatchThreads` grid that is not a whole number of threadgroups, on its partial-threadgroups
|
||||
variant at its own threadgroup size; an indirect dispatch states no grid in its region and takes
|
||||
the single-region form, unflagged. A kernel
|
||||
that steps a stage-in attribute by thread position, or reads `[[grid_origin]]` or `[[grid_size]]`,
|
||||
needs the encoder's stage-in region:
|
||||
|
||||
|
||||
Reference in new issue
Block a user