rt README: an image-only kernel's first 3-D dispatch at a new tile makes one pipeline, and how many the streams make

The planner asked for the declared-at-tile form's first-dispatch wait in the consumer's terms
before it lands. An image-only kernel's first dispatch over a grid more than one deep, at a tile no
state of its content has run, makes that tile's VkPipeline on the calling thread. The thread waits
for it (Metrics::first_use_waits), and the pipeline comes from its file in the cache directory
where there is one.

The count comes from replay's job m3-max-44702, over both recorded streams whole: image-only
non-observer dispatches with threads z > 1, by (spec, grid_tile) pair.
- 49 pairs of tile depth 64 or less in each stream. Every pair's first dispatch is in one frame:
  224 of one stream and 312 of the other.
- One more pair in each, of tile 1x1x256, runs in the remap's tiles where the device's
  maxComputeWorkGroupSize is 64 deep, and makes a 50th pipeline elsewhere.

Metrics::first_use_waits's doc names the tile among the workgroup sizes a wait is for.

Verified: docs only; the counts are the job's output.
This commit is contained in:
Anees Iqbal committed 2026-11-17 23:13:20 -08:00
1 parent 176ea36a47
commit 730c43e7d0
2 files changed
+11 -2

No files matched your search

+8
View File
@@ -873,6 +873,14 @@ a miss. With no directory, nothing is kept on disk, and each `VkPipeline` is mad
the emulated-SIMD-group variant's lowering on the reaper: a state reads only its lowerings from
the cache directory, and each `VkPipeline` past the first tile is made at its first dispatch,
from its file where there is one.
- An image-only kernel's first dispatch over a grid more than one deep at a tile no state of its
content has run makes that tile's `VkPipeline` on the calling thread, which waits for it
(`Metrics::first_use_waits`), from its file in the cache directory where there is one. In each of
the two recorded streams measured, that made 49 pipelines, all in one frame: the frame where the
stream's image-only dispatches over such grids start (frame 224 of one stream and 312 of the
other). One more in each, of tile 1x1x256, runs where the device's `maxComputeWorkGroupSize` is 64
deep (NVIDIA's) in the tiles its regions carry, on the pipeline made with the state, and makes a
50th elsewhere.
- A kernel that observes its threadgroup partition is lowered twice at creation (its variant and
its plain module). For the observing kernel the device tests run, a grid template over
threadgroup memory, the second lowering took 0.61 to 0.63 ms and the whole creation 2.7 to
+3 -2
View File
@@ -352,8 +352,9 @@ pub struct Metrics {
/// `VkPipeline`s created.
pub pipelines_created: u64,
/// First-use waits: encoding calls that waited while the `VkPipeline` they needed was made,
/// for a threadgroup size or threadgroup memory lengths no state of the kernel's content had
/// run with before.
/// for a workgroup size (a threadgroup size, or the tile of an image-only kernel's grid more
/// than one deep) or threadgroup memory lengths no state of the kernel's content had run with
/// before.
pub first_use_waits: u64,
/// The nanoseconds of [`host_time`](crate::host_time) the first-use waits took, in total.
pub first_use_wait_nanos: u64,