The census at the pin-77 tip (m3-max-27075): 2369 cases over 21 profiles, 48670 compiled, 1079
refused, 0 failed, 0 differences, 0 regressions, 348 uncovered cells as at pin 76. 10362 cells'
artifact hashes move with SEMANTICS 2099, each still compiled. Slowest compile 2.2 s, peak worker
232 MB, wall 161 s.
The golden-table bless at the pin-77 tip (m3-max-27074): 59 rows of golden_hashes.tsv move with
SEMANTICS 2099 (a thread-memory load forwarded to its single dominating store once calls are
inlined and again after SCCP); the engine inventory and the air_input printouts are unchanged.
points_need_fill_mode_non_solid expected "not announced: [SharedInSystemMemory]"; on a discrete
device that notice comes only from a Shared buffer, and the test (like the two MoltenVK refusal
branches) makes only Shared textures, so on the RX 7900 XTX it failed on the expectation alone
(m3-max-26943, 4/5). The three now expect no notice. Test only.
Verified (fillpoints, d4db20618e): XTX (RADV NAVI31, 27021 build, 27032 run) 5/5, XTX_RUN=0:
Points light Metal's 3 vertex pixels, culled front none, back the same 3, fill 45 px, lines 27,
triangle-point-size announced once; fill-lines pixels unchanged.
A kernel that keeps values in a private (thread) arena through pointers stored in a closure-like
struct, then read back after its stitched calls are inlined, kept every such slot in memory: on
NVIDIA the arena became local memory (4,304 B on the heaviest authored shape) and the kernel ran
6-10x slower than the same arithmetic in registers.
canon::forward now runs once link, byval, erase, inline and devirt are done, and again right
after the first SCCP and the constant-load folds, over the variant the function constants pick
(SCCP runs again only when forwarding changed the body). A load from a thread allocation becomes
the value its single dominating store wrote where type, offset and length match; allocations with
no read left are dropped; inttoptr(ptrtoint p) read back through such a slot becomes p. A load of
an aggregate that holds a pointer, and a load that would read a thread or threadgroup null
pointer (it exists only in memory), stay memory loads. Plain loads and stores only: volatile,
atomic and non-private address spaces are untouched.
Running forward before SCCP first walked every unspecialized body with all function-constant
variants (peak worker 469 MB, work 10.9 M -> 29.3 M units on the scan cases); forwarding over the
specialized body keeps them at the tip's level.
Verified (ftk2, dff96439f6 on 33de04117d):
- NVIDIA statistics: the heavy kernel's local memory 4,304 B -> 0 (registers 59 -> 64); its
sibling stays 0 B. Module words: 28078 -> 14358, 15253 -> 11962, 8132 -> 6846.
- RTX 2080 (26970, runtime CB span, median of 21): the three heavy shapes 0.430/0.470/0.221 ->
0.044/0.046/0.034 ms (6.5-10.3x); others within -1..+3%. RX 7900 XTX (26972): 0.106/0.144/0.068
-> 0.019/0.020/0.014 ms (4.8-7.4x); one conv shape +8% (A/B 27033 pending), another -6%.
- Census (M3, 26969): 2369 cases, 48670 compiled, 1079 refused, 0 failed, 0 differences, 0
regressions, 10362 artifacts moved; peak worker 228 MB, slowest compile 908 ms, wall 116 s.
- Suites (msi 26948/26949) pass but golden_hashes (578 cells, re-blessed on development); clippy
all features, each alone, m2v_gpu and m2v_cpu_icd 0; rustdoc 0. canon/tests/forwarding.rs fails
before and passes after.
- Pipeline state creation on the 2080, cold process: 19-25 ms tip, 21-36 ms with the change,
almost all of it the driver.
SEMANTICS_VERSION 2098 -> 2099.
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 device recovery's carry of an indirect command buffer whose records lay in pooled host-visible
memory moved them to new memory and reset every command (a lost device's mapped memory has
undefined contents), where Metal keeps a Shared buffer's records across its GPU's restart. On ANV
(i915), whose held host-pointer imports cost every submission, the runtime's own small buffers
never lay in imported pages, so every ICB took that path. The consumer's test (four senders
setting nil vertex and fragment buffers while the device recovers, Iris Xe) read back a suffix of
a command's sets as 0 in 10/10 runs, at pin 75 and with RUNTIME 2245 alike.
Now the records (Device::records_buffer, FreshPages::Always) and the slots past them lie in fresh
pages of their own at any length, whatever a held import costs, where the device imports host
pointers into the Shared class's best type. The carry imports the same pages again
(Contents::Kept): records and contents pointer as they were, the CPU's and the GPU's writes kept.
Such a buffer is parked and taken again as a pooled one is. Only a device without the import, or
a failed import, keeps the pooled placement and its reset, which the recovery notice counts.
docs/API.md's recovery section says so.
Cost: one held import per live ICB, about 0.35 us a submission on ANV i915 (submit_check.rs's
measured figure), by its pages on RADV; an import at creation 17-43 us where no parked one is
taken (fresh_pages.rs).
Verified (carryrace, 362d920e11 on acb4c6780d, msi lavapipe):
- icb_carry_race::a_recovery_keeps_the_commands_the_cpu_encoded (a compute command whole and 64
render commands' four nil buffers, recover, read back, run): base + test (27027) prints Lost and
fails (command 0 read [None x4] where [64, 80, 96, 112] was set); the fix (27028) prints Kept,
80/80 with the ICB, executions, recovery, fresh-page, no-pointer-import and recycling tests.
- Owed: clippy in three configurations, rustdoc, the N-ICB submission cost, the consumer's Iris test.
RUNTIME_VERSION 2246 -> 2247.
The census at the pin-76 tip (m3-max-26984): 2369 cases over 21 profiles, 48670 compiled, 1079
refused, 0 failed, 0 differences, 0 regressions, 348 uncovered cells as at pin 75, 0 artifacts
moved. Only the product digest changes: SEMANTICS 2098's region-copy variant and ARTIFACT_FORMAT
520's codec additions move no authored cell. Slowest compile 2.0 s, peak worker 231 MB, wall
155 s. The golden-table bless at this tip (m3-max-26983) wrote 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.
Apple's GL renderer sends setTriangleFillMode:2 for glPolygonMode(GL_POINT) under its Intel and
Apple-silicon caps tables. The value is not in the public headers. Our TriangleFillMode had only
Fill and Lines, so the consumer's raw-value conversion failed and its host died. Measured on
Metal: an M3 Max and an Intel UHD 630 draw only a triangle's 3 vertex pixels (a Radeon Pro 5300M
fills it); our own probe on the M3 (m3-max-26811) draws 1-px points whether point_size is 4, 1 or
unwritten, culls them with CullMode Front, and draws them with Back.
Now TriangleFillMode::Points (2) exists. The generator (scripts/regen-metal-enums) takes a
PRIVATE line for it, with its evidence, and a PRIVATE_DOCS doc comment (metal_enum! accepts
variant attributes); generated.rs stays generated and `--check` passes. The runtime draws it as
VK_POLYGON_MODE_POINT. It needs fillModeNonSolid (refused otherwise:
Feature::TriangleFillPoints) and, on a portability-subset device, pointPolygons
(VkFeature::PointPolygons; MoltenVK withholds it, so it refuses Points). New degradation
TrianglePointSize ("triangle-point-size"): Vulkan sizes the points by the PointSize the vertex
function writes, where Metal draws 1 px. An ICB command still refuses set_triangle_fill_mode, as
before. New lane module runtime_lane::triangle_points.
Verified (fillpoints, 6b9927c402 on 25be73dddf):
- lavapipe lane 30/30: points light {(3,3),(3,12),(12,3)} (Metal's 3 vertex pixels); culled
front none, back the same 3; fill 45 px (the M3 lit 45); lines 27; fill/lines unchanged.
- msi: clippy plain, m2v_gpu and m2v_cpu_icd 0; rustdoc 0; touched tests 102/102.
- Owed: the XTX leg (m3-max-26943).
ARTIFACT_FORMAT_VERSION 519 -> 520 (VkFeature appended to the codec), RUNTIME_VERSION 2245 -> 2246.
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.
RUNTIME 2242 (20d04dbd5e) made an indirect command buffer's setter read the records' storage
pointer once, when its batch is made, and edit_locked wrote through that pointer after taking
the `pipelines` lock. A setter that waited on the lock while a device recovery carried the buffer
then wrote into the lost generation's memory, which the recovery had already released (records
lost, every command reset), and recorded its state in the carried table: the write was lost and
the table and record disagreed, or the process faulted. Before 2242 the edit read the bytes
under the lock.
Now edit_locked reads the records' bytes after it takes the lock. A test-only hook
(hold_next_set, under test with m2v_gpu or m2v_cpu_icd) holds a set after its batch is made.
Verified (carryrace, c7ea201189 on 522a8245e2, msi lavapipe llvmpipe):
- tests::icb_carry_race::a_locked_set_held_across_a_recovery_lands_on_the_recovered_records:
a first dispatch (locked) held across recover_for_test lands on the recovered records
(locked/unlocked writes moved by 1/0), answers its threads and runs once its state and
buffers are set. ICB + recovery suites 26930 TESTS=0 (48 passed); wider with executions 26942
ICB_SUITE=0 (55 passed).
- Negative control (26931, the batch's pointer put back): the new test dies with SIGSEGV
(NEG_TESTS=100); the recovery's notice says the records were lost (every command reset).
- The unlocked setters' race with a recovery's release (use-after-free) is not fixed here; it
follows.
RUNTIME_VERSION 2244 -> 2245.
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 RateMapRegionPolicy::FanOut a draw was drawn two ways: fanned out (a geometry stage's copy
of each triangle per region, window position a*x + b*w through one viewport), or region by region
(each region through its own Vulkan viewport). The two rounded a vertex's window position
differently, so a pass testing depth Equal against depth the other route stored failed along whole
surfaces: the consumer's black blotches on lit surfaces in Apple's Modern Rendering sample on the
RTX 3090. The depth-Equal repro left 44,666 of 89,483 pixels red on lavapipe whenever the prepass
and the Equal pass took different routes; 0 under Exact or on one route.
Now on a fanning device the region-by-region draws take a region-copy variant
(RegionFanOut::RegionCopies), with no geometry stage. Its vertex function computes region
RegionFirst + DrawIndex of the table, stores its position through the region's line and four clip
distances by the one emitter the fan-out stage's copies use (pipeline::link::fan_out::region_copy:
NoContraction arithmetic, Position and ClipDistance Invariant), and its draw index as
ViewportIndex. Each recording sets as many viewports as one multi-draw takes, every one the
fan-out's over the render area, with each region's scissor at its index (bind::fan_out::scissors),
so off-region triangles are scissored, not clipped. The settle keys the pipeline with the same
viewport count (fan_out::copy_viewports). The variant replaces the regions variant, so no pipeline
is added per state. A device without multiViewport, shaderOutputViewportIndex and
shaderDrawParameters keeps the per-region-viewport route (FAST-PATHS known gap). Exact is
untouched. New: bind::fan_out::scissors, WorkCounts::rate_map_region_copy_draws and
rate_map_region_copy_recordings, PushField::RegionFirst; cache codec variants (artifact format).
Verified (blotch, steelbrain/blotch 1fd68a45c0..16d5c2404f):
- lavapipe at 16d5c2404f: rate_mapped_depth_equal + rate_mapped_fan_out 4/4, 0 red in all 10
depth-Equal lines (mixed pairs included), 0 pipelines made at the host step; clippy CPUICD,
GPU and plain 0; rustdoc 0. Translator suite at 8ad673ffba 3562/3563, the one failure
golden_hashes (re-blessed on development).
- 780M and XTX at 8ad673ffba (differs from the tip by the settle fix only): 0 red in all 10
lines. E->E GPU cold/warm: 780M 4.99/4.97 ms against Exact 1.68/1.65; XTX 1.14 ms/650 us
against 569/265 us. Creation (shader cache off): 780M 1.32 ms/state (Exact 0.92), XTX 1.30
(Exact 0.68).
- Owed: the same numbers at development's tip without this change (the GS fan-out), the
clip-distance probe, and the 780M/XTX runs at 16d5c2404f.
SEMANTICS_VERSION 2097 -> 2098, ARTIFACT_FORMAT_VERSION 518 -> 519, RUNTIME_VERSION 2243 -> 2244.
The census at the pin-75 tip (m3-max-26807): 2369 cases over 21 profiles, 48670 compiled, 1079
refused, 0 failed, 0 differences, 0 regressions, 348 uncovered cells as at pin 74, 0 artifacts
moved. Only the product digest changes (RUNTIME 2240 to 2243 change no translation). Slowest
compile 1.5 s, peak worker 227 MB, wall 121 s. The golden-table bless at this tip (m3-max-26806)
wrote 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.
The consumer's Iris walk at pin 73 (appwalk10 w-iris-26) failed one guest command buffer during
login with the runtime's own invariant "a batch's end recorded where the batch does not end"
(command_buffer/submit.rs), read as VK_ERROR_UNKNOWN (-13): the first tagged sighting of the -13
seen untagged three times on the 3090 and the 780M since pin 59.
Cause: a texture's face turn (texture/faces.rs turn_face) and a storage-form switch need the
device's Uncommitted count at 1 and the scheduler holding nothing. Both held for a command buffer
B in commit_now between slot.committed() and scheduler.commit(), where B's end is folded into its
last command buffer (face_swaps.any() false). Interleaving: B encodes an attached-read pass that
copies into the texture's other face G; B commits and folds its end; before B reaches the
scheduler, A opens a pass that turns the texture F -> G; at B's submission record_face_fixes finds
A's record and pushes a back copy G -> F after B's folded command buffer, so work.last() is not the
folded one and the command buffer fails. The same back copy would also have written stale texels
over B's rendering in F.
Now a committing command buffer stays in the Uncommitted count until scheduler.commit holds its
batches (Slot::handed; held.open still drops at committed(), so slot_wait is unchanged): no turn
or storage-form switch lands between the fold and the submission. Only turn_face and
storage_form_switch read the count, and both refuse rather than wait (Unturned::Busy and the
copy-in path; no switch), so nothing waits on it.
Verified (batchend, 42e70c6642 on 33de04117d), lavapipe on msi: new device tests holding B at a
new trace point Point::Committing while A's pass opens. Negative control (the tip without the fix,
26731): the folded test panics on the invariant (submit.rs:1145), the apart test finds B's pixels
clobbered (4096 bytes differ). Tip (26755): 6/6, finale folded 1 / apart 1 as built, Moved {swaps
0, busy 2, fixes 0}, B's pixels right at every step. Turns still happen: the existing
a_texture_s_faces_take_turns_for_its_attached_reads shows swaps 1 in each of its turn cases, the
same at base and tip. clippy --cfg m2v_cpu_icd (26758), --cfg m2v_gpu (26726), plain (26693) and
rustdoc (26725) 0. The command_buffer/submission/queue/storage_form/attached-read suites on
lavapipe (26759) and the XTX leg follow on development.
RUNTIME_VERSION 2242 -> 2243.
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.
An indirect command buffer's CPU setters, after RUNTIME 2238's dense table and one hold: every
setter write now goes through one per-command batch (one storage pointer, one count of the writes
made without the lock), written into in place rather than handing back a ~180-byte plan (which
made a first form slower than before). The written flag (SEMANTICS 2097) is set in the one write
helper, write_field, by the rule unchanged: every setter write sets it, a write of the reset
record clears it. A draw, a dispatch, a set barrier and a cleared barrier the edits' summary
already holds, like a buffer slot before, take no lock where the GPU may not have written the
buffer, checked against an atomic mirror of the summary set under the lock; a pipeline state the
command already names is set again with no lock and no CallHold (an atomic (id, serial, kind)
mirror per command; a recovery's carry forgets it, so the next set redoes every check). New
public calls IndirectCommandBuffer::set_render_command / set_compute_command (an index and a list
of sets, no handle and no Arc clone; index and kind refusals at place 0) and the handle's
set_each; borrowed RenderAt/ComputeAt views. docs/API.md says which setter writes take no lock;
the carry docs say a write made without the lock does not wait for a carry (as buffer slots'
did; a set racing a device recovery may write through the old mapping).
Verified (icbset, f403b6e922 on 33de04117d), ns a command, median, 16384 commands, msi lavapipe
(26658, two passes), development e93b3f192e -> tip: full render slot 142.6/147.6 -> 100.7/100.1;
compute slot 119.3/123.0 -> 77.5/77.5; three fields 77.1/78.8 -> 71.8/71.9; draw only 43.5/43.9 ->
34.0/34.0; set_render_command 94.7, set_compute_command 78.9. 780M (26754, 256 commands): full
slot 154.3/167.7 -> 111.0/117.0, compute 123.3/122.7 -> 93.1/87.8. lavapipe ICB set 154/154,
including a test of which way each write went and set_each/set_render_command against one setter
at a time; negative control (a whole-record read-modify-write in write_field) fails the
strengthened two-thread test (26658). 780M: the 6 ICB device tests and set_states pass. clippy
plain / --cfg m2v_gpu / --cfg m2v_cpu_icd and rustdoc 0 (26682, 26756).
RUNTIME_VERSION 2241 -> 2242.
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.
On the consumer's XTX Launchpad walk ~40 inline render encoders a present end keeping nothing
though none of their draws was counted unkept (keepdraws' read of lp72-xtx): every logged call
but a direct draw, a bind, a pipeline state set and a render state set forgets the encoder's kept
draws (render/replay.rs log -> forget_again), and the guest orders its heaps between encoders
with fences (updateFence after the last draw, useResource(s)/useHeap(s) before).
A kept draw, and those set aside, now survives:
- update_fence: it records nothing;
- wait_for_fence where the encoder used no shadowed texture (a wait over a shadowed texture marks
it written, so later commands take its copy again: that wait still forgets);
- use_resource(s) / use_heap(s), but a memoryless use (which fails the command buffer): a use
that changes the residency gives it a new generation, which Under holds, so the next draw takes
every step; a repeat use changes nothing.
Every other logged call still forgets. New WorkCounts: kept_draws_kept_across_{fence,use},
kept_draws_let_go_{fence,use,barrier,store_action,visibility,other} (the kept draw a logged call
let go, by kind), encoders_last_draw_empty.
Verified (keepdraws, 77437d3277 on adaccf2367): lavapipe debug 64/64 over kept_across_calls,
draw_again, carried_draws, snapshot_reader, deferred_calls (26714); the new
tests::kept_across_calls 2/2 (draws after updateFence, waitForFence, a new useResource, the same
use twice, a new useHeap, the same heaps, updateFence, against the same calls plus a forgetting
call: pixels and commands equal; kept across fence 3 and use 5, drawn again 3, unlike_kept_under 2
for the two residency-changing uses; a barrier test let_go_barrier 1, encoders_last_draw_empty 1).
Negative control (26721: a draw again recording its Vulkan draw twice) fails the pixel test (48
vs 36 a channel). clippy plain / --cfg m2v_gpu / --cfg m2v_cpu_icd and runtime rustdoc 0 (26715).
An XTX run follows on development.
RUNTIME_VERSION 2240 -> 2241.
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.
On the consumer's XTX Launchpad walk ~59% of render encoders end keeping nothing though they would
fit the next encoder (WorkCounts::encoders_none_kept_next_fits, RUNTIME 2229), and ~75 draws a
present read their own color attachment through a snapshot (render/snapshot.rs), a draw that kept
nothing and so took every step each time.
A direct draw that reads through snapshots (not in place), pins nothing, and otherwise meets every
plain-draw condition (records into its instance as it stood, a pipeline made ahead, one push, one
Vulkan draw, whole draw state, its only push hole SnapshotPhase, no write but its snapshots' uses)
now keeps a Kept with a reader part (slots, feedback colors, the phase hole, the pipeline's own
write masks, its layout). A draw again records exactly what the first did, the snapshot draw
(masks 0, phase 1) then the drawing draw (own masks, phase 0), with their barriers and query,
re-deriving only what changes with no call (the reader's ordinal, its learned coverage and the
area/coverage decision, peeked first; if it would no longer take the snapshot the draw takes every
step). A rebind re-derives the reader decision through side-effect-free cores of the functions
every step runs (in_place_wanted, snapshot_wanted, area/coverage, snapshot_holds, snapshot_apart),
binding::rebind_into rewrites a changed slot's SnapshotTexels source, and record_rebound records
the two recordings with their pairs. A carried reader's snapshot conditions are checked at its
rebind beside carried_stale (WorkCounts::draws_carry_stopped_snapshot), begin_carried passes its
feedback to inline_begin, and a carried draw retains its pipeline objects into its encoder.
Set-aside kept readers are exempt from a reader's forget of its colors' readers: their reads go
through their own pair, whose first barrier orders every earlier color write. In-place readers,
pinning readers and readers recording into a new instance stay unkept. New WorkCounts:
reading_draws_snapshotted_again, draws_rebind_stopped_snapshot, draws_carry_stopped_snapshot.
A lane bench (runtime_lane reader_costs) measures the CPU per draw of encoders ending in a reader.
Expected reach (keepdraws' read of the consumer's lp72-xtx counters): readers never sit in an
unsplit inline pass, so this reaches the ~22 fitting encoders a present that are not inline.
Verified (keepdraws): clippy plain / --cfg m2v_gpu / --cfg m2v_cpu_icd and rustdoc 0 at adaccf2367;
lavapipe 43/43 (no snapshot path there: pixels only); XTX and 780M debug at e4961c98ee 91/92, the
one miss (a carried draw's later draw again) fixed by 8e219f8bad. XTX/780M reruns at the tip,
negative control and the release bench are queued and follow on development.
RUNTIME_VERSION 2239 -> 2240.
Two runtime_lane indirect_dispatches tests (an_indirect_dispatch_reads_the_arguments_the_work_before_it_wrote,
an_unaligned_offset_reads_at_the_multiple_below) expected a SplitDispatch notice on every device. A
10x3 grid in 4x2 threadgroups runs on the kernel's partial-threadgroups variant where the device
compiles it (compute.rs partial_direct), as Metal runs the dispatch its arguments state with partial
threadgroups, so nothing splits; on the RTX 5080 both failed on the notice alone, their outputs
matching the direct dispatch's, at 045c6fedf9 (26552) as at e93b3f192e (26537).
ragged_splits(device) compiles the fixture's kernel through the public compile layer under
VariantKey::partial_threadgroups (the variant settle_partial asks for) and answers "split" where
that compile is refused, which is what makes the runtime keep the split; the kernel uses no
simdgroup function and binds plain buffers, so that key is the runtime's. The two tests expect
SplitDispatch where it holds; an_indirect_dispatch_runs_as_the_direct_dispatch_of_its_arguments
expects it where ragged_splits holds or maxComputeWorkGroupCount[1] < 65536, so its 65536-group case
still checks the split notice on the 5080 (limit 65535).
Verified (radvcompile, 1eb49b23b6 on e93b3f192e): clippy -p metal2vulkan-validation --all-targets
--all-features --cfg m2v_gpu = 0 and the gpucfg test build = 0 (26569); RTX 5080 runtime_lane::
indirect_dispatches 10/10 (26585). The predicate's "split" side has not run on a device yet (CI's
lavapipe device job runs it). Test only; no version bump.
The census at the pin-74 tip (m3-max-26572): 2369 cases over 21 profiles, 48670 compiled, 1079
refused, 0 failed, 0 differences, 0 regressions, 348 uncovered cells as at pin 73. 88 cells'
artifact hashes move with SEMANTICS 2097 (indirect command buffer encoders store each command's
written flag), each still compiled. Slowest compile 2.6 s, peak worker 235 MB, wall 161 s.
The golden tables at the pin-74 tip (m3-max-26571; inventory, golden and printout blesses each
exit 0): 88 golden hash rows move under unchanged keys, every one an indirect command buffer
encoding fixture (engine icb_*_encode, icb_merged_*, icb_replay_*, icb_reset_encode,
icb_routed_writes, mesh_commands, resident_draws, kernel_icb_encode_*), with SEMANTICS 2097: the
lowered encode operations and copy_command store each command's written flag. The inventory and
the printouts are unchanged. Test data only.
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.
An indirect command buffer's records live in Shared host memory by design (the host step reads
them on the CPU, and plain Metal lets the CPU write a Private ICB's commands), so a blit's reset
of a whole ICB was a vkCmdFillBuffer over every record across the link: on the consumer's Modern
Rendering sample (45k commands, 101 MB of records) 56.9 ms of GPU time a frame on an RTX 2080
over PCIe x4, against 0.26 ms for the same fill in device-local memory, while the sample writes
~1.3k commands a frame.
Each command now has a u32 written flag in an optional tail after the records (16 +
capacity*2248 + 4*i; CommandBuffer::initialize and decode unchanged). The lowered encode
operations and copy_command store 1 through the contained wide_at (no tail: the sink; a faulting
operation stores nothing); the CPU setters and edit mark it, and a CPU write of the reset record
(reset_with_range) clears it; a blit copy fills the destination's flags with 1. A blit reset is
one dispatch of the new owned kernel bind::icb_reset_module per run of commands, a workgroup a
command that zeroes a flagged record with 8-byte stores and clears its flag; the overflow clear
stays a fill. The carry copies the whole storage, flags included; a lost carry rewrites the header
and zeroes the flags.
Verified (radvcompile, at 273dbba28c on 045c6fedf9):
- 2080 (26425, 26442; 45k commands): old reset 56.8-56.9 ms in every shape; flagged reset 0
written 0.256 ms, ~1.3k written 1.736 ms, all written 60.47 ms (+6.5%: 8 bytes is the widest
store every record allows; recorded in blit_indirect.rs "What a reset costs"). A culling-shaped
encode kernel (45k render commands, 3 operations each): 19.80 -> 20.11-20.16 ms.
- msi 26494: engine and interpreter round trips with flag asserts and the reset kernel's tests
59/59, runtime unit tests 1536/1536; clippy workspace all features, each feature alone, runtime,
--cfg m2v_gpu all 0; rustdoc -D warnings and the API reference check 0.
- RTX 5080 (26478, the change before the rebase): 281/282, both new device tests passing
(a_reset_resets_what_each_writer_wrote_since_the_last on the host step;
an_execution_on_the_gpu_alone_runs_what_a_reset_left); the one failure, a getter test's old fill
count, fixed in this commit. Negative control (26505, the kernel's flag store removed): both new
tests fail. A device rerun at the landing tip is queued.
SEMANTICS_VERSION 2096 -> 2097 (the lowered encode operations store the flag), RUNTIME_VERSION
2238 -> 2239.
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.
An indirect command buffer's CPU setters cost ~290 ns a command in the runtime alone on lavapipe
(the consumer's icb_slots_cost at pin 72: 16384 render commands of 5 fields; a Mac does ~5 ns),
the largest frames CallHold's drop, the setters' edit, and a BTreeMap<u32, CommandState> insert per
command. Two cuts:
- The per-command state is a dense table: a u32 a command indexing a small table of distinct
CommandStates, each counted by the commands that name it (set_states.rs); a set checks the last
state it set, then a map. A recovery's carry walks the distinct states. An entry goes when its
count reaches 0, so nothing is held past what the map held.
- A render or compute pipeline set took 4 CallHolds (the setter's, program(),
can_encode_indirect_commands(), indirect_command_writes()), 8 mutex takes; it now takes one, and
a set of a state the table already names reads no program at all.
Also: icb_encode_bench gains a full render slot (pipeline + 2 vertex + fragment + draw) and a
compute slot (pipeline + 2 kernel buffers + dispatch) a command.
Verified (icbset, msi lavapipe release, one A/B job m3-max-26475, binaries alternated, two passes,
host load ~20 so passes drift; median ns a command at 16384 commands): full render slot base
232.7/291.6 -> dense 215.7/253.9 -> + one hold 135.2/185.8 (-42%/-36%); compute slot 212.0/263.4 ->
196.8/217.6 -> 116.6/151.5 (-45%/-42%). ICB, released-program, write-route, recovery and kept tests
on lavapipe running (26484) at the branch tip. The batched setter (set_each) and the unlocked
action/pipeline setters follow after the ICB reset's dirty flags land.
RUNTIME_VERSION 2237 -> 2238.
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.
RUNTIME 2228 (3969e96010) records no Vulkan dispatch for a kernel with no loop that writes only its
own threads' and threadgroup memory, but compute::record returned at the top for such a pipeline,
before the dispatch's uses were made. Its bound buffers were never named by the batch, so a
Managed buffer the CPU wrote with didModifyRange kept its modified range for the next command
buffer that named it: the guest's timed kernel, which then paid a fill-queue submission and the
bytes over the link. Metal (and pin 69) copies it in with the command buffer that binds it. The
early return also skipped the detached/rebound check, holding resident buffers, the offset and
function-table checks, the stage-in reach check, fills and first work for what it binds, and the
table retain.
Now an inert dispatch plans and makes its uses as any dispatch, passes the detached-buffer check,
and names them (EncoderCore::name_uses: keys kept, host-page buffers held and named, resident ones
held; no hazard tracking and no write noted, as it runs nothing), retains its table, counts
dispatches_skipped_inert and records no vkCmdDispatch.
Found by gbreg from the consumer's Geekbench traces on the RTX 2080 (gbt pin 69 vs gbi
a2ac4433ca; the split run gbh, their tree on our pin-69 runtime, put the rise in our runtime):
solo import_image_rgba_to_rgb 0.228 -> 1.118 ms, color_look_up_tetrahedral 0.769 -> 2.651 ms.
Verified (gbreg, 5ac162c1ba on 84f68cc6d9):
- 2080 release harness examples/inert_uploads (26460; 330ca5a282 / a2ac4433ca / 84f68cc6d9 / fix,
medians, two passes): batch shape (40 x 8 MiB Managed, CPU-written; A = 40 inert dispatches
binding them, B = 40 dispatches reading 4 KiB of each): B 0.36 / 169.6 / 169.5 / 0.39-0.45 ms
(the 335.5 MB copy-in back in A); frames shape (FT-like): frame wall 0.56 / 1.2-1.34 / 1.2 /
0.17-0.20 ms, fill-queue submissions per frame 0 / 1 / 1 / 0. Inert dispatches alone: GPU 0.006
ms at the fix as at a2ac4433ca (the skip's win holds); encode 0.9 us per inert dispatch.
- lavapipe inert_dispatch 5/5 (26452); negative control (fix reverted, tests kept) 4/5, the new
detached test failing Completed vs Error(DetachedBacking) (26454).
- Owed on development: 2080 copy-in test runs, clippy in three configurations, rustdoc.
RUNTIME_VERSION 2236 -> 2237.
The census at the pin-73 tip (m3-max-26357): 2369 cases over 21 profiles, 48670 compiled, 1079
refused, 0 failed, 0 differences, 0 regressions, 348 uncovered cells as at pin 72. Only the
product digest line moves (RUNTIME 2234-2236 and SEMANTICS 2096 change the product's sources);
no cell's artifact hash moves. Slowest compile 3.0 s, peak worker 235 MB, wall 178 s.
The golden tables at the pin-73 tip (m3-max-26356; inventory, golden and printout blesses each
exit 0): the four ANV profiles' fingerprints move (intel-arl-anv, intel-irisxe-anv,
intel-irisxe-rplp-anv, intel-uhd770-rpls-anv) with SEMANTICS 2096's second ANV stage bound in the
device profile; no golden hash row under them moves. The inventory and the printouts are
unchanged. Test data only.
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.
RUNTIME 2231 split the guest's encoder at each synchronize of a Managed buffer into its own
deferred segment (Deferred::SyncOut): every command buffer holding one paid an extra continuation
VkCommandBuffer and a segment VkCommandBuffer, its batch could no longer fold its end (an extra
VkSubmitInfo), and the copy was decided at submission. On the consumer's 2080 Geekbench walk that
showed as ~1 extra no-dispatch command buffer per synchronize.
Now the copy is decided at encode, from the kept writes of other command buffers plus this command
buffer's own writes before the synchronize, and recorded in place with only the written regions;
an unwritten synchronize records nothing. The copy is whole where an earlier segment is unknown,
the command buffer writes memory no use names, or the buffer was handed out. At submission,
settle_syncs_out adds a top-up command buffer just before the part holding the copy, covering only
writes from other command buffers noted after the encode, between two all-stage barriers
(WorkCounts::managed_synchronizes_topped_up, new). The SyncOut segment is gone (deferred.rs is
back to its 041038a914 form); may_fold folds again.
Verified (mansync, 4e3e22f4d6 on 8a81350e13; 2080 release, one run each, 26257), per command
buffer, 041038a914 / 8a81350e13 / fix:
- all (40 written): VkSubmitInfos 1/2/1, VkCBs 2/4.1/2, GPU 95.61/95.66/95.62 ms
- mixed (30 written, 10 CPU did_modify_range): VkSubmitInfos 2/3/2, VkCBs 3/5/3, copied
176/132/132 MB, GPU 95.4/71.6/71.6 ms
- none (40 unwritten): VkCBs 1/3/1, GPU 95.05/0.014/0.007 ms
- small (import shape: 1 MiB fill + 2 unwritten 335,872 B no-copy synchronizes): VkCBs 2/4/2,
commit-to-completion 0.519/0.111/0.116 ms (keeps ~4.5x)
vkQueueSubmit calls equal in every row; topped_up 0 in every fix row. Tests on the 2080 (26258):
managed_copy_device, detached_contents, kept_padding, device_memory_overflow 41/41, with two new
steps (a write committed before but encoded after the synchronize: topped up 1 and every byte read
back; a write committed after: nothing copied, the next synchronize copies exactly that range).
clippy plain 26228, --cfg m2v_gpu 26227, --cfg m2v_cpu_icd 26229 all 0; rustdoc 26230 = 0.
RUNTIME_VERSION 2235 -> 2236.
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 compute or tile pipeline state's creation that found its function in the shader cache directory
also read, checked and decoded the pipeline's own artifact (68 KB on the 16,348-word ccb_conv_array
kernel: read, XXH64, scan, decode ~11 us plus its file read), and a creation that translated
encoded and wrote both. A compute pipeline is its one function relocated, with the layout and
interface its link derives from that function, so the link translates nothing and costs less
than the artifact (5.9 us on the same kernel).
Sources::kernel now takes the memo's live variant, else a binary archive's pipeline, else links it
from the compiled function (compile_compute_pipeline / compile_tile_pipeline), and keeps it in the
memo weighed by the new translator fn ComputePipeline::footprint. The directory keeps no compute
pipeline (EntryKind::ComputePipeline stays for binary archives). ShaderCache's compute pipeline
load/store, Looked::ComputePipeline and ShaderCacheStatistics' compute_pipeline_hits/misses
(always 0 now) are removed. The new public fn changes SOURCE_DIGEST, so cache directories start
fresh. RUNTIME_VERSION 2234 -> 2235: a run's pipelines now come from another path.
Also: compute_create_bench times "function decoded + pipeline linked" (test only).
Verified (warmskip, at 222d95ea69 on 18060aa638's base): clippy plain 26268, --cfg m2v_gpu 26269,
--cfg m2v_cpu_icd 26271 all 0; rustdoc -D warnings 26270 = 0; touched tests on lavapipe 26262
158/158 (runtime suite + validation lane cache, binary_archives, pipeline_records). Lavapipe A/B
release (msi 26316, legs B A B A, host busy so ~30% above quiet), creation medians before ->
after: CONV memo-1 settled 88.4/88.2 -> 74.0/72.4 us; CONV after a warm pass 194.8/177.8 ->
136.3/137.8 us; SMALL memo-1 32.4/32.0 -> 19.8/26.9 us; CONV warm same device 18.7/18.9 ->
18.8/19.4 (memo, unchanged). XTX before/after pending (26300).
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 warm pass made every record's creation again at every boot, refusals
included: on the Iris Xe under ANV six Cycles kernels past the stage bound
its driver compiles intact (Unsupported{StageSize}) cost 1.4-2.4 s of
warm-thread work a boot, one record 1397 ms before its refusal. Nothing kept
the refusal: it is decided in the translation, after the shader cache's
lookup missed, and only translations are stored.
Now a warm creation's failure that is a fact of the record on this device
(a typed refusal, Error::Unsupported, or a translator outcome the translator
states permanent for its input; never a missing input, a deadline, a
cancellation, a failed host allocation, out of memory or a lost device) is
kept in the build's directory, named by the record's bytes and the driver's
identity (vendor, device, driver version, pipelineCacheUUID) under the
profile fingerprint and RUNTIME_VERSION (shader_cache/warm_refusals.rs). A
later pass looks the record up there before reading it and answers it as
failed of the same kind at once, counted in the new
WarmStatistics::records_failed_before and announced as before. The
program's own creation still translates and meets the refusal itself.
Tests: warm::a_refusal_for_good_answers_a_later_pass_at_once (a 256 KiB
private array every device refuses: a later device over the directory
answers it with no stage decoded and no lookup; an Invalid failure is made
again by each pass), pass::only_a_refusal_for_good_is_kept,
shader_cache::a_warm_refusal_is_found_by_its_own_driver_only,
warm_refusals' frame test.
Why: on the Iris (ANV, pin 71) every boot's warm pass retried 6 records refused StageSize /
DriverDefect, 1.4-2.4 s of warm-thread work a boot (one record 1397 ms). Verified (warmskip, msi,
lavapipe, at cedc049cf1 on 86d362e2aa): warm and shader_cache tests 73/73 (26206); negative control
with the lookup disabled fails, records_failed_before 0 (26215); clippy plain 26209, m2v_gpu 26224,
m2v_cpu_icd 26216, rustdoc -D warnings 26225, all 0.
RUNTIME_VERSION 2233 -> 2234 (the warm pass answers kept refusals).
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.
ANV's compiler takes memory that grows faster than the stage it compiles, inside the process that
creates the pipeline, well below the 2^20-object bound the serialized stage already keeps under.
Measured on the Iris Xe of RPL-P (Mesa 26.2.6), compute modules created cold through
vkCreateComputePipelines, the resident set sampled every second (job m3-max-26147): entry weights
73,814, 75,886 and 99,109 were created in 45 s, 47 s and 132 s at peaks of 1.76, 2.24 and
3.65 GiB; a module of entry weight 532,213 passed 16 GiB at 358 s without finishing. Job
m3-max-26086: a module of entry weight 796,525, its heap raw-texture arms dead, passed 20 GiB in
under two minutes. Both under the old bound (786,432) would have been handed to the driver: one
pipeline creation that can take a host's memory.
- DriverWorkaround::CompilerMemoryGrowsWithStageSize, keyed on ANV whatever its GPU and release
(device::derive), documented with those points.
- stage_bound: StageBounds holds both bounds (SERIALIZED_STAGE_WEIGHT 786,432;
COMPILED_STAGE_WEIGHT 99,109, the largest measured to compile, no margin below it as nothing
above it is measured to compile). emit keeps a module under every bound its profile's defects
set, with the same widest-pin retry; a refusal (StageSize, DriverDefect) names the serialized
stage's defect past 786,432 and the compiler's memory below it. The bound rises when a larger
compile is measured within host-sized memory.
- The test hooks (compile_bitcode_bounded, compile_stage_bounded) take StageBounds.
Docs: stage_bound's module docs and FAST-PATHS' known-gaps entry state both bounds with the
measured points only (weights, never names), and restate the serialized bound's figures in
entry_weight's units: the faulting stage 1,603,989 (0.683 objects per unit, was 1,565,083 and
0.70 by a count 2.4% lower), the other 21 stages' ratios as counted by that count, which ran 1.9
to 2.7% below entry_weight on the five modules both counted; the shader-object figure likewise
1,603,989. Feature::StageSize's docs and its reach line cover the memory bound; REFUSALS.md
regenerated. api_signatures.tsv blessed with the new variant (the bless also moves
scheduler_slice_rescues to the script's own order).
For a consumer on ANV: a module of entry weight past 99,109 and up to 786,432 that was handed to
the driver is now refused (Unsupported, Feature::StageSize,
Needs::DriverDefect(CompilerMemoryGrowsWithStageSize)) unless its pinned plan fits. Other drivers
are unchanged.
Tests:
- engine_simd_lockstep::a_kernel_past_the_stage_bound_keeps_the_widest_pin_or_is_refused covers
both defects: for each, under a bound the emulated module passes the kernel is planned again
pinned (exact at 32 lanes), under one its pinned module passes too it is refused naming that
defect, and past both the serialized stage's defect is named; RADV emits under every bound.
- engine_simd_lockstep::a_kernel_past_the_stage_bound_gets_one_answer_through_either_path on the
serialized bound through StageBounds.
- device::tests::profile::large_module_defects_are_keyed_on_anv includes the new workaround.
Verified, on msi, read from inside each job:
- m3-max-26184 (this change on 86d362e2aa): cargo fmt --check 0; clippy --workspace
--all-targets --all-features -D warnings 0; clippy -p metal2vulkan --no-default-features 0;
clippy with --cfg m2v_gpu (all features) 0; nextest over device::tests, engine_simd_lockstep,
fast_paths and the refusal_surface, api_signatures, api_surface and feature_vocabulary
binaries: 189 run, 189 passed.
- m3-max-26212: the stage-bound test with its output shown passed with no SKIPPED line; the
negative control, the compiled bound's cap set past every module, fails it ("left: Emulated,
right: Direct" for CompilerMemoryGrowsWithStageSize).
SEMANTICS_VERSION 2095 -> 2096: on ANV a module of entry weight above 99,109 (and up to 786,432) is now
refused or re-planned with the widest pin kept, where it was handed to the driver.
The census at the pin-72 tip (m3-max-26176): 2369 cases over 21 profiles, 48670 compiled, 1079
refused, 0 failed, 0 differences, 0 regressions, 348 uncovered cells as at pin 71. 1223 cells'
artifact hashes move with SEMANTICS 2092-2095, each still compiled. The slowest compile took
2.2 s and the largest case worker 389 MB (RSS), inside the 20 s and 500 MiB ceilings.
The golden tables at the pin-72 tip (m3-max-26175; inventory, golden and printout blesses each
exit 0): 363 golden hash rows move under unchanged keys, with SEMANTICS 2092 (NVIDIA computes
half on its 16-bit instructions under the float controls: the nvidia-rtx50-linux and
nvidia-rtx5080-laptop columns, 360 cells), 2093 (the rate-map fan-out probe's block bits), 2094
and 2095 (lockstep barriers that a simdgroup cannot meet across rows run only where one spans
rows). golden_hashes_match_the_table failed on development from SEMANTICS 2092 until this.
The inventory and the printouts are unchanged. Test data only.
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.
On ANV (TrimmedCommandBufferFailsResubmission) the free thread frees a spare pool's command
buffers without trimming it, and Mesa's common command pool keeps every freed one for that pool's
later allocations; only a trim or the pool's destruction destroys it. Each pool kept as many
command buffers as it ever held at once, for the device's life, summed over every pool and
invisible to HELD: a guest's compute load on the Iris Xe grew the process heap to gigabytes under
vkAllocateCommandBuffers (consumer ledger: growth, then a panic, after Geekbench's Fluid pass).
- A pool counts the command buffers freed from it untrimmed, less those made from it since. Once
the spares hold UNTRIMMED (4096), a trim round is due: as the scheduler next submits a batch,
while its group holds no batch, State::trim_round marks every kept barrier command buffer to be
recorded again before a batch takes it (KeptBarriers::invalidate; a begin clears what it names),
then trims the spare pools holding the most until TRIMMED_AT_ONCE (1024) at least are destroyed.
Where frees are trimmed at once, pools hold none untrimmed and nothing changes.
- A taker takes a spare holding command buffers before an empty one.
- Counted: WorkCounts::spare_command_pool_trim_rounds, spare_command_buffers_trimmed_in_rounds.
- spares.rs docs carry the measured effect, its walk figures scoped to their profiles.
Verified (perdraw5):
- Iris Xe (ANV) 25876, tests::spares_compute_in_flight, base -> with rounds: heap 410 -> 2936 MiB
vs 416 -> 534 MiB; anonymous 434 -> 2965 vs 439 -> 743 MiB; shed 129,361 vs 71,086; 17 trim
rounds destroying 64,714 command buffers. A negative control without the invalidate (e6e83e1e4b)
lost the device at round 2.
- Iris 26157, the kept test: the round destroyed 1214 (pool (3, 1214) -> (3, 0)), 0 of 59 command
buffers failed, 0 recoveries. Negative control 8db880af0a (no invalidate): the same round, then
1 of 59 failed and 1 device recovery: FAIL.
- msi 26150 at 9315937cbc: pure spares and kept-barriers tests 25/25, clippy, --cfg m2v_gpu,
rustdoc -D warnings, API signature/surface 15/15. msi 26162 at the rebased 2aef11f27d (on
86d362e2aa): the same lint green, lavapipe debug spares/kept_barriers/scheduler_held_wakes/
scheduler_wakes/unshared_hold 48/48.
- 780M walk: no churn (0 alloc/s, 0 frees, 0 trims).
Not shown: the fluid shape stayed flat on base and fix alike, so it doesn't reproduce the guest's
per-pass growth; the consumer's Iris Fluid pass is the proof.
RUNTIME_VERSION 2232 -> 2233.
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 guest's commitAndWaitUntilSubmitted could stay unanswered until the next commit (reims, XTX
RADV at pin 71, 2 of 77 runs under load: "A was never submitted"; the GPU idle; the scheduler
asleep with the batch held for 10 s; an empty commit on another queue released it at once).
Cause (reims's finding, /tmp/xqtest/m2v-finding.md): on a host whose one graphics VkQueue an
unshared queue also holds (RADV, ANV; WindowServer's queues are unshared), batch A behind H was
held by held_for_unshared() while H was in the Flight. QueueSlot::completed publishes `completed`
(fetch_max) before waits.completed takes H out of the Flight. When H completed between those two
steps, the hold read a stale Flight and gated on completed + 1, which nothing meets.
Fix:
- Unshared hold: QueueWaits::hold_ahead reads the published completed value under the waits lock;
Flight::ahead(ran, completed) counts batches at or below it as gone; Room::Hold { after, through }
carries the oldest still in flight; await_unshared_room gates on `through`, fences, and reads
again (completed >= through wakes it at once). No reorder of QueueSlot::completed.
- Kept group (submit_ready, Group::keeps read before gate_on): sets the gate, fences, then reads
again (Group::pending_through), the protocol gate_heads and check_heads use.
- A WAIT_SLICE that ends with a batch held makes a pass, as the module docs promise, counted in
WorkCounts::scheduler_slice_rescues (0 wherever every wake comes). api_signatures and host_ab
updated.
Verified (perdraw5, msi 26135, lavapipe, at 3bd14c83ac on a2ac4433ca): clippy all features and
--cfg m2v_gpu, rustdoc -D warnings, api_signatures/api_surface green; 36/36 of scheduler_held_wakes,
scheduler_wakes, completion_wakes, scheduler, unshared_hold. tests::scheduler_held_wakes forces
each interleaving with test-only hold points (completion::trace, cfg(test) + device cfgs; `Leave`
sits between QueueSlot::completed's fetch_max and waits.completed):
- unshared: H held at Leave while the next is committed; it goes with 0 slice rescues.
- kept group: both completions published between keeps and the gate; it goes in that pass, 0.
- lost wake: completion wakes dropped; the held group goes at the next slice (1 rescue, 99 ms).
Negative controls each fail only their own test: old gate (unshared held until the slice at
101 ms, and with development's code until the next commit, reims's symptom); kept recheck
removed (102.9 ms, 1 rescue); a slice making no pass (never completed within 5 s).
RUNTIME_VERSION 2231 -> 2232.
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.
Lockstep write-write ordering stays the default with no switch (owner, 10-29). What changes is the
proof of where it is needed. lower/simd/lockstep/facts.rs (Lanes) evaluates a place-only offset
at all 1024 places and compares every lane pair of each 32-lane block, modulo the index width:
exact for any stride, where the power-of-two lattice fell back to "may meet" (a 144-byte stride
against a 64-byte one, g = 16). The walk goes through constant GEP steps over a uniform base and
through single-incoming phis (what constant branches leave in the real kernel). A threadgroup
barrier that the rows analysis alone clears becomes Order::Rows, emitted under
(sy != 1 || sz != 1) && sx % 32 != 0 on the size spec constants, which the driver folds: no new
variant. air::Lockstep gains across_rows / orders_across_rows (api_signatures). Census name
barrier.lockstep.threadgroup.rows. A block one shift from the previous by the same shift for both
accesses reuses its answer, so an affine pair compares 1,024 lane pairs, not 32,768; the
comparisons are charged to the meter.
Why: the guest's generic MPS ndArrayConvolution2D, which NVIDIA's MPS picks for Super Resolution,
Background Blur and Face Tracking (3.7 s of SR's 5.5 s GPU on the 2080), carried 3 lockstep
write-write barriers per outer iteration that Metal's AIR doesn't have (stores at
4(t>>3)+144(t&7) / +64 bytes and 1152+4t / +512, t < 128): no two lanes of one simdgroup meet.
Verified (ftconv):
- Tests: 144/64 with single-incoming phis at 128x1x1 and 64x2x1 (3 row barriers, no plain one);
3t / 3t+9 at 32 (lanes 3 apart meet: one plain barrier kept, lockstep's answer); a row-word
kernel at 8x4, 16x2, 32x1.
- msi 26111 at 8cbb29cc67: metal2vulkan + air suites 4,121/4,122 (golden_hashes, pre-existing,
re-blessed at the next pin); api_surface passes; clippy plain, m2v_gpu, m2v_cpu_icd 0; rustdoc 0.
- The real AIR translated before/after with the CLI (constants from the walk's log): before, 5
barriers, 3 lockstep, unguarded; after, the 3 lockstep ones row-guarded, none runs at 128x1x1.
With the constants misread big-endian (tile C=128) the stores do meet and that barrier stays.
- RTX 2080 (620.70.06), the pin-69 module (8003 words), synthetic params, median of 21, two
rounds: 8,192 groups 0.8676 -> 0.8414 ms (-3.0%); 2,048 groups 0.2233 -> 0.2167 ms. Labelled
liberty: "after" is the dumped module with its 3 barriers removed (what the guard folds to at
128x1x1), not a re-translated module.
Expected: authored-compile census and stored strategies churn (.rows), re-blessed at the next pin.
Not yet: release-mode translation time of the largest row (the pin's census measures it).
SEMANTICS_VERSION 2094 -> 2095.
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.