41b5038342f2d769740fbf014e28feb377a25f1d
9048
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
41b5038342 |
Player: a commit waits on the CPU for the backend's own surface fill before it goes
What: the replay player's surface backend keeps its last command buffer on its own queue, a fill at a shape's making or the refill a picture owes at its first use (Surfaces::unwaited). The stream's next commit waits for it on the CPU, once, before committing, counted as surface_host_waits (an executed counter, and in the report's surfaces line). New test a_surface_picture_fills_before_its_use_behind_another_queues_long_work plays the same picture behind 256 dispatches over 4 MiB committed first on another queue, and checks the second picture, one refill and one host wait. The runtime README's queue rule now says what Metal and the code do: a command buffer sharing a tracked resource with an earlier-committed one of another queue goes after it only once that one is submitted (the M3 Max rows of that section, jobs m3-max-52432 and m3-max-52415), a cut command buffer that has begun counting as submitted until its next piece waits for an event; an event wait holds only its own queue; the fence sentence says what the code does, Metal's side measured only by jobs m3-max-52186 and m3-max-52188. Its known gaps name a program that relies on commit order between queues for a shared resource with no event or fence. docs/REPLAY-STREAM.md gives the wait and its counter. Why: a_surface_picture_fills_its_shapes_at_their_first_use read the first picture's inverse on the RX 550, the 780M, the Iris Xe and lavapipe at |
||
|
|
e74f1480ed |
Tests: the heap barrier count takes its kernel's rate as the test's input
What: every_device_orders_a_heap_s_resources_as_one sets step's rate to 1 ps a threadgroup before each counted command buffer, so its two dispatches share one piece and the barriers counted are the hazards' and the one segment end's. No assertion changes. Why: the same piece-end barrier |
||
|
|
f21db0934c |
Conformance: the stage-in cases' lavapipe answers, and StageInKind's doc no longer opens a list
The first replay of the stage-in cases through the runtime on lavapipe (llvmpipe, Mesa 26.2.4, job m3-max-68623) compared every row the old refusal had hidden. stage-in-region-clamps was refused at its one indirect row alone (its 27 other rows Metal's), attribute-format-class-crossings exact, and twelve sites differed, each now a ledger row or a declaration: - The three cases over stage_in_fetch_wide declare simdgroup-access-order, as the other cases whose kernels store at an index of the grid's width do: the runtime's pipelines note the store's SIMD-group access pairs on every device. It loosens the notices site alone. - attribute-format-fetches, five normalized 8-bit formats, on every venue: the pulled fetch's own product of the code and its maximum's reciprocal, which DeviceVertexConversion's recorded bound computes one f32 ulp high of Metal's quotient at 126 of the 256 unsigned codes (127 reads 0x3efeff00 where Metal reads 0x3efefeff). - attribute-format-fetches, the half and RG11B10 formats, on llvmpipe: the device's widening keeps a NaN's payload (0x7fc02000, 0x7ffe0000) where Metal reads 0x7fc00000, under DeviceNanEncoding. Each GPU's rows follow from its own replay. clippy refused StageInKind::IndexedStepRate's doc, whose second line began "1. ", a list item (doc_lazy_continuation, the same job); it is reworded. |
||
|
|
a916e61185 |
Runtime: a kernel's [[stage_in]] is fetched; the three forms not built are Gap::StageIn by kind
A compute pipeline state whose kernel reads [[stage_in]] attributes was refused at its creation as Gap::KernelInput of KernelInputKind::StageIn, which a guest met (a descriptor-form compute state, the app's context closed right after). The translator already fetches every attribute in the shader from the buffer slot at its layout's bufferIndex, through that slot's pushed address, by the stage-in and dispatch regions the encoder already pushes. Two things stood in the way, both in the runtime: - interface() refused any kernel whose PipelineInterface::stage_in is non-empty. The line goes. - The thread-position fetch's reach check reads SpecKey::StageInReach, which the runtime's constant loop refused as a specialization it does not set. The runtime now leaves it at the module's default (true): one pipeline, the check kept for every dispatch. What stays refused is a typed refusal naming its own form, Gap::StageIn of a new StageInKind: - IndirectRegion: setStageInRegionWithIndirectBuffer:indirectBufferOffset:, now the method ComputeCommandEncoder::set_stage_in_region_with_indirect_buffer, which always refuses (the conformance rt side calls it in place of its own Unavailable); - DynamicStride: an attribute the kernel reads through a thread-position layout of MTLBufferLayoutStrideDynamic (the compute encoder has no attributeStride setter), at the state's creation, before the translator's IdentityDomains refusal of StageInStride; - IndexedStepRate: an attribute it reads through an indexed step at a step rate past 1, at the state's creation. Both creation checks read the descriptor narrowed to the attributes the kernel reads (kernel_inputs_read), so an attribute it never reads, and a constant step of a dynamic layout, refuse nothing. KernelInputKind::StageIn is deleted. Consumer search: `git grep -n 'KernelInputKind'` in the reims-vgpu checkout at c8201ec2ba: 0 hits (nor any for `StageIn` as a refusal kind). Tests: the device test every_device_fetches_stage_in_by_each_step_function dispatches engine/kernel_stage_in's stage_in_fetch under ThreadPositionInGridX at rates 1 and 2, ThreadPositionInGridXIndexed and Constant, and checks every thread's four attributes (threads past the region read its last element); without the change the state is Gap::KernelInput. every_device_refuses_each_unbuilt_stage_in_form_by_its_kind holds the three kinds and the two states that are made. kernel_input's refusal test of StageIn goes; lowered and the harness's gap test take Slot. The conformance case stage-in-region-clamps carries on past a refused row (probe, as attribute_formats does), so its 27 other rows compare where the indirect one is refused. The ledger drops the 82 rows of the old refusal (stage-in-region-clamps 1, attribute-format-fetches 29, attribute-format-class-crossings 16, stage-in-unread-attributes 36), takes the indirect row's new refusal, and the four compute attribute-stride rows' DynamicStride refusal. The validation requirement KernelStageInput stays: the engine's run through the runtime passes no stage-input descriptor or region. README, REFUSALS.md, METAL-COVERAGE.md, CONFORMANCE-COVERAGE.md and the signatures table regenerated. |
||
|
|
59481e60bd |
Runtime: a cut command buffer whose next piece waits for an event holds no other queue
What: block_shared counts a cut command buffer at its queue's head as a holder only while its
next segment is ready (its waits met). A command buffer of another queue that shares with it is
held while that piece could go, and goes where the piece waits for an event not yet met. The
README's queue section states the one rule this and the stale-picture fix keep: "Across queues,
work goes to the device in any order, except that a command buffer never goes ahead of an
earlier-committed one it shares a tracked resource or a fence with, and an event wait holds
only its own queue." Its two sentences on the hold and Metrics::shared_holds say the rest.
Why: the hold was a cycle. A queue held behind a cut command buffer it shares a buffer with is
skipped by next_ready (submit.rs:1629) and wants nothing (:1741), and the cut command buffer's
piece after encodeWaitForEvent is not ready until that event's value is reached. Where the
value comes from the held queue, from a command buffer behind it, or from the host after a wait
on it, nothing moves again: no refusal, no loss, the command buffer never completes. Metal's
wait stops only its own queue, and runs the other queue's command buffer beside it. An update
of a fence held so is not waited for in Metal either (crate::fence, probe
cross_queue_fence_held_update.m).
Verified:
- The test every_device_runs_the_signaller_of_a_cut_command_buffers_wait_though_it_shares
(queue A: two pieces, then a wait for E, then a fill; queue B: a copy from A's buffer, then
the signal of E) fails without the fix on lavapipe: m3-max-68633 at
|
||
|
|
f268d3ca07 |
Tests: the signaller of a cut command buffer's wait runs though it shares a buffer with it
What: one device test. Queue A commits a command buffer of two pieces, then an event wait, then a fill; queue B commits a copy from its buffer, then the signal that wait needs. Metal runs B's beside A's, its signal meets the wait, and both complete. Where B's has not completed in ten seconds the host signals the event, so the case fails instead of stalling the device. Why: block_shared holds B's queue behind every piece of the cut command buffer it shares with, and next_ready skips a held queue, while the cut one's piece after the wait is not ready until B's signal: a cycle, with no refusal and no loss. Verified: pending (a lavapipe job). |
||
|
|
f53ddc5917 |
Runtime README: what each live import costs a submission, by driver
Every imported or exportable allocation is handed to the kernel with every vkQueueSubmit2 on RADV, used or not; the runtime's pooled blocks are not. The new paragraph under Imported blocks gives the measured cost of the call with 450 idle 1 MiB imports beside a recorded play: - Radeon 780M (RADV, Mesa 26.2.6), job m3-max-68519: 20.6 us with none, 243.1 us as dma-bufs, 1,458.5 us as host pointers; - a second Radeon 780M, job m3-max-68535: 48.8, 273.7 and 1,583.0 us; - RTX 2080 (NVIDIA 620.70.06), job m3-max-68535: 24.9 us with none, 27.5 us with 451 host-pointer imports; its dma-bufs are refused by the dma-buf rule. So about 0.5 us a dma-buf and 3.2 to 3.4 us a 1 MiB host pointer a submission on RADV, nearly all kernel time, flat on NVIDIA. ANV on i915 lists every allocation (read from Mesa's source, not measured). Not measured: the RX 7900 XTX, the Iris Xe, other import sizes. Verified: cargo fmt; the figures are the probe rows of lane submitcpu (steelbrain/submitcpu-probe, never landed). |
||
|
|
600b38fda7 |
Runtime: a piece's kernel copies empty before the states that hold them release
The copies the pieces hold with no count live in the same kept objects as the counted states they are of, and are emptied, and dropped, before those states: every read of a copy (the rate update at retire) goes through that list, so a read after the release finds an empty list and sets no rate, which the pieces tests that assert a run sets its kernel's rate would report. Verified: cargo fmt only. |
||
|
|
eaba828dcd |
Runtime: a piece names its kernels without a count or an allocation of its own
WIP for the planner's fix 2, to be measured: the piece's kernels go in a list the command buffer's kept objects hold (capacity kept for the queue's next recording, within KEPT_BOUND), each its content taken with no count (Uncount), since the command buffer keeps the state it bound until it retires, after the rate update. Verified: cargo fmt only. |
||
|
|
2ec8680181 |
Tests: the rate-behind test shows the short command buffer went while the long one was on the device
The test committed the short command buffer while the long one had not completed, but did not show the two overlapped on the device. It now waits until the short one's submission is seen, reads the host clock, and asserts that this time is before the long one's GPU end and that the short one ends after it, so the short one sat behind the long one on the VkQueue. It prints how long before that end the submission went. Verified: cargo fmt; the device runs are jobs that follow. |
||
|
|
62183f55af |
Runtime: a command buffer of one piece writes no timestamps past its own two
The cut's piece pairs cost a pair of timestamps on every command buffer, cut or
not: a take from the pools, two writes, and at retire a readback, a reset and a
give-back. The cause probe (A =
|
||
|
|
cd7716adb0 |
Runtime README: a stage fill's memory follows the threadgroup size; one kernel refused at 1,024 on the Iris Xe
What: one paragraph in Kernels past the stage bound. A fill's memory follows the threadgroup size its pipeline is made at; on the Iris Xe of RPL-P one emulated module of weight 46,491 took 794 MiB at 1 thread a threadgroup, 2,630 MiB at 32 and passed the 3,072 MiB cap at 1,024, where the pipeline is refused. Why: an open gap a guest can meet (the planner ranks it a bug: an app that fills the threadgroup is the ordinary Metal pattern), recorded where a reader of the runtime meets it. A probe of a form that removes it is under way; this line changes with it. Verified: m3-max-68473 (Iris Xe, Mesa 26.2.6; the same words, SHA-256 d5a653c7, in every arm, only the workgroup-size specialization differing; A B C A B C from empty caches: 794/792 MiB, 2,630/2,630 MiB, killed at 3,108/3,250 MiB after 46.1/46.3 s; the peak is the helper process's VmHWM and VmRSS sampled every 20 ms). Docs only. |
||
|
|
e78626ce6d |
Runtime README: the pitch copies' counts on a recorded compute play, their cost unresolved
What: the known gap of textures over a buffer whose pitch the device's linear image does not meet gains one measured row: 80 textures of 2448x3264 RGBA8 at 9,984 bytes a row against the RTX 5080 Laptop's linear row of 9,856 took 206 copies of 3,835,938,720 bytes in three frames (95.2% of that play's pitch-copy bytes), and their cost on those frames was not resolved. Why: bug row 68 closes as a known gap (planner 11-22). The A B A B play against a probe that skips every Pitch copy read means under 5% (GPU busy +0.86%, wall +2.16%) with the two pairs of opposite sign, so the line states the counts and that the cost was not resolved, not a cost. Verified: m3-max-68398 (RTX 5080 Laptop, NVIDIA 615.71.09, the stream played in full, 1115 frames an arm, 0 refused; the probe's pitch counters read 0 and its skip printed 120 lines an arm); probe branch steelbrain/pitchcost-probe, never lands. Docs only. |
||
|
|
855eb86147 |
Runtime README: a chain's links past the device's room go as earlier ones complete
The queue section said a signalling command buffer is staged once its queue has room; the room is the device's. Of a chain of command buffers each waiting for the one before it's signal, the links past the device's room go as earlier ones complete (the shared event chain test holds three links, IN_FLIGHT, all scheduled before the first runs). Docs only. |
||
|
|
75773059e7 |
Tests: three barrier and instruction counts take their kernels' rates as the test's input
On lavapipe the measured rates cut these tests' command buffers into pieces, each cut ending a segment with its barrier and its CPU work (job m3-max-68387): - compute every_device_places_barriers_at_hazards_only: independent 2 barriers against 1; - compute every_device_counts_no_instructions_for_a_stage_in_region_a_kernel_does_not_read: 37,422 instructions a dispatch against 39,033 under a region, the arms cut differently; - surface every_device_carries_each_form_of_surface: the ordered pair 2 barriers against the control's 2 (its control cut too), where one more is asserted. Each sets its kernels' rates to 1 ps a threadgroup before the counted command buffer, so the dispatches share one piece and the counts are the test's own. No assertion changes. |
||
|
|
c9c53b85cf |
Runtime: the completion thread waits for a piece that carries nothing to retire; three tests at the device's room
A cut command buffer's pieces before its last are submissions with no command buffer, upload or copy-in to retire, so the completion thread, which waits only for what it retires, never saw them complete: the device's room stayed taken and a command buffer of more pieces than the room holds never went on (every pieces test and every test with a command buffer cut into four or more pieces timed out on lavapipe, the RX 7900 XTX and the Iris Xe: jobs m3-max-68356, m3-max-68359, m3-max-68360). Done::submitted now keeps a marker (Item::Piece) for a submission that carries nothing else, so its completion raises the completed value and wakes the submit thread. Forced by the failing tests: +14 product lines (complete.rs). Tests: - private_arena's barrier helper sets each kernel's rate to 1 ps a threadgroup first, the test's own input, so its dispatches share one piece and the barriers counted are the dispatches' own (its first command buffer with the arena kernel, of unknown rate, was cut twice, two end barriers more: 4 against 2 on the XTX and the Iris). Its assertions are unchanged. - every_device_submits_a_shared_event_chain_across_two_queues_before_its_first_link_runs: an "at once" become "when the device has room". Old: five links on two queues, each queue having room for its own, all Scheduled before the first runs. New: three links (IN_FLIGHT), the device's room, all Scheduled before the first runs; a fourth would be held for room and a fifth for the fourth's signal. The completion order and the words assertions are unchanged. - every_device_schedules_a_wait_for_an_event_s_value_as_it_is_submitted: each queue's expected run is set to 1 ms, the test's own input, so the device has room for the signaller, the waiter and the next at once; with runs unknown the device takes two. Its assertions are unchanged. |
||
|
|
544f21b48f |
Tests: ten piece tests; the README's queue section on pieces and the device's room; two expectations at the device's room
The pieces tests (src/tests/pieces.rs), each on every device of the cfg's kind, a kernel's rate the test's own input:
1. six dispatches at 3 ms a threadgroup are six pieces (five cuts, six submissions), at 1.5 ms three;
2. another queue's fill goes between two pieces, counted once in Metrics::pieces_passed;
3. another queue's read of what a cut command buffer writes goes after its last piece, held once
(Metrics::shared_holds), and reads every step;
4. the queue's own next command buffer reads every step of its cut one;
5. a fence wait on another queue goes after the last piece of the update, held once;
6. three dispatches of a kernel of unknown rate and one of another are two pieces, each piece's
run sets its kernel's rate, and a dispatch past the bound is not cut (a second after it is);
7. a blit encoder after a piece past the bound cuts, one after a piece within it does not;
8. a cut command buffer is scheduled, its handler run, with two of four pieces submitted;
9. an abandon keeps a scheduled cut command buffer: every piece runs;
10. the Iris shape: five queues each submitted once and hold a backlog of two cut command buffers
of four pieces, the device takes two pieces, and a sixth queue, idle, commits a fill: the
pieces submitted ahead of it are counted and asserted to be 2.
Two expectations change with the device's room, each an "at once" become "when the device has room":
- command.rs every_device_submits_a_write_on_an_idle_queue_before_another_queues_later_read. Old: the
writer submitted at once (submissions > before), then the reader (> before + 1), while the busy
queue's three are in flight. New: each held in a group for the device's room, nothing in flight
(in_flight (0, true) for both), the writer going first by commit order. The order assertion, the
read sees the write, is unchanged.
- fence.rs, renamed every_device_runs_a_wait_on_a_fence_never_updated_at_once to
every_device_runs_a_wait_on_a_fence_never_updated_when_the_device_has_room. Old: after the wait's
commit (all, b_sent, a_sent, a_held, alone, own, rounds) = (1, 1, 0, true, 0, 0, 0). New:
(all, b_sent, b_held, a_sent, a_held, alone, own, rounds) = (0, 0, true, 0, true, 0, 0, 0): B's
group waits for the device's room behind A's three busy submissions. The third queue's empty
wait still completes at once, and the wait completes once the busy work opens.
No order assertion is weakened.
Docs: the runtime README's "Queues, command buffers and events" states the device's room at 4 ms,
the rank (the queue that waited longest; an idle queue's commit first; a backlog waits for as
long as other queues that commit only when idle keep the room taken, Metal promising no order
between queues, with no aging rule), the pieces and their cut points, the shared-resource rule
and the GPU times of a cut command buffer. Its known gaps: what the pieces do not cut (a dispatch
past 4 ms, a render pass, a kernel not yet measured, a piece that writes a Managed buffer or owes
copies over a texture), and the conservative shared rule, against the 5300M (job m3-max-68137)
and the UHD 630 (job m3-max-68129); the job-timeout gap now says the cut is only between
dispatches and encoders. Metrics::cuts and the CommandBuffer type doc state the same-kernel rule.
refusal_surface.py --check passes.
|
||
|
|
f997dfa7d3 |
Runtime: a queue's turn for the device's room is 0 only from a commit that finds it idle
The rank put every queue with nothing in flight at turn 0, ties by commit order. In the shape of five queues with backlogs of cut command buffers and the device holding two pieces, at least three of the five have nothing in flight at any moment and their command buffers were committed earlier, so a sixth queue's commit waited for every command buffer committed before it: first-come order. A queue now takes turn 0 only at a commit that finds it with nothing queued and nothing in flight; otherwise its turn is its last submission. The rank is (turn, commit order). A backlog whose last piece just completed keeps its last submission's turn and outranks no queue idle longer. |
||
|
|
9adc440ec6 |
Runtime: the dispatches of one kernel of unknown rate share its piece; room's rank holds per-queue values only
A dispatch of a kernel whose rate is unknown begins a new piece unless the piece holds dispatches of that kernel alone, so a new kernel's first command buffer is one piece whose run sets its rate. A queue's in-flight list keeps its progress values only: the room is the device's. The device tests read the order of submissions by queue and set a kernel's rate. |
||
|
|
929718d58f |
Tests: the group bound host test at the 4 ms bound; api_signatures: the three piece Metrics
Metrics gains cuts, pieces_passed and shared_holds (fields added; a consumer that builds Metrics with a struct literal breaks, as for every new counter). |
||
|
|
56cdcb7075 |
Runtime: a command buffer's compute work goes in pieces of 4 ms, and the device's room goes to the queue that waited longest
What: each command buffer's compute work is cut into pieces before a dispatch that would take the piece's expected GPU run past GROUP_RUN (now 4 ms, was 16 ms), and where a compute or blit encoder opens after a full piece; never inside or before a render pass. A dispatch's expected run is its kernel's rate (picoseconds per threadgroup, on the kernel's compiled content, shared by its states) times its threadgroups; a kernel with no rate yet goes in a piece of its own, and an indirect dispatch counts as one threadgroup and feeds no rate. Each piece is timed by its own pair of timestamps, from its first dispatch to its end, and that run alone feeds the rates (never the command buffer's span, which holds the runs of what passed between its pieces). Each piece is a submission of its own and waits for room. Room is the device's: room() over the device's submissions not seen complete, and among the queues that want room the one that last submitted earliest takes it, so a passed piece goes before the passer's queue's next. A command buffer of another queue committed after a cut one passes its pieces unless it holds a buffer or texture the cut one holds (by tracked id), waits on a fence it updates, or either reaches memory outside its resources: then it is held behind every piece. A cut command buffer whose later pieces wait for no event is scheduled as its first piece is staged. The rate is scheduling data of the same kind as a queue's measured expected run (QueueInner::expected_run, next_run): it bounds where a piece ends and never chooses between two forms of the work (rule 4's "no calibration"). Why: on the Iris Xe the guest's screen-frame writers waited behind a background service's running command buffer: 96.2 of 112.3 ms of each late writer's wait. The Mac runs a second queue's command buffer beside a running one (Radeon Pro 5300M at any priority, job m3-max-68137; UHD 630 where the number is lower, m3-max-68129). Verified: compile job pending (this commit carries no tests yet). |
||
|
|
9c03db5a4a |
Runtime README: the UHD 630 arena line says the cause is not found
The line said the cause ranks as the driver's. Nothing shows that: there is no standalone repro, one tree failed 2 of 31 alone and another 0 of 31, and the read-checking probe was clean in 5 runs (m3-max-68367). The line now states what was seen and that the cause is not found. Docs only. |
||
|
|
1533969b9a |
Runtime README: the UHD 630's Windows driver can return wrong words from a long arena dispatch
What: one known gap under the queues' known gaps. On the Intel UHD 630 under Windows (driver
101.2145), a kernel whose thread memory is in the private arena can return 1 or 2 wrong results in
512 from one long dispatch of its whole grid, intermittently.
Why: the arena test's wrong words on that card are an old intermittent of the driver, not a
regression of ours. The older build fails as often or more (2 of 31 alone at
|
||
|
|
f979769faf |
Bless at 9da0f0a63b: golden hashes under SEMANTICS 2275 and the authored compile census
The pin's one bless, for the changes since the last bless: row 205's stage bound (SEMANTICS 2273 -> 2274, |
||
|
|
9da0f0a63b |
Matrix: a subgroup multiply-add's loop of step pairs asks the driver nothing about unrolling
The loop |
||
|
|
a1ca99880a |
Stage bound: a subgroup instruction weighs 64, the re-plan takes the lighter module, and a subgroup multiply-add's steps are one loop of paired shuffles
What:
- spirv::roll::bound_weight beside entry_weight: entry_weight with each subgroup instruction
(OpGroupNonUniform*) counted as SUBGROUP_WEIGHT, 64. Only the stage bound reads it
(stage_bound::emit); the roll keeps entry_weight as its trigger. ModuleStats::entry_weight
carries it, so the runtime's in-process or helper choice reads it.
- The re-plan holds both plans and compares them. A kernel past the bound only as the widest pin's
emulation is planned again keeping the pin: the re-plan takes the pinned module where it weighs
less than the emulated one by the stage weight; otherwise the emulated one goes on. The other
plan and module are dropped and their ledger share released.
- tile_mad on a subgroup tier: one vec2 shuffle carries a step's two b cells, one the a cells of
steps 2m and 2m + 1 (one owner lane: owner_bits keeps bit 0 of k out of the a owner), and the
dim / 2 step pairs are a DontUnroll loop, the sums in Function variables. Each step reads the
same cells and accumulates in the same Fma order. The emulated tier is unchanged.
- SEMANTICS_VERSION 2273 -> 2274.
Why: a driver's compile grows with a subgroup instruction far faster than with any other. A
kernel of entry weight 24,814 holding 3,772 subgroup instructions passed 6 GiB compiling on an
RTX 3090 (NVIDIA 620.70.06; job m3-max-67936), where the bound's 39,014 kernel grew 148 MiB. Under
the term it leaves the process; with the cut its module (22,238 instructions, 644 subgroup
instructions, bound weight 62,810) filled in the helper at 2,699 MiB of the consumer's 3,072 MiB
cap in 59 s (m3-max-67936): a thin margin. On the Iris Xe of RPL-P its pinned module, which the
re-plan took whatever it weighed, met the helper's memory (killed at 6,144 MiB, m3-max-67973);
now the emulated module (46,491, no subgroup instruction) goes on, against the pinned one's 56,163
with the cut, and filled at 792 MiB in 18.8 s (m3-max-67863).
Verified:
- Census, states-only (each play's MODE line read): the nine standard streams on the RTX 3090's
and the Iris Xe's profiles (m3-max-68045, 68047, 68087, 68100, 68101, 68132): 259 distinct
kernel modules a card, none holding a subgroup instruction, no re-plan, and no pass, render
stages included, that holds one; a recorded pass on the RX 7900 XTX (m3-max-68146): 819
compute states, none. The weigh tables of four staged kernels and a 63-kernel library on both
profiles, no driver compile (m3-max-68033, 68034): on the RTX 3090 two kernels cross, that of
24,814 and one of 7,470 (615 subgroup instructions, 46,215), which fills in the helper at
1,011 MiB (m3-max-67690); on the Iris Xe only the kernel of 24,814 re-plans. The library's ten
kernels past the bound today hold no subgroup instruction.
- Bit-equal and run time: the owned stage-bound fixture (512 multiply-adds a simdgroup, compiled
by Apple's metal) through the harness, before (development
|
||
|
|
10f83b636d |
Re-derive the generated documents at the landing tip
They are generated from the whole case set, and the set grew on `development` while this branch was in flight, so the copy committed here counted a smaller one. Verified: regenerating at this tip leaves no change beyond the `Generated at` stamp. |
||
|
|
a7dd2e846e |
Translator: the binder's plan goes, with everything only it reaches, and the TexelRows and YCbCrInPlace forms
The runtime never made a plan (it binds each draw and dispatch by the pipeline's interface), and since the census digests each pipeline's content alone (two commits back) nothing in the tree calls one. What only the plan reached goes with it: - bind: BindState, BindShape and their shapes, BindingPlan and its instantiation (DispatchCommands, DrawCommands, push, descriptor and root-table templates and writes), plan.rs and plan/ (compute, resources, slots), instantiate.rs, resident.rs, the neutral resources' plan side, the heap's member planning and table bytes, the mesh arguments pass (MeshArguments, MeshArgumentsForm, fold_object_grid, metal_object_grid), ExecutionStatus and StatusBits as public items, TextureShape::Buffer, IndirectRef with the four indirect call variants (Dispatch::ThreadgroupsIndirect, DrawCall::Indirect, PatchesIndirect, MeshThreadgroupsIndirect) and IndexBufferRef::fetch_end. Dispatch, DrawCall and IndexBufferRef stay: validation states its cases' calls with them. - error::BindError leaves the public surface; a crate-private BindError of three variants stays as the error of the heap's view derivation, which lower::texture::slot's storage-read check reads (bind::heap::tier_read_gaps). That check keeps only the storage view's format: the sampled-view branch and ImageViewDesc were reached by the plan alone. - vk::DrawCommand, the plan's draw output. - pipeline: ComputePipeline::plan, RenderPipeline::plan; cache: VariantKey::covers and large_buffer_form. - The TexelRows form (bind::texel_rows, LoweringInputs::texel_rows, RuntimeFact and PushField TexelRows) and the YCbCrInPlace form (bind::ycbcr_in_place, lower/sampler/in_place.rs, LoweringInputs::ycbcr_in_place and ycbcr_planes_sampled, RuntimeFact and PushField YCbCrInPlace, PrecisionNote FloatSampleFilter and HalfSampleFilter, Routine::Quad). Only the binder set those inputs. - The tests of the deleted items, and the plan halves of mixed tests. Of 6810 tests (`#[test]` functions in the workspace) 309 leave and 11 come in their place: the lowering halves of mixed tests, kept without the plan (the heap layout, the stage-in stride and region facts, the emulated-simdgroup and bicubic facts, the iris-xe storage classes), and the kept tests of the two renamed files. 50 others are edited to drop a plan half or a deleted item (the api_surface round trips; the simd_emulated, extended-range, recursion, dynamic-root, handles, heap-storage-read and mesh lowering cases). 6512 remain. engine_graphics_binder.rs and engine_heap_binder.rs keep one and two tests and are renamed engine_unattached_colors.rs and engine_heap_groups.rs. - The runtime guard test's list of files the runtime inputs reach without being inputs drops the seven no input reaches since the cut: cache/digest.rs, lower/simd/divergent.rs, lower/simd/workgroup.rs, pipeline/artifact.rs, pipeline/layout.rs, pipeline/stage_io.rs and pipeline/vertex.rs; three of its reasons that named the plan or the binder say what reaches the file now. 559 public items leave (api_signatures.tsv: 55 structs, 26 enums, 140 variants, 245 fields, 52 methods, 24 associated constants, 7 constants, 5 functions, 5 impls). Consumer search, the consumer's development at 92ffbed817, `git grep -w NAME` of each of the 112 removed names: 0 hits for 105; the others are the consumer's own items: TessellationFactors 4 (its Bound::TessellationFactors), YCbCrMatrix 3 (its own string and doc), texel_rows 2 (its own fn), ThreadgroupsIndirect 6 (its own Dispatch enums and rt::Dispatch::Indirect), DrawIndexed 1 (a doc naming MTLIndirectCommandType values), covers 109 and plan 105 (generic words; the `.covers(` calls are its Extent's, the `.plan(` calls its video encoder's rate.plan). Its one import of metal2vulkan::bind is the argument-buffer layout types, which stay. The forms' audit. A texture over a buffer: the runtime's tests::over::every_device_holds_a_texture_over_a_buffer_in_place. A two-plane YCbCr sample: no runtime test; the runtime makes no texture of a two-plane YCbCr format (Gap::TextureFormat, the runtime README's "A format is made where the translator's format table maps it" row), the conformance cases ycbcr_gathers and ycbcr_textures record Metal's answers, and known-gaps-rt.tsv lists the runtime's refusals (ycbcr-gathers-*, ycbcr-texel-reads-420v). Versions: - RUNTIME_VERSION 2550: it covers plan instantiation and the binder's run-time data. Nothing calls those since step 2: the runtime never used the binder, and the own-context executor is gone. A run of an unchanged artifact does nothing different, so the guard hash (runtime-sources.sha256) moves alone, and the RUNTIME_VERSION doc is rewritten to name what it still covers. - SEMANTICS_VERSION 2273: no output changes for any input that still exists. The TexelRows and YCbCrInPlace forms, their facts, push fields and the two notes were reachable only through LoweringInputs::ycbcr_in_place, ycbcr_planes_sampled and texel_rows. Only the binder set those; the runtime sets none. The function key appended each of them only when set, so every surviving key hashes the same bytes. Two type declarations stay where they were, so module words do not move: bool in the bicubic types, uvec4 in the bicubic routines. Byte-identical modules are expected, not verified here; the 252-row hash probe is the check. - ARTIFACT_FORMAT_VERSION 591: the codec tags enum variants by name. The removed RuntimeFact, PushField and PrecisionNote variants leave their tags unused, which cache/mod.rs's rule says needs no bump: an old entry holding one fails to decode, which is a miss. No codec_struct field is removed. That is why SamplerDesc.ycbcr stays. The guard hash (crates/metal2vulkan-validation/runtime-sources.sha256) moves for the bind/ sources this deletes and edits and for vk/draw.rs, which leaves its list. No run of an unchanged artifact changes: what stays in bind/ computes what it did (the heap's tier check takes the same storage format; its removed sampled branch had no caller). Docs: docs/API.md (section 5 is the interface; the binding and plan sections go), README.md, docs/ARCHITECTURE.md, docs/HOWTO.md, docs/VALIDATION.md, the runtime README's DrawInput and identity-domain rows, docs/REFUSALS.md (regenerated; the binder's section goes), api_reference.md, api_signatures.tsv (blessed: removals only), tests/api_surface.rs, the signatures floor (5000), the bind modules' own docs, and the public field docs of PushField, RuntimeFact and SpecKey that named BindState, BindShape or BindingPlan. AGENTS.md: the project table names pipelines and their interfaces, not binding plans; its "core lives in" line stays true (bind/ still holds what the lowering reads). Verified on 31692939d4, this commit's tree (steelbrain/cutbinder-probe-6): job m3-max-68107, fmt, signatures, refusal surface, clippy -D warnings (workspace plain, --cfg m2v_gpu, --cfg m2v_cpu_icd; the translator with no feature and with each alone; the AIR crate alone), workspace Rustdoc -D warnings, each crate's private intra-doc links at 0, api-docs; job m3-max-68109, the product, validation and conformance suites, doctests, and on lavapipe the validation and runtime suites under --cfg m2v_cpu_icd, the conformance replay and the public cases' qualification. |
||
|
|
6938e0dfc6 |
Validation: the device-only kernel helpers move beside the device tests, and a run's status assertion goes
With the plan tests gone, only the deleted plan tests used the device tests' kernel helpers (the shared header, counting_kernel, assemble, buffer_table_kernel) in the plain build. They move into candidate/tests/engine_compute.rs, which the device cfgs compile, and engine_render.rs takes counting_kernel from there. engine_compute.rs's runtime test asserted ComputeRun::status, which the previous commit removed; it asserts the module digest alone. Verified by the cut's check job, which the translator deletion's commit names. |
||
|
|
fd5fcca9b0 |
Validation: the census digests each pipeline's content, and the executor's binder terms go
The authored compile census recorded, for each case, the content digest of its compiled pipeline together with the plan the binder made for the case's bind shape (or that plan's refusal). The runtime makes no plan, so the record now digests the content digest alone (`CaseArtifact::record`, digest label v2), and `case_compile` takes no device. The executor ABI moves to vulkan-engine-v213, so every census row re-records. With the plan gone, nothing reaches the executor's binder terms, and they go: - engine.rs: `bind_state`, `compute_shape`, `lengths_classed`, `texture_tokens`, `synthetic_used_addresses`, `BufferAddress`, and `ComputeRun::status` (always `None` on the runtime route; nothing read it); - graphics.rs: `bind_state`, `stage_table`, `render_shape`, `texture_tokens`, `synthetic_address`, `synthetic_used_addresses`, `BUFFER_SLOTS` and the three per-stage argument-buffer iterators; - mesh.rs: `mesh_shape`; - argument_buffers.rs: `resource_id`, `sampler_id`, `sampler_ids`, `argument_samplers`, `texture_tokens`, `field_words`, `used_buffer`, `used_texture`, `synthetic_addresses` (the runtime route writes the runtime's own addresses and IDs through `owner_bytes`, which stays); - resources.rs: `bound_texture`, `texture_facts`, `texel_buffer_length`, `bound_sampler`; - variants.rs: the bound-shape module; engine/public_cases.rs, the public cases planned on committed profiles. Tests: the mapping halves of the mixed tests stay (render, tessellation, slice-choosing, argument-buffer members, the owner's bytes); their bind-state, shape and plan halves go with the plan tests (the stencil-export, framebuffer-fetch, tessellation, owned-render and public render plan tests, the device buffer array's table, and the executor-state plan). One check leaves with `field_words`: it refused a texture and a sampler authored at the same field; the runtime route's word map does not. Verified with the cut's last commit, which names its check jobs; not built alone. |
||
|
|
25387588ea |
AGENTS.md rule 2: the list's "and" moves to its ninth item, the push window
The push window's clause made the list end "..., and run-time texel offsets (...), and the push window (...)". The first "and" goes, so the nine items read as one list. The planner ruled it inside the edit the owner's word (Telegram 2686, option B) covers; no meaning changes and nothing else in the owner's rules moves. Nothing in the tree parses this wording (one_path.rs names the rule only in a message). |
||
|
|
d9077dfa0d |
Push window: each device's maxPushConstantsSize sizes it, up to 256 bytes (rule 2's ninth form)
What: the push window is one value per device, `DeviceProfile::push_window`, the description's
maxPushConstantsSize up to 256 bytes, decided in the profile `Device::from_queries` derives
(device/profile.rs:115). Every window reads it: push placement (`lower::push::window`, `place`,
`spills` and `check_floor` take its bytes; lower/select.rs, lower/access/mod.rs and
lower/access/table.rs pass it), and in the runtime the one pipeline layout's push range
(device.rs:688), the kernel and render pipelines' push checks (pipeline.rs:2119, render.rs:1043)
and the encoder's push bound (encoder.rs:1759). With W that value, a kernel pushes in [0, W), a
vertex function in [base, W - 8) and a fragment function in [base, W); object and mesh functions
keep 0..32 and 32..64. A stage's fields past its window spill to its parameter block, whose
address the window holds, as they did past 256. `from_queries` refuses a maxPushConstantsSize
below 128, Vulkan's least, only (`Unsupported{PushWindow}`, required 128), and the runtime's
floor no longer lists maxPushConstantsSize (floor.rs: its row and PUSH_CONSTANT_BYTES go; the
layout's range was a constant 256). There is no constant 128 path, no switch and no environment
gate: the limit query is the only input. Ported from the held branch steelbrain/amdfloor-window
(d6880ca16b) onto today's development, every line reference confirmed against this tree.
Why: the owner's word choosing option B. A device reporting 128 bytes was refused by the floor;
it now runs with a window of 128.
AGENTS.md rule 2 takes the owner's authorized text: "for eight only" becomes "for nine only",
and the push window joins the list after run-time texel offsets.
Known gap (runtime README, Known gaps of indirect command buffers): in a window of 128 bytes a
command reaches 9 vertex slots, and 8 where the vertex function spills, against 25 and 24 at 256
((W - 8 - 16 - 28) / 8; from code: lower::push's
an_indirect_draw_s_vertex_function_pushes_25_or_9_slot_words). A kernel pushes 8 buffer
addresses beside its dispatch region at 128 bytes against 24 at 256, the rest from its ring.
Caches: a device of 128 and one of 256 share no cached artifact and no pipeline. The profile's
fingerprint hashes every ProfileFields field by Debug (device/profile.rs:312, :327), the limits
included (:346, maxPushConstantsSize at :625); `function_key` hashes the fingerprint
(pipeline/compile/key.rs:182, :189; passed at pipeline/compile.rs:2973), as does
`queried_render_descriptor_key` (key.rs:546); a cached artifact or pipeline loads only under an
equal fingerprint (cache/artifacts.rs:71, :204, :238; cache/envelope.rs:142); and the runtime's
enables digest, which the stage keys check, hashes it (metal2vulkan-runtime/src/device.rs:1533).
SEMANTICS_VERSION stays 2273: no module changes under an unchanged key. Every device
`from_queries` accepted before reports 256 bytes or more (it refused below 256), so its window is
256 as before and its modules are the same bytes; a device of fewer bytes was refused, so it
holds no artifact to go stale, and its modules are new under its own fingerprint. The golden
test at this tree found 0 cells changed under an unchanged key over the 15 committed profiles,
and 1855 under a changed profile fingerprint, runtime-floor's column alone (m3-max-68089; the rows
whose assembler Linux lacks are not observed there).
Golden table: runtime-floor.json and its generator drop the floor block's maxPushConstantsSize
of 256, so the profile reads Vulkan 1.3's least, 128, and its fingerprint moves. Its cells are
re-blessed on development (the bless needs macOS's assembler).
Validation: runtime-sources.sha256 is rewritten (d4a8dbf2...), since device/derive.rs and
device/profile.rs are runtime inputs the guard hashes.
Docs: the runtime README (the floor's limits note and table, compute Parameters, the render push
range, the indirect command buffers' known gaps), docs/API.md section 5 and the from_queries
paragraph, PushWindow's doc, reach.tsv and docs/REFUSALS.md (regenerated; the PushWindow row
only), the device profiles' README, and api_signatures.tsv (DeviceProfile::push_window). The
api_surface table is unchanged: no public type is added.
Tests: lower::push's placement at 256 and 128; from_queries (each committed profile's window is
its limit up to 256, runtime-floor's 128; 128 derives, 64 is refused with required 128); the
tessellation control range, the engine identity and spill tests in each profile's window; and
the runtime's push_window, patch and indirect token tests in two arms each, the device's own
limit and the limit held at 128 by the tests' device shim (tests/command.rs push_window_128,
DeviceOptions::described).
Verified:
- m3-max-68088 (this tree): fmt, the signatures table, the refusal surface, clippy -D warnings
plain, --cfg m2v_gpu and --cfg m2v_cpu_icd, workspace Rustdoc -D warnings: each exit 0. The
runtime suite on lavapipe (--cfg m2v_cpu_icd): 647 passed, 3 skipped. Its push lines read
"push_window: the push window is 256 bytes", "push_window_128: the push window is 128 bytes",
"window 128, 12 buffers: 3 ring writes and 3 pushes over 3 dispatches", "icb_tokens: ... the
push window 256 bytes, 25 slot words", "icb_tokens_128: ... the push window 128 bytes, 9 slot
words", and draw_patches_full_range at 256 and _128 at 128.
- m3-max-68089 (this tree): the core crates 3881 of 3882 passed, 24 skipped; the one failure
is the golden table, stale under runtime-floor's moved fingerprint (1855 cells, one per row
observed on Linux, 0 new, 0 gone, 0 under a changed source, 0 changed under an unchanged key).
Validation 1314 passed, 3 skipped. The translator's push tests print each committed profile's
window: runtime-floor 128, the vertex function ending at 120, 9 inputs; the 14 others 256.
- m3-max-68067: the whole runtime suite on lavapipe at an earlier tree of this change
(a98af765ad, before the rebase onto
|
||
|
|
951285e7a7 |
Runtime: a pipeline state answers before the driver's create of its main pipeline, which finish_pipeline makes
What: new_compute_pipeline_state and new_render_pipeline_state now do everything up to the
driver's create of the state's main pipeline (every lowering, every refusal and Metal's own errors,
the shader modules, the samplers' numbering) and answer. The main pipeline is the one VkPipeline
whose key the descriptor holds: a tiling kernel's tiles', an image-only kernel's square
workgroups', an observing kernel's at its required size or declared bound where it takes no
threadgroup memory length; a render content's triangle or patch class, and the line or point class
its inputPrimitiveTopology names. ComputePipelineState::finish_pipeline and
RenderPipelineState::finish_pipeline, which have no Metal counterpart, make it on the calling
thread through the device's pipeline cache. A second call makes nothing. A dispatch or a draw
before it waits for the make in flight or makes the pipeline itself, a first-use wait
(first_use_unfinished_waits), and records what it records with the pipeline made: a state never
finished runs the same. A kernel past the stage bound still makes its main pipeline in the
creation, so StageUnfilled and StageSize reach the helper at the make. Render's main pipelines sit
in a new cell (render::Main); compute's use the kernel's variant cells, started as
VariantStart::Finish. Metrics: finished_pipelines, finished_pipeline_nanos, failed_finishes, and
first_use_unfinished_waits with its time and longest wait. The harness and the replay player call
finish_pipeline inside their make, so their make times and VkPipeline counts still hold the
driver's share.
No Metal answer moves: every answer getter reads values fixed before the driver's create. The
`made` bit of dispatch_variant, no answer of Metal's, reads false until a finish, a
prepare_dispatch call or a dispatch made the main pipeline; the key does not move.
A driver's create that fails after the answer is not kept: finish_pipeline returns Error::Vulkan
and counts failed_finishes, and the first dispatch or draw that needs the pipeline makes it again
and returns the Error::Vulkan if that fails too. That is a new known gap in the runtime README
("Known gaps of pipeline states"), where Metal fails the creation instead. docs/REFUSALS.md does
not change (no refusal moved; refusal_surface --check passes).
Why: on the consumer's first launch the guest waits on the runtime's pipeline creates, and the
driver's compile is most of a make. Answering first lets the consumer run that compile beside the
guest's own work.
Tests: translate.rs every_device_answers_a_state_before_its_main_pipeline_is_made and draw.rs
every_device_answers_a_render_state_before_its_main_pipeline_is_made check that no pipeline is
created at the answer, that every answer is equal before and after finish_pipeline, that the
finish makes the main pipeline once (VariantStart::Finish on compute), that a second finish and
the first use make nothing, and that a state never finished makes its pipeline at its first use,
a first-use wait. Without the form both are expected to fail at their first check, since the
creation made the main pipeline (not run against the old creation).
translate.rs every_device_makes_a_state_s_main_pipeline_once_across_its_finish_and_a_preparation
checks that a prepare_dispatch after the finish makes no second VkPipeline (pipelines_created
unchanged), that a finish after a preparation that made it makes nothing, and that the two called
at once on two threads make one pipeline between them, so a `made` read false costs no second
driver create. main_cells.rs (no device) checks a failed finish
that keeps nothing, then a draw that makes the pipeline again, and a draw during a finish that
waits for its make. The existing device tests' state helpers finish their states.
VariantStart gains a variant: 0 hits for VariantStart in the consumer's checkout at 92ffbed817.
Verified at tree
|
||
|
|
91fed9449c |
rt: the pipeline cache holds up to 128 MiB, so one guest's set on the Mac host's driver fits
What: PIPELINE_CACHE_BOUND goes from 32 MiB to 128 MiB, on every host. Nothing else about the cache changes: a cache past the bound when the reaper looks is still replaced by an empty one, the blob is the same single file per kind of device (at most four), written whole, and the counters are the same. Why: the owner's word, "Re 179, I'll take the 128mb cache". On KosmicKrisp (the Mac host's driver) a pipeline's cache data is about 140 KB against 3-25 KB on NVIDIA's, RADV's and ANV's drivers. One long recorded session's 448 pipelines write 62.6 MB there (m3-max-67847), and a guest boot's set reached 32.3 MB, so at 32 MiB the cache was replaced and a later launch made those pipelines again. With the bound at 32 MiB, re-making the 448 in one process took 1,669-2,370 ms after a replacement (m3-max-67741, m3-max-67789), against 80.4-81.0 ms with none (m3-max-67847). The cost, now stated in the runtime README: the blobs take up to 512 MiB of disk (four kinds of device at 128 MiB). On KosmicKrisp a full cache's seed holds about twice its data in host memory from device start: seeding from a 59.6 MiB blob raised the footprint by 119.3 MiB before any make (m3-max-67977), so about 256 MiB is expected at the bound there. Each write is the whole blob: a cold run with the bound lifted wrote 9 times, 271.9 MB, for a 62.6 MB blob (m3-max-68006). Docs: the bound's doc in cache.rs; DeviceOptions::pipeline_cache_dir and pipeline_cache_cap; Metrics::pipeline_caches_replaced and pipeline_cache_writes_skipped; Gauges::pipeline_cache_bytes; the runtime README's pipeline cache paragraph and its known gap for KosmicKrisp, reworded to 128 MiB with the measured pairs at 32 MiB kept. Test: the replacement test (tests/translate.rs) sets the bound to one byte under the cache's own size with Caches::set_bound, so it passes the bound whatever the constant is, and then restores PIPELINE_CACHE_BOUND. It needs no 128 MiB of pipelines and is unchanged. Verified: fmt, the refusal surface and the signatures table locally. The dev checks and an Iris states-only play (caches replaced and blob bytes) follow on development. |
||
|
|
6ec733421c |
Runtime: a kernel past the stage bound holds no VkShaderModule; each make of its pipelines makes its own and destroys it
A heavy kernel (past the stage bound, made only from its helper's cache data) kept the shader module its words made for the content's whole life, though only its VkPipelines' creates name it. A driver keeps a copy of the module's code for that life: on an RTX 3090 (NVIDIA 620.70.06, job m3-max-67862) destroying the module of kernel 16d856fc (7,966,928 bytes of words), its pipeline kept, gave back 7.6 MiB of heap, per heavy content, while the app runs. The kernel now holds one of two things (`Code`): a light kernel's shader module, made with it as before, or a heavy kernel's `Heavy`, its words. `stage::made` makes a shader module of those words only once the pipeline's entry holds data, creates the pipeline through the entry's cache and that module, and destroys both once the create returns (Vulkan: "A shader module can be destroyed while pipelines created using its shaders are still in use"). A make refused unfilled makes no module. Two makes of one kernel's variants at once each make their own, since make_pending lets go of the variants' lock before it creates; a module-less create needs maintenance5 or graphicsPipelineLibrary, neither on the floor. `release` frees a module only for a light kernel. The words stay held (dropping them is a later step), and nothing else changes: the same stage keys, entries, requests and wire. Docs: the runtime README's "Kernels past the stage bound" make bullet and the map paragraph's "its shader modules", and the module docs of stage.rs and pipeline.rs. |
||
|
|
6cc7e45145 |
Tests: a kernel past the stage bound holds no shader module once its state is made, and a later variant is made from its own fill
The stage test now reads, after the helper's fill and the state's make, whether the content's kernel holds a VkShaderModule of its own (a test-only read, `Kernel::holds_module`), and makes a later variant of the same kernel: an indirect dispatch's at threadgroup size [8, 1, 1], which `prepare_dispatch` refuses unfilled with a request of its own; once the helper fills that entry, the variant is made from it (two fills, two pipelines from stage fills). At this commit a heavy kernel keeps the shader module its words made for the content's life (pipeline.rs `Kernel::module`), so the first holds_module assertion fails on every device that keeps a blob. The next commit drops the module. On lavapipe, whose pipeline cache data begins with no header, the test takes its NoPipelineCache branch as before. |
||
|
|
991a8b04ff |
Runtime README: the pipeline cache's 32 MiB bound is a known gap on KosmicKrisp, with its measured re-make pairs
What: one known-gap bullet under the pipeline states' gaps. On KosmicKrisp one large app's pipelines pass the 32 MiB bound (about 140 KB a pipeline in the blob, against 3-25 KB on the three Linux drivers for the same 448), so the cache is replaced and the next launch makes them again. Why: the planner kept the bound (a full cache holds about 119 MiB of host memory on that driver for 448 pipelines) and ordered the gap recorded where a user reads it. Measured (docs only, no code): M3 Max, KosmicKrisp in Mesa 26.3.1, glbench's 448 pipelines: in-process re-makes 1,669-2,370 ms bounded with 45-60 hits (m3-max-67741, m3-max-67789) against 80.4-81.0 ms unbounded with 448 hits, seed footprint +119.1 MiB (m3-max-67847). |
||
|
|
4014d3bc80 |
Tests: the Direct3D 11 views test prints Vulkan values as raw numbers and reads the image's usage through its object
The Windows clippy under --cfg m2v_gpu (job m3-max-67861, both Windows targets) refused the test: ash's Vulkan types have no Debug here, and the image's usage accessor is TextureObject's. The print now gives each format as its VkFormat number, the usage and the external memory features as hex bits, and an error as its VkResult number. |
||
|
|
c669ef7246 |
rt: a Direct3D 11 plane's image lists every format its texture views as, where the import query takes the list
What: import_d3d11_surface's plane image listed only its own format and the descriptor's (and none where they are equal), so a view in any other format Metal takes of the plane's texture (an R8Uint view of an R8Unorm plane with PixelFormatView usage) was Gap::TextureView of SurfacePixelFormat on every Windows device. The image now lists its own format, the descriptor's and the formats the descriptor's texture lists for views of another format, MUTABLE, kept where vkGetPhysicalDeviceImageFormatProperties2 answers that list importable with the image's usage; else the list it had, and such a view stays the typed gap. The usage is still decided with the old list, so a plane the import took before is made as before where the device refuses the longer list. texture.rs is unchanged. The import query is one function (d3d11::import_query) that the product and the new Windows test both call. Why: a consumer boot on the UHD 630 met 14 SurfacePixelFormat refusals of swizzled views changing a surface plane's pixel format. Tests: tests/d3d11.rs, every_device_views_a_direct3d_11_plane_in_another_format_where_its_import_lists_it (m2v_gpu, Windows): both planes with PixelFormatView usage take a swizzled view in another format of their class (R8Uint, RG8Uint) exactly where the import query takes the full list, else the typed gap, and it prints the query's answer with the full list and with each other format alone beside the image's own. tests/surface.rs, every_device_views_a_surface_plane_in_another_format_through_a_swizzle: an exported surface's R8Unorm luma with PixelFormatView usage takes a swizzled R8Uint view, through which rt's writes read back exactly through the plane. Docs: the import's doc comment, TextureViewKind::SurfacePixelFormat's doc (which counted no such view; it now covers both surface kinds), and the rt README's Direct3D 11 surfaces paragraph. REFUSALS.md regenerated: unchanged. No public item changed. Not claimed: the Direct3D 11 path has not run on a card. Whether a Windows driver's import query takes the longer list is unknown until the Windows test runs; the bug row stays open. |
||
|
|
c87452da05 |
Validation: the device tests the own-context executor ran assert what the runtime route does
The own-context executor's deletion pointed six device tests at the runtime route, and on
lavapipe (m3-max-67674) they failed: the route draws one library's stages with a generated
companion, and the runtime compiles under the identity domains. Each now asserts what the runtime
route does, or goes where the route cannot express it:
- a_loaded_pointers_buffer_written_past_its_end_is_refused_uncontained (was ..._is_guarded):
under the identity domains a loaded pointer is used as given and no check bounds it
(docs/API.md, section 1), so the run refuses the target, Uncontained naming LoadedPointer.
- cube_and_cube_array_face_reads_are_refused_under_the_identity_domains (was
cube_and_cube_array_faces_read_the_authored_layers): the translator refuses texture_ops.ll's
cube_faces under the identity domains (Unsupported{IdentityDomains}, NotImplemented, for the
cube argument read by face).
- an_index_past_a_one_layer_pass_renders_the_pass_s_slice: the same slice, with no withheld
validation message (the runtime route withholds none).
- a_constant_fragment_colors_the_quadrant_metal_draws, a_vertex_varying_reaches_the_fragment_stage
and a_looping_fragment_draws_as_compiled go, with their helpers: each draws a vertex and a
fragment function of two owned libraries with no companion, which only the deleted executor
drew. Metal's y-up quadrant stays asserted by
an_observed_vertex_case_draws_into_its_generated_observer (QUADRANT, top_right); a pipeline of
two libraries' stages is compared with Metal by the conformance case shader_stencil. A varying
across two libraries by its user key, and a looping fragment drawn as compiled, have no
runtime-route test now.
docs/CONFORMANCE-COVERAGE.md is regenerated (python3 -I scripts/conformance-coverage/coverage.py):
the rate-map modules no longer declare the notice, 44 modules to 41.
Verified: the coverage script's output; the device tests are not yet rerun (the check job follows).
|
||
|
|
837d7bd5f7 |
Validation: the comparison table names no rate-map note, and the runtime guard takes the binder's edited sources
Fix forward for the four public items' commit, from job m3-max-67664 (the full check): the observation contract's comparison table and its tests still listed `PrecisionNote::RasterizationRateMap` under the alias `N::`, which the earlier search (`PrecisionNote::RasterizationRateMap`) did not match. A search for `::RasterizationRateMap` outside `Feature::`, `ToolingRequirement::` and `bind::` now gives 0. runtime-sources.sha256 takes the hash of the binder's sources as this branch leaves them. No run's behaviour changes, so RUNTIME_VERSION stays: the status decode drops the replay fault fields no module writes; the rate-map errors went from test support alone; RateMapAxis only changed visibility; bind/plan.rs and bind/state.rs changed doc comments. |
||
|
|
751b6e8bc6 |
Runtime README: the 4:2:2 formats and ray tracing's bound acceleration structure are known gaps by name; the bind state names who sets buffer ranges
Two gap rows the cut owes, so no Metal feature that rested on a binder item leaves silently:
- Known gaps of textures: `GBGR422` and `BGRG422` are `Gap::TextureFormat` at every make and at
`heap_texture_size_and_align`, because the translator's format table holds them as a decoded
`RGBA8Unorm` twin (Vulkan views its 4:2:2 formats only through a sampler Y'CbCr conversion), a
form the runtime does not make. Read from the runtime's `form` (texture.rs: `viewed` is false
for `FormatEmulation::Decoded`) and from conformance's known-gaps-rt.tsv, whose
chroma-pair-copies, chroma-pair-texel-reads, chroma-pair-texel-samples and heap-sizes-422 rows
record `Unsupported("no texture of GBGR422 is made on this device for the usage")` on every
venue. The decoded twin stays: the runtime reaches it to refuse the format.
- Known gaps of pipeline states: ray tracing's bound acceleration structure, what the binder's
`BoundAccelerationStructure` stood for. The runtime makes and binds no acceleration structure,
and enables neither `rayQuery` nor `accelerationStructure` (neither extension is in its list),
so the translator refuses a ray-tracing function as `Unsupported{RayTracing}`, as its
`tests::engine_ray_tracing` asserts on a profile without them.
bind/state.rs's `BufferRanges` doc said the runtime sets the ranges on each stage table; the
runtime builds no stage table, so it now says the plan's caller does.
(cherry picked from commit 66c98efa8b452665a236298f18f363b8bdf29a72)
|
||
|
|
b5916b2f7b |
Translator: four public items nothing produces or names go: the replay fault report, the rate-map note, two rate-map errors and the rate-map axis
Four of the eight findings on the binder's public surface, the ones no plan reaches: - (3) `bind::ReplayFaults`, with `StatusReport::replay_fault` and `replay_faults`, `StatusBits::REPLAY_FAULT` and `StatusWord::ReplayFaults`: no module writes the word or the bit. `StatusWord::SeqCstFences` keeps index 3, so no module changes; word 2 is now one nothing writes. - (5) `PrecisionNote::RasterizationRateMap`: no module or runtime path records it (the decoder is Apple's arithmetic, and the runtime draws no rate-mapped pass). Its API.md catalogue entry goes, and so does conformance's `Degradation::RasterizationRateMap` with the notice allowances of the three rate-map families, whose runtime side refuses every rate-map call (`Unavailable`, known-gaps-rt.tsv), so the allowance never applied. Validation's c3 list of deferred near-equivalents drops it, and its tests use `SparseResidency` instead. The translator's rate-map tests drop their assertions that the note is absent. - (6) `RateMapError::NoLayers` and `LayerCount`: only the test support `from_layers` made them; it now panics on a count no test passes. - (7) `RateMapAxis`: in no public signature; now crate-private. The codec encodes a precision note by its name, so no other note's encoding moves. No refusal in docs/REFUSALS.md changes (refusal_surface.py --check passes as is). Consumer search at reims-vgpu development cae6d420df, `git -C ~/Projects/steelbrain/reims-vgpu grep -n -w ITEM development -- '*.rs'`: ReplayFaults 0, replay_faults 0, replay_fault 0, REPLAY_FAULT 0, StatusWord 0, RasterizationRateMap 0, Degradation 0, RateMapError 0, NoLayers 0, LayerCount 0, RateMapAxis 0. Left for later, with the census's re-record: two authored cases' rationales (shard_013, lines 33 and 34) still say the decoder's answers carry the note. (cherry picked from commit b68324630b4c8446d7fe730b3877b31727546d1c) |
||
|
|
c1bcce40f5 |
Validation: the drm-shim recipe goes, with its image, its wrapper and its test
The runtime does not open the drm-shim devices as a guest's device (step 0's P2, ruled: the shim has no venue), so the corpus-pipeline kernel rows that now run through the runtime have no drm-shim sweep, and nothing else used the recipe. Gone: scripts/drm-shim.Dockerfile, scripts/drm-shim-exec, scripts/linux-gate's `--recipe drm-shim` with its `--driver` and `--chip` (and `--recipe` itself, which had only `gate` left), scripts/linux-gate-vulkan's shim ICD block, and the integration test tests/integration/drm_shim.rs. Driver acceptance on RADV, ANV and NVIDIA stays on the real cards. Search at this commit: `git grep -n -i -E 'drm.?shim|M2V_DRM_SHIM'` gives 0 lines; `git grep -n -e '--recipe'` gives 0. The consumer has no copy of these scripts (they are not part of a published crate). (cherry picked from commit 59693588b00825ed312beb67841fe5b8352a6508) |
||
|
|
0bf0195cfa |
Validation: the integration test's row requests carry no projection, and acceptance imports no render descriptor
Fix forward for the commit before, from job m3-max-67607 (the full check): clippy's unused import of RenderPipelineDescriptor in acceptance.rs, and the compile-worker integration test still naming Projection in its row request and in compile_row_in_worker's arguments. (cherry picked from commit 2ea78f2af8199aa1d9e78b61e1b2f70ab2bc999a, its message reworded) |
||
|
|
b92c74e489 |
Translator: a render or mesh pipeline compiles only as the runtime compiles it; validation stops compiling for a bind shape
`Device::compile_render_variant` and `Device::compile_mesh_variant` leave the public API. The runtime renders under `VariantKey::new()` alone, and since the census compiles as the runtime does, the only callers left were validation's bind-shape compiles: the `PipelineRequest::BoundCompute` request, the `shape` of `VertexDraw` and `Draw`, and corpus-pipeline's `--pulled` sweep (its `Projection`). Those go with them. `compile_render_pipeline` and `compile_mesh_pipeline` compile under `VariantKey::new()` as before, and `compile_render_pipeline`'s doc now carries the call-stack sentence the variant's doc held. The crate's own tests keep a test-only `compile_render_variant`. In validation the kernel compile the census and L4 share (`variants::compile_kernel`) stays, with its partial-simdgroup test now comparing against explicit plain and emulated compiles. The binder's shape-compile loop moves under `#[cfg(test)]` (`variants::bound`) for the binder tests that still plan a kernel until the binder goes. The draw test helpers compile as the runtime does. The worker's bound-compute exchange test goes, and its linking test sends a `Kernel` request. Nothing here changes what plan_for is given or returns: the census's artifact digest still plans the same pipeline for the same shape. Consumer search at reims-vgpu development cae6d420df: git -C ~/Projects/steelbrain/reims-vgpu grep -n -w compile_render_variant development -- '*.rs': 0 git -C ~/Projects/steelbrain/reims-vgpu grep -n -w compile_mesh_variant development -- '*.rs': 0 api_signatures.tsv drops the two records. (cherry picked from commit 15766b53448bafc7cd16d9acd335dd3d4c45d734) |
||
|
|
499bbc21b8 |
Validation: the m2v_gpu draw test returns its output directly, and a doc link names argument_buffers::sampler_ids
clippy under --cfg m2v_gpu and m2v_cpu_icd (let_and_return) and Rustdoc (an unresolved link) in m3-max-67528 on 5808aaa769. (cherry picked from commit 4590c1664265429b932f96676c36ea893dcc358a) |
||
|
|
cd5d336782 |
Validation: the own-context executor goes; a case runs through the runtime or is refused before it runs
After the profiles layer moved onto the runtime route, kernel rows went through the runtime, and the
layered cases moved too, nothing called validation's own Vulkan executor. This deletes it:
candidate/platform's compute, render (and its multisampled half), plan_resources, buffers and
multisample modules, the own-context device's clamped-layer, extended-dynamic-state, restriction
and environment machinery, the engine's compile_case / compile_render(_case) / compute_request
plumbing, the bind refusal and status verdict it read, the synthetic guest addresses, the attempt's
creation ceiling, and coverage's module census of its own compiles. corpus-pipeline's Vulkan
context for its render rows, and the runtime probe's, stay.
A render case the runtime route does not draw (a depth/stencil attachment of both aspects, a patch
draw through a patch or control-point index buffer, an out-of-bounds target other than an attribute
buffer) is refused not_supported{executor_not_implemented} before it runs, as run_prepared already
did once the gates were gone. The comments and docs/VALIDATION.md that compared with the own
context now say what the runtime route does.
Test-only items move beside their tests: Mechanism's label into the out-of-bounds tests,
Containment::of_compile, its label, Declared and ExecutionClass::of_description into the tier
table. The linked-functions integration test compiles through kernel_request, as the census does.
Deleted tests and what covers their Metal claim:
- a_kernel_runs_with_its_linked_visible_functions: a_kernel_runs_through_the_runtime_with_its_
linked_visible_functions (engine_compute.rs), kept.
- a_draw_restarts_exactly_its_strips_within_its_class: the conformance case
primitive_type_crossings compares strip restart with Metal.
- a_combined_depth_stencil_format_moves_both_aspects_together, a_draw_covers_the_whole_target,
a_guarded_buffer_counts_each_changed_guard_byte, a_target_is_bound_for_its_fetch_form,
every_state_a_render_pipeline_makes_dynamic_is_recorded,
multisample_initializers_are_vulkan_legal_for_each_component_class,
addressed_allocations_take_metal_addresses, the_status_starts_zero_and_stops_non_evidence,
the_clamped_layer_warning_fails_no_row_of_a_clamped_store_alone,
a_context_has_the_extended_dynamic_states_where_the_product_reads_them,
a_store_runs_through_the_binder_under_the_validation_layer,
a_tessellation_pipeline_census_is_its_functions: the deleted executor's own mechanics, no Metal
answer of their own.
metal2vulkan-validation is not published, so no consumer can reach a deleted item:
git grep -n -E 'metal2vulkan[-_]validation' development -- '*.rs' '*.toml' in the consumer's
checkout at a11528a7e2: 0 hits.
Verified: cargo check of the validation crate, all targets and features, plain, --cfg m2v_gpu and
--cfg m2v_cpu_icd, clean (m3-max-67506, on the probe branch's identical diff); the dead-code pass
against the base finds only items whose users are macOS-only or tests the binder's deletion takes.
The compile job and the suites follow on this commit.
(cherry picked from commit 5808aaa769e3f44b1bd76dea486b2b150b15e92b)
|
||
|
|
556e845f18 |
Tests: the range and display-library report tests read their lines after the mode line
The commit before this one puts the mode line first in every report, and these two tests read the range line as the report's first and the display library's as its second. Job m3-max-67784 (the validation suite at b846f1ebb3) failed exactly them, 1331/1333; they now read the range line second and the display library's third, and the range test reads the mode line first. |
||
|
|
d15ab4501c |
Validation: command-replay play --states-only yes plays the state records and presents alone, and the report's first line names the mode
A states-only play was a probe's environment variable (M2V_PROBE_STATES_ONLY, on a probe branch that never lands): a tree without the probe played the streams in full and said nothing, so two states-only plays of a translator change read as plays of nothing they were meant to check. The mode is now an option of the validation player itself, --states-only yes|no (no by default), and every report's first line names it: `mode full: every call` or `mode states-only: the device, library, function and pipeline state records and the presents alone (--states-only yes)`. A bad value is a bad command line (exit 2, `error states-only: ...` as that first line). Player::states_only passes over every call but MTLCreateSystemDefaultDevice, m2v.deviceIdentity, the newLibrary*, newFunction*, newDynamicLibrary*, newRenderPipelineState* and newComputePipelineState* calls and m2v.present, the probe's set unchanged, so frames and the recording range end where a full play's do and the pipeline states are made cold as a full play makes them. A states-only play writes none of the matrix's judged metrics, since it runs none of the work they count. The completion-fix line keeps its place by itself, now after the mode line; its test reads it there, and a new test reads the mode line for yes, no and a bad value. docs/REPLAY-STREAM.md section 10 and the player's module doc and usage name the option and the line. |