The 3090 hang's rerun (its trail line, read in place) named a pass whose two executions of
indirect commands, both through ranges a buffer holds, carried no host-step note: commit recorded
them for good in their merged GPU form (render/executions/gpu.rs), where the trail noted nothing,
so the line could not tell what the GPU read.
encoder_trail.rs:
- GpuForm: an execution's GPU form, its shape (recorded at commit or by its host step, merged or a
draw per command, indexed, primitive type, the commands its preprocess runs over and from where,
and the range buffer's offset), with its scratch region, layout and the command buffer's status
words.
- Named: a part's (and a batch's) trail text with the GPU forms its executions took; the line's
front batch is described with each form's scratch read now: the range the GPU copied, the
merged draw's two VkDrawIndirectCommands, the commands whose arguments draw, their vertices or
indices times instances and the most of them (its index entry where indexed), and the status
words. The last-completed batch keeps its text alone.
- Step carries forms through a host step; commit's recording of each segment runs under a Step of
its own (CommandBuffer::noting_forms), whose forms alone it keeps, joined to the part that holds
the segment (State::trail_forms).
upload.rs: Upload::glimpse, volatile u32 reads of a region of the host-coherent chunk mapping,
read-only, no lock, no wait. completion.rs: the line's names are taken under the pending lock and
formatted (and the scratch read) after it. Off, nothing changes: no note is made.
Test: tests::trail_gpu_forms (device): four CPU-written triangle commands through a range buffer
of [1, 2], recorded at commit merged; after completion the form reads the range 1+2, the merged
draws [2147483646 x 0; 48 x 1 from vertex 2^31], 2 drawing arguments (7x2, 12x3), the most
command 2's, no fault.
The landed packet changed a runtime-sources input, so the committed digest no
longer described the sources and `the_runtime_sources_are_the_committed_ones`
would fail. Recomputed over the same inputs and committed by land-pkt.sh.
matmul2d now translates e4m3 and e5m2 products into a float destination in the shape qualified on
the M3 Max (32x32x32, static k, one simdgroup), decoding each byte exactly. Anything outside that
shape keeps a typed refusal. On a device with its own 8-bit float type (VK_EXT_shader_float8), it's
refused NotImplemented until the native conversion is built, so no device emulates where a native
form exists (owner rule 1). VK_EXT_shader_float8 is enabled where listed. That changes the
translation (SEMANTICS) and the device enables (RUNTIME).
Verified by the change's own runs: 261/261 touched tests (24411, 24435); lint 24487 and 24492.
Lavapipe against the 18 M3 cases: 11 Match, and 7 e5m2 Mismatch that differ only in NaN words
(Metal 0x7fc00000 against llvmpipe's 0xffc00000), classified Unbounded{NativeNanEncoding}.
Census rows 327-330 go from refused at the type check to the linked-function endpoint.
Owner rule 1: where a device has a native 8-bit float type, its conversion is the only
form. VK_EXT_shader_float8 (whose shaderFloat8, the SPIR-V capability Float8EXT, Vulkan
requires of every device that lists it) is the vocabulary's ExtShaderFloat8, enabled where
the device lists it. The matmul2d expansion records whether a lowered run reads 8-bit float
elements (Entry::float8_products, from the run's operand types), and selection refuses such
an entry, Unsupported{Tensors, NotImplemented}, where the extension is enabled: the
conversion through the device's type is not built yet. Elsewhere the integer decode stays
the form. Of the committed profiles, nvidia-rtx50-linux and nvidia-rtx5080-laptop list it;
their 8 opened validation contexts each enable it (opened_chains.txt blessed). REFUSALS.md
and api_signatures.tsv regenerated.
Verified on msi (m3-max-24411, m3-max-24435): 261 of 261 touched tests (matmul2d, tensor
ops, the device vocabulary and enables, requirements, the codec, ash interop, the signature
table) pass, among them fp8_products_are_refused_where_the_device_has_its_own_8_bit_floats
(both RTX 50 profiles refuse e4m3 and e5m2; RADV and lavapipe translate and validate) and
the fused-sum tests on MoltenVK, RADV and lavapipe.
tns_mm_fp8's 14 variants (e4m3 and e5m2; B transposed or not; multiply or
multiply_accumulate; A or B staged in threadgroup memory) on MoltenVK, RADV
and lavapipe profiles: random finite bytes, each decoded exactly with its
subnormals (e4m3 0x7F as 480, measured), summed by fma in k order from C or
+0.
The lowering of tns_mm_fp8's measurements: e4m3 and e5m2 inputs into float are modeled
types; an 8-bit element reads as the float of its value through integer arithmetic on its
byte (e4m3 without NaN, 0x7F and 0xFF as +-480; an e5m2 NaN as 0x7FC00000), and the sums
are the existing fused sums, as for the other input types. A product of 8-bit floats beyond
the measured 32 x 32 x 32 on one simdgroup, with relaxed precision, a transposed left input
or a cooperative input, stays a typed refusal (Unsupported{Tensors, NotImplemented}), and a
tensor with scale factors keeps its refusal.
Verified with the next commit's engine tests (m3-max-24353).
corpus-metal qualified all 18 (m3-max-23924). Read against a model: the destination of an
8-bit product places its elements as the measured destination layout does (4 of 4); every
byte of both formats decodes exactly, subnormals kept, in A and in B; e4m3 has no NaN (0x7F
and 0xFF read as +-480); e5m2's infinities are infinities and its NaNs give the quiet NaN
0x7FC00000; and the sums are Metal's sequential fused sums from C (multiply_accumulate) or
+0 (multiply), k ascending, over the pair, C-position and random tiles of all 14 variants.
18 cases over the owned fixture tns_mm_fp8: 14 of tns_mm_fp8 (e4m3 and e5m2, 32 x 32 x 32,
B transposed or not, multiply and multiply_accumulate, A and B in device memory or one of
them in threadgroup memory), each over seven tiles (an A and a B decode table of every
finite byte, special values, diagonal pairs, C positions, two random tiles), and 4 of
tns_coop_fp8 (the destination's layout for e4m3 and e5m2, B transposed or not).
Installed with corpus-case-check --install (m3-max-23915).
An owned MSL fixture built for macOS 27 (the _v2 runs), over one descriptor: 32 x 32 x 32
on one simdgroup, metal_fp8_e4m3_format and metal_fp8_e5m2_format A and B into a
cooperative float destination, B transposed or not, multiply and multiply_accumulate, A and
B in device memory or one of them in threadgroup memory (tns_mm_fp8). tns_coop_fp8 records
where such a product's destination places its elements, as tns_coop_left does.
Compiled with scripts/regen-air-fixtures (metal 32023.922, SDK 27.2).
Half values held at 16 bits (SEMANTICS_VERSION 2078) change the SPIR-V of the half-computing
golden kernels: 99 rows move under unchanged keys. The engine inventory and printouts did not
change (m3-max-24483).
The landed packet changed a runtime-sources input, so the committed digest no
longer described the sources and `the_runtime_sources_are_the_committed_ones`
would fail. Recomputed over the same inputs and committed by land-pkt.sh.
Under the 16-bit float controls, a module that computes half in 16 bits now holds its exact halves
as f16 values, with f16 variables and 16-bit arithmetic, instead of widening each one to f32 and
narrowing it back. That's the device's native half form (owner rule 1), and it changes the
translated SPIR-V (SEMANTICS). Dot and mix keep their existing NativeDot and NativeMix notes, now
with the 16-bit bounds. A multisample keeps-uncompressed image that takes no storage usage now
lists its views, as the same texture without ShaderWrite does, so ANV clears it to any colour
fast. That changes how the runtime makes images (RUNTIME). The golden tables move with the half
form; they are re-blessed on development.
Verified by the changes' own runs: hnq_half_layer_composite on the Iris profile goes from 633 to
68 OpFConvert, spirv-val passes (24364); half engine tests 84/84 (24388); metal2vulkan 3524/3525,
the one failure being golden_hashes before the bless; clippy and rustdoc green (24418); release
translation time and memory unchanged on um790 (24445). Multisample: runtime lib 1512/1512 and
clippy green (24437). The Iris clear measure (24451) is pending.
A colour texture Metal keeps uncompressed (ShaderWrite, no PixelFormatView)
whose image takes no storage usage was planned as a mutable image of any
format. For a multisample one (the device stores no samples) that serves
nothing Metal answers: its heap size and alignment, the reach of its clears
and what it reads before a write are the runtime's model of Metal's
compression (texture/heap_tiled.rs, clear_reach.rs), not the image's, and ANV
keeps such an image's MCS whatever its view formats (format-agnostic). But
ANV clears a multisample image without a complete view list to its default
value only (anv_image.c), so a non-default clear is a slow clear: an Iris
walk did 588 SLOW_COLOR_CLEARs of a 4x RGBA8Unorm ShaderRead | ShaderWrite |
RenderTarget texture at a 0.203 ms median, 126 ms over the walk. Such an
image now lists its views as the texture without ShaderWrite does
(multisample keyed on its sample count and usage, every device). A
single-sample one keeps the any-format image. On MoltenVK the image's Metal
texture takes PixelFormatView only where a listed format is not its own or
its sRGB twin (MVKImage.mm's needsReinterpretation), so it may now be
compressed there, which is its memory alone.
tests::image_plan::a_multisample_shader_write_image_lists_its_views: on every
committed profile and pixel format, a 4x ShaderWrite colour texture whose
image takes no storage usage plans as the ShaderRead | RenderTarget one
(listed views, never any-format), the Iris Xe's 4x RGBA8Unorm included.
Verification: not yet run (the runtime's plan tests and lint follow, then
one Iris clear measure).
rounded_operands matches its operations in the pattern (clippy's
redundant_guard). Under the 16-bit float controls the module now holds its
halves at 16 bits, so two shape tests count what that leaves:
engine_arith's half chain is one widening (the float sum of halves it
narrows is the 16-bit sum, the chain reads its 16-bit results) with no
barred rounding; engine_native_half's controlled kernels narrow only at
their roundings, each decorated, and widen their result once.
Verification: job 24377 (msi) ran clippy (the redundant guard, fixed here)
and the half engine tests: 82 of 84 passed, the two failures being these
shape counts (20 conversions expected, 1 found; 5 expected, 3 found).
A half dot or mix already records NativeDot or NativeMix on every device,
so the DeviceArithmetic scan the previous commit added in compile.rs is
removed, and those two notes' docs (artifact.rs, docs/API.md's catalogue)
and docs/FAST-PATHS.md's device-gap row now state the 16-bit form and its
bound: a 16-bit dot of n lanes within (3n - 1) * 2^-11 * sum |a_i b_i| +
(3n - 1) * 2^-25 of Metal's chain (2n - 1 correctly rounded 16-bit
roundings beside Metal's n), a 16-bit mix within 2^-8 of its two terms plus
2^-22. narrow.rs's module docs, lower/arith's dot and mix comment, and
docs/ARCHITECTURE.md (the tidy stage and the spirv/ map) name the pass.
tests::engine_half_hold: a kernel of half min, max, clamp, dot, mix, a
loop-carried half and a thread array of half; on the Iris Xe and RADV
profiles it narrows no exact half, its four input roundings are its only
narrowings and its result's its only widening, its dot, mix and bounds are
16-bit instructions, no float variable stays 32-bit, it answers 33.25 on
the interpreter, passes L3 and records NativeDot and NativeMix; on lavapipe
(Converted) nothing is held and it answers the same.
Verification: not yet run (the build and tests follow).
Under the 16-bit float controls (QuantizeForm::Controlled), a module that
computes half in 16 bits held every other half value widened in an f32: each
16-bit + - * sat between conversion pairs, and min, max, clamp, select, mix,
dot, the demotion variables and the thread arrays read and wrote the f32. The
device's native form of half arithmetic there is its 16-bit instruction (rule
1), so a new IR pass, spirv::half_hold, runs after emission and the dead-code
pass:
- an f32 scalar or vector is an exact half where it widens a 16-bit float, is
a constant of halves, an undefined value, a load of a held variable, the
member an extract takes from its construct, or a move or exact operation
(select, composite moves, shuffle, negate, abs, min, max, clamp, sign,
floor, ceil, trunc, round) of exact halves; each gets a 16-bit twin
computed by the same instruction, and a narrowing of one is its twin;
- a Function or Private variable of f32 scalars, vectors or arrays of them,
reached only by loads and stores (through access chains or not) of exact
halves, holds the 16-bit type;
- an f32 sum, difference, product, product by a scalar, dot product or mix
of exact halves whose every use narrows it is the 16-bit instruction; the
first four answer the same half (f32 carries 2p + 2 bits, correctly
rounded under the controls), a dot product and a mix are within the
device's bounds and pipeline/compile.rs records DeviceArithmetic for them;
- comparisons, NaN and infinity tests and conversions to integers of exact
halves read the twins.
Verification: none yet in this commit; the build, the hnq FConvert count,
the half engine tests and the golden tables follow.
The census at the pin-65 tip (m3-max-24421): 2351 cases, 48292 compiled, 1079 refused, 0 failed,
0 differences, 0 regressions. Only the product fingerprint moved. The golden tables at the same
tip (m3-max-24420) needed no change.
The landed packet changed a runtime-sources input, so the committed digest no
longer described the sources and `the_runtime_sources_are_the_committed_ones`
would fail. Recomputed over the same inputs and committed by land-pkt.sh.
A default-off diagnostic (METAL2VULKAN_LOG_MEMORY). Where the process's
allocator is glibc's (Linux, the GNU environment), each line of the memory
log now ends with glibc's heap at that moment, every arena's, as mallinfo2
states it (bytes in use, bytes free, what its arenas hold, what it mapped
apart) and the malloc_trim calls the process's large makings made so far
(a process-wide count beside WorkCounts::heap_trims). A resident set that
grows and stays then reads, in one run, as free heap glibc keeps, heap in
use, or memory malloc did not map. Elsewhere the lines are unchanged.
Test: the_memory_log_states_glibcs_heap_where_it_is_the_allocator.
The landed packet changed a runtime-sources input, so the committed digest no
longer described the sources and `the_runtime_sources_are_the_committed_ones`
would fail. Recomputed over the same inputs and committed by land-pkt.sh.
A rate-mapped draw whose triangles reach at most four region pairs now fans out through a
four-copy draw variant, chosen from the probe's measured triangle span (never by device). Other
draws keep the sixteen-copy variant, and the commit's settle begins both. The translator's link
and codec gain the tier (SEMANTICS, ARTIFACT_FORMAT), and the runtime picks it (RUNTIME). Counted:
WorkCounts::rate_map_fanned_few_draws.
Verified by the change's own runs: clippy and tests 24351 (0 messages, 20 passed). 780M warm
29.7/30.8 against 36.8/34.5 ms (24369), cold 40.2/43.9 against 61.9/62.7. Iris holds at 47.7/40.0
(24317) and the 3090 at 28.6/6.1 (24316). rate_mapped_fan_out draws 6 of few copies, 0 made at
the step, on all three.
A host step's fanned-out draw went through one geometry-stage variant that
declares the output of the most copies (up to 16) for every triangle, though
most draws' triangles touch only a few regions. The declared output size is
what the 780M's geometry stage pays for.
- The translator: RegionFanOut::DrawFew, the draw variant whose loop emits
at most FEW_COPIES (4) copies and whose geometry stage declares 3 x 4
output vertices; its codec name and compile-key word (" region_fan_out
few"); the link and engine tests cover the three modes.
- The probe: each draw's words grow to 1 + 2 x PROBE_COUNT_WORDS (65): its
flag, the 32 count lanes, and 32 wide lanes, where a triangle whose
widened pair count exceeds FEW_COPIES stores 1 (picked by PrimitiveId
mod 32, as the counts are). The host reduces them to (flag, copies, wide).
- The runtime: a fanned-out draw no triangle of which is wide draws
through DrawFew, else through Draw; commit's settle begins the three
variants (probe, few, most). Counted:
WorkCounts::rate_map_fanned_few_draws.
- The pieces lane prints the count. The runtime test's 8 commands add one
whose triangle covers four tiles a side (more regions than four, no more
than the most copies), drawn through the most copies, and assert the
other 6 fanned-out draws took four; the pixels are still the encoder's
region-by-region draws'.
- docs/FAST-PATHS.md: the fan-out row names the variant and its count, and
its cost cell carries the numbers below. bind/fan_out.rs: FEW_COPIES's
numbers.
Verified, release binaries, runtime_lane::rate_mapped_pieces and
tests::rate_mapped_fan_out, the command buffer's GPU time, cold then warm:
- Radeon 780M (Mesa 26.2.6), m3-max-24369, this change plus a scratch
switch (never landed) drawing every fanned draw through the most copies,
interleaved in one job: 4 copies 40.2/29.7 and 43.9/30.8 ms; the most
copies 61.9/36.8 and 62.7/34.5 ms. Warm about 5.4 ms (15%) less.
64 of 64 draws of four copies.
- Iris Xe (Mesa 26.2.6), m3-max-24317: 47.7 ms cold, 40.0 ms warm (40.5
warm through the most copies in an earlier run); 64 of 64 of four copies.
- RTX 3090 (NVIDIA 620.70.06), m3-max-24316: 28.6 ms cold, 6.1 ms warm
(6.2 ms before); 64 of 64 of four copies.
- tests::rate_mapped_fan_out on all three: 3 passed, 6 drawn of few
copies, the fan-out's pipelines 3 ready plus waited, 0 made at the step.
The Iris and 3090 runs are of the same change at base 9c30ffd263; the
780M's at bfcd63c5e2. Clippy (translator, runtime, validation,
conformance, --cfg m2v_gpu and m2v_gpu_hazards, all features) and the
translator's fan_out and api_surface tests: m3-max-24351, at bfcd63c5e2,
0 messages, 20 passed. signatures.py --check passes; REFUSALS.md
unchanged.
The landed packet changed a runtime-sources input, so the committed digest no
longer described the sources and `the_runtime_sources_are_the_committed_ones`
would fail. Recomputed over the same inputs and committed by land-pkt.sh.
A draw is now kept under the outside state another thread may change (no-copy moves, sampler
slots, rebinds, the host alias version) as of the start of its steps, not as of its keeping. So a
change landing meanwhile, such as the in-place check making a no-copy buffer over host pages,
makes the next draw take every step instead of replaying a draw kept under a state it never read.
In debug this panicked "a draw again kept no draw" (draw_again.rs:994). That changes runtime
behaviour.
Verified by the change's own runs on lavapipe: the forced repro panics without the fix at
draw_again.rs:994 and passes with it (24375); draw_again, lone_fetch and pass_end_tiles 44/44
(24375); runtime suite 2443/2443 (24363); clippy 24376 and 24340.
What: the maker thread is a plain thread holding its own handle on the device. It makes the
buffer over host pages, sends it to the hook, and ends. The hook keeps the buffer until the
test ends.
Why: before this fix, the test's negative control printed the check's panic ("a draw again kept
no draw", render/draw_again.rs:994) and then hung. The scoped maker waited for the run's end,
and the panicking test's scope waited for the maker (job 24363, 120 s timeout). A failing test
must fail, not hang.
Verified: as a potluck job on lavapipe, the negative control (the fix's files reverted) and the
fix; reported with the shas.
What: the test takes the page's HostMemory, which is Send and Sync, on its own thread and moves
it into the maker thread. Before, the maker thread borrowed the Page, whose pointer is not Sync.
Why: the test did not compile (E0277, job 24330).
Verified: as potluck jobs on lavapipe with the fix's negative control; reported with the shas.
What: record_again (render/reroute.rs) calls draw_began before it records a kept draw again
into a new instance. A draw it keeps is then kept under the outside state as its own steps
began, not as the last direct draw's began.
Why: the previous commit keeps a draw under Outside as noted at draw()'s start. A rerouted
draw reaches the same keeping through draw_resident without draw(), so it read a stale start.
That was conservative: the next draw took every step. The rerouted draw's own start is the
exact one.
Verified: with the previous commit's jobs, as potluck jobs on lavapipe.
What: render/draw_again.rs gains Outside: the parts of a kept draw's Under that another thread
may change while a draw takes its steps:
- the no-copy buffers' moves;
- the sampler slots' changes;
- whether the device has buffers over host pages, and the host aliases' version.
RenderLowering::draw_began notes them as draw() begins. kept_under answers Under as of now, but
with those parts as of the draw's start. Both the plain draw's keeping (render.rs) and a draw
rebound (rebound.rs) keep their draw under kept_under. The plain keeping weighs its uses' noting
against that state: EncoderCore::noted_now now takes the NotedInto to compare with.
So a change made meanwhile on any thread makes the next draw take every step. Before, the keep
read the moved state, so one of two things happened:
- the draw kept nothing;
- or it was kept under a state its bindings and noting never read: a version that moved after
noted_now but before Kept::under, or a sampler state made after the draw listed them.
The debug check (Checked::check) compares nothing where Outside moved while the checked draw took
every step: its steps read another state than the kept draw's. The module docs say both.
Why: the device's in-place check (in_place_check.rs) makes and lets go no-copy buffers over host
pages on the program's device from its own thread. When one landed between a checked draw
again's noting and its keeping, the draw kept nothing and the check panicked with "a draw again
kept no draw" (render/draw_again.rs:994). That was the intermittent failure in lone_fetch and
pass_end_tiles on lavapipe (jobs 24214, 24235). The skip of first-move zeros was not involved:
neither test's Private texture registers an overwrite.
Verified: as potluck jobs on lavapipe, the previous commit's test and the draw_again tests, the
runtime suite, and clippy; reported with the shas.
What: tests::draw_again gains
a_buffer_over_host_pages_made_while_a_draw_takes_every_step_is_met_by_the_next_draw. A new
test-build hook, Hooks::at_keep (device/line.rs, with the recovery tests' hooks), runs once on
the lowering thread as the n-th draw that takes every step reaches its keeping, after its uses'
noting. The test holds the run's first draw again there (in a debug build, the first draw again
takes every step for its check) while another thread makes a no-copy buffer over host pages.
That moves the host aliases' version and the device's "has buffers over host pages" flag, which
a kept draw's Under reads through NotedInto. The test asserts that the next draw takes every
step (draws_unlike_kept_under 1), one draw fewer draws again than the reference run, and the
pixels match.
Why: render/draw_again.rs:994 "a draw again kept no draw" fired intermittently in
lone_fetch::a_lone_fetched_bgra8unorm_color_over_host_pages_reaches_them (jobs 24214, 24235) and
in pass_end_tiles. The device's in-place check (in_place_check.rs) runs on a thread of its own
and makes and lets go no-copy buffers over host pages on the program's device. When one lands
between a checked draw again's noting and its keeping, noted_now compares the noting's alias
version with the moved one and the draw keeps nothing. The hook forces that moment, so the test
fails without the fix instead of waiting for the race.
Verified: expected to fail here (the panic) and pass with the next commit, as potluck jobs on
lavapipe; reported with the shas.
The landed packet changed a runtime-sources input, so the committed digest no
longer described the sources and `the_runtime_sources_are_the_committed_ones`
would fail. Recomputed over the same inputs and committed by land-pkt.sh.
A ragged dispatchThreads now runs as the threadgroups its threads fill, at the call's
threadgroup size, on a partial-threadgroups variant of the kernel: Metal's partial threadgroup,
with invocations past the grid returning or walking predicated to each barrier. That replaces a
pipeline per grid remainder, so a kernel needs at most 2 VkPipelines per threadgroup size. The
cases that can't take it keep the exact split. The translator emits a new variant (SEMANTICS),
the artifact codec gains RuntimeFact::PartialThreadgroups (ARTIFACT_FORMAT), and the runtime
picks it (RUNTIME). A declined variant probe now logs as declined, not as refused.
Verified by the change's own runs: engine tests on five profiles (24285); XTX runtime tests in
debug and release (24289, 24315), words equal to the split's and Metal's model, 1 VkPipeline vs 6;
lavapipe (24296); broad metal2vulkan tests 2682/2683 with the one failure fixed (24303, 24325);
lint 24327 and 24329. XTX proxy: 1 pipeline in 0.90 s against the split's 6 in 6.14 s.
refusal_outcome names a flat, folded or partial-threadgroups variant's
Unsupported refusal declined (the probe's answer: settle_flat, settle_folded,
replay_variant and settle_partial take it as one), and a creation's or any
other variant's refusal refused.
On lavapipe the simdgroup-sum kernel emulates its simdgroups, so both states
split, and the second state found the first state's VkPipelines made (job
24288 failed on 'the split: 0 made').
The cooperative slice write (texture::cooperative) strides its cells over
every invocation of the workgroup; past a partial threadgroup's threads they
run none of the body, so its cells would go unwritten. Such a kernel keeps
the split. The warm pass's docs name the variant it settles.
The runtime's partial_threadgroups test dispatches five ragged grids of a
kernel with a threadgroup barrier (with and without a simdgroup sum) on the
variant and on the same kernel made to split (split_ragged_grids, test-only),
comparing both with Metal's model and counting VkPipelines; under m2v_gpu a
heavy kernel times the creations. flat_simdgroups' two-row grid and barrier
kernel now take the variant's one VkPipeline. api_signatures.tsv and
REFUSALS.md regenerated.
A dispatchThreads grid that is not a whole number of threadgroups split into
its interior and an edge region per axis, each edge a VkPipeline of its
remainder's local size: a kernel dispatched at many remainders made one
pipeline per remainder (Blender's Cycles on an RX 7900 XTX: 249 s of a
265 s warm render was 11 such creations).
LoweringInputs::partial_threadgroups (VariantKey::partial_threadgroups,
RuntimeFact::PartialThreadgroups) runs such a grid as the threadgroups its
threads fill at the call's size, the region flagged NONUNIFORM, the last
threadgroup along an axis answering Metal's partial threadgroup with the
object functions' machinery: threads_per_threadgroup, positions and indices
over the threads left, invocations past them returning before the body or
walking it predicated to each barrier, every lane read balloting its live
lanes. A tile function, a stage-in region, compute derivatives, emulated
simdgroups, the flat/folded/replay forms and a vote word that does not fit
are refused (GpuEncodedIndirectCommands, NotImplemented): they keep the
split. The runtime takes the variant after the flat one (settle_partial,
refusals remembered per state); the pipeline creation log names a probed
variant's refusal declined.
The landed packet changed a runtime-sources input, so the committed digest no
longer described the sources and `the_runtime_sources_are_the_committed_ones`
would fail. Recomputed over the same inputs and committed by land-pkt.sh.
The after-merge check m3-max-24293 failed clippy (useless_conversion) on the two primitive-type
.into() calls of render/executions.rs's trail_draw: the record's field is a u32 already.
Verified: clippy, all features and under --cfg m2v_cpu_icd, in the check job.
The landed packet changed a runtime-sources input, so the committed digest no
longer described the sources and `the_runtime_sources_are_the_committed_ones`
would fail. Recomputed over the same inputs and committed by land-pkt.sh.
For the 3090 hang, where a shadow pass's host step and a rate-mapped pass's fan-out ran in the
same second: the trail now counts, per host step, the route each draw took (plain, the fan-out
probe, fanned out, region by region) and the executions recorded in their GPU form, and its stall
line names the device's pipeline pool's makings waiting and under way, so a driver compile
running beside a hung batch shows. Default off.
Verified: encoder_trail::tests and tests::stall (the line names the pool) in the check job.
A stalled host-stepped render encoder's trail line named its states but not what its step
recorded from the records and range buffers the GPU wrote, which is where a wrong count would
come from. With the trail on, a host step now notes each range it read from a buffer (location and
length as the bytes held them, and the commands it ran), its draws, their vertices or indices
times instances summed, the draw of the most of those (primitive type, count, instances), and the
kept chunks it ran again, whose draws it did not read. Default off: nothing is read or formatted
with the trail off.
Verified: the trail unit test (encoder_trail::tests) covers the line's new part.
The landed packet changed a runtime-sources input, so the committed digest no
longer described the sources and `the_runtime_sources_are_the_committed_ones`
would fail. Recomputed over the same inputs and committed by land-pkt.sh.
A recovery now marks the loss's hang on its command buffer, so that command buffer fails as
GpuHang (Metal's timeout, code 2) whichever failure finishes it, even when its front batch is not
its last. The notice counts every victim of the loss. Before, the culprit read
GpuRecoveryVictim when the scheduler or a later watch failed its last batch. That changes
runtime behaviour.
Found from reims's 3090 watchdog rerun (m3-max-24105): 19 victims, no code 2. The test fails
without the fix and passes with it on lavapipe (24259, 101/101 in the stall set) and on the 2080
(24281). Lint 24264.
The completion named the hang from its front batch, but answered GpuHang only to a command
buffer whose last batch that same failure took. A command buffer is often several batches
(each event wait splits one): where the front batch was not the last, its last batch was held
by the scheduler (an event value no signal reached) or watched after the take, and finished
later through the scheduler's fail_lost or failed_with_loss, whose answers are victims alone.
So on the RTX 3090 the 23-encoder command buffer the notice named the hang read
GpuRecoveryVictim, as did the 18 others, and the notice said 0 victims.
Now name_hang marks the command buffer (hang_of_loss) as the loss names it. complete_seen
turns a loss's error of that command buffer (DeviceLost, which a refused or failed-with-loss
batch leaves in its state, or GpuRecoveryVictim) into GpuHang, counted against its queue as
before. Every failure of the loss answers GpuRecoveryVictim, and each victim is counted on
the line as it fails (Line::victim), so the notice counts the victims of every failure of
the loss, not of the first take alone.
Verified: tests::stall's new leg the_watchdog_s_hang_fails_as_the_hang_with_its_last_batch_held
fails at the previous commit and passes here (lavapipe and the 2080; shas in the report).
A command buffer whose first batch waits on its VkQueue for a reserved signal and whose
second waits for a plain event's value nothing signals: the scheduler holds the second, the
first goes past the watchdog's bound. The test asserts the command buffer fails as the hang
(GpuHang), one committed behind it as its victim (GpuRecoveryVictim), and the recovery's
notice counts that one victim.
On the RTX 3090 the watchdog fired and the notice named a 23-encoder command buffer the hang
with 0 victims, while every command buffer's handler, that one's included, read
GpuRecoveryVictim. This test reproduces the shape: it fails here, before the fix.
The landed packet changed a runtime-sources input, so the committed digest no
longer described the sources and `the_runtime_sources_are_the_committed_ones`
would fail. Recomputed over the same inputs and committed by land-pkt.sh.