Translator: the outline pass goes; a repeated region is written in line again (SEMANTICS 2263)
What: spirv::outline (a repeated region of 500 or more instructions written once, as a kept routine declared DontInline) is deleted with its tests, its call in the stage bound and in pipeline::testing, its notes in weights.rs, ir::Function::kept, ModuleBuilder::kept_routine and the serializer, docs/API.md and docs/ARCHITECTURE.md. roll's items and its spine take back their own visibility and signature (the loop-body sequences only the outline search read). The bounded-growth test's chain is all one group again: no pass now folds a repeated graph. cache::SEMANTICS_VERSION 2262 to 2263. The sampling and texel routines stay kept routines, DontInline as before. Why: a regression on NVIDIA. Job m3-max-64837 (RTX 2080, 620.70.06, um790, exclusive) made k7 (610e4b3d of the Iris capture's library, weight 320,401) cold through the runtime's helper, arms Adb5fefc2ce(before the pass), B 71014cd7bc's product (the pass in), C36ed0d15b2, alternated A B C A B C. The helper's CPU time and peak resident set (VmHWM): - A: 37.74 s, 1,749 MiB; 37.90 s, 1,750 MiB. - B: 85.82 s, 2,040 MiB; 87.44 s, 2,041 MiB (10 kept routines; largest function 195,769 instructions against A's 336,129). - C: 87.35 s, 2,049 MiB. B is 2.3 times A's CPU and 16.6% more memory. The pass's only gain on file was synthetic (one function called from 50 places, m3-max-64453). RADV and ANV cannot gain from it: Mesa 26.2.6 inlines every function before either backend sees the shader, RADV in radv_shader_spirv_to_nir (src/amd/vulkan/radv_shader.c:574, nir_inline_functions) and ANV through the common runtime (src/intel/vulkan/anv_device.c:792 sets the shader ops; src/vulkan/runtime/vk_pipeline.c:211 calls vk_spirv_to_nir, whose src/vulkan/runtime/vk_nir.c:176 runs nir_inline_functions). Verified: the compile job of this commit and a states-only play of nine streams against development follow; the golden table and the render key are re-blessed at the pin.
This commit is contained in:
1 parent
16d3037930
commit
b20dc87d22
14 files changed
+50
-2336
No files matched your search
+2
-6
@@ -523,14 +523,10 @@ assert!(stats.reachable_blocks <= stats.blocks);
|
||||
blocks are the program's, while a module that calls a many-block function from many sites holds
|
||||
a program far larger than its own blocks; the two read alike in `blocks` alone. Lowering emits
|
||||
such functions itself: the handle-table search (unrolled branch-free steps) and the root-table
|
||||
search (a loop), each emitted once and called at every access. A region of 500 or more
|
||||
instructions that a function holds more than once (a function the program calls from several
|
||||
places, inlined at each) is written once too, as a routine declared `DontInline` and called
|
||||
from each place: NVIDIA's driver compiles it once, and RADV and ANV (Mesa 26.2.6) compile the
|
||||
same code with or without the control.
|
||||
search (a loop), each emitted once and called at every access.
|
||||
- `entry_weight` is what a driver compiles once it has inlined every call: the entry's
|
||||
instructions with each call counted as its callee's body, after repeated regions are rolled
|
||||
into loops (a region written as a routine counts at each of its calls). A stage past `pipeline::COMPILED_STAGE_WEIGHT` (99,109, the heaviest measured to
|
||||
into loops. A stage past `pipeline::COMPILED_STAGE_WEIGHT` (99,109, the heaviest measured to
|
||||
compile within host-sized memory on the slowest compiler measured) is one whose creation may
|
||||
take the host's memory: the translator makes it all the same, and `metal2vulkan-runtime`
|
||||
compiles such a kernel only in a helper process the consumer caps (its README, "Kernels past
|
||||
|
||||
Reference in new issue
Block a user