75c3e49bd6bcc0be3f079c32b6f4ce8d8cea85bb
9097
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
75c3e49bd6 |
Conformance coverage: regenerated for the overlapping-copies row's new refusal
docs/CONFORMANCE-COVERAGE.md quotes each ledger row's reason; the row's words moved with its refusal (python3 -I scripts/conformance-coverage/coverage.py). |
||
|
|
5f4067050a |
Runtime test: the any-offset buffer copy test names each device and copy it ran
So a card's run shows the copies ran on that card (the path line a device leg prints). |
||
|
|
c358d9afd7 |
Runtime: a copy between buffers takes any offsets and size, as plain Metal copies them
A guest's blit copy of 62,302 bytes at offsets 0 and 0 met Refusal::BufferCopyUnaligned. Apple's page for copyFromBuffer:sourceOffset:toBuffer:destinationOffset:size: asks for multiples of 4 on macOS, but plain Metal does not stop or round such a copy: it copies every byte of the range and no other. vkCmdCopyBuffer has no alignment rule for its regions, so the copy is its one region at the offsets and size the call names, and the refusal is gone. Measured with probe crates/metal2vulkan-conformance/probes/blit_buffer_copy_unaligned.m, one universal binary (built in m3-max-69612), copies (source offset, destination offset, size) = (0,0,62302) (0,0,1) (0,0,3) (1,0,8) (0,2,8) (3,5,4097) and the controls (0,0,64) (4,8,4096), each between two Shared, two Managed and two Private buffers, every destination byte read back: - Apple M3 Max, macOS 27.0.1 (26A434), job m3-max-69613: 24 of 24 exact with validation off (AGXG15CDevice), 24 of 24 exact under MTL_DEBUG_LAYER=1 (MTLDebugDevice), which printed only its banner and took every copy. - AMD Radeon Pro 5300M and Intel UHD Graphics 630, macOS 26.7.1 (25G241), job m3-max-69614: 24 of 24 exact on each, validation off. Every command buffer completed with no error. The variant, its basis line, its REFUSALS.md rows and its api_signatures.tsv line go; the runtime README says what Metal measured. The conformance ledger's overlapping-copies row now holds the overlap refusal its first copy meets (the alignment check ran before it). The consumer's checkout names the variant nowhere (git grep BufferCopyUnaligned at reims-vgpu 6d83a5d4f8: 0 hits). Test: every_device_copies_between_buffers_at_any_offset_and_size copies the six ranges between two Shared buffers and reads every byte back; it fails without the change (the refusal). |
||
|
|
7b39f0bae9 |
Runtime README: on the Mac host, the first submission after an idle pause pays for the bytes in the device's residency set
On KosmicKrisp (Mesa 26.3.1, Apple M3 Max, macOS 27.0.1), a bare Vulkan program's one-fill submission after a 2 s pause started 18.45 / 23.88 / 24.44 ms (p50 / p90 / max) after its commit while its device held 6 x 64 MiB, 12.32 ms of it in vkQueueSubmit2 at the median, against 8.49 / 10.74 / 11.06 ms holding nothing (14 each, m3-max-69600; the earlier m3-max-69540 read alike). After a 0.1 s pause the held bytes cost nothing measurable (0.77 against 0.79 ms at the median). Read from the driver's source, not instrumented: every VkDeviceMemory is a heap in one residency set added to the device's Metal queue, and every vkQueueSubmit2 commits that set and calls requestResidency. A Metal reference in the same job, arms interleaved, says whose cost it is: a Metal program holding the same 384 MiB in a residency set added to its queue, committed once and never requested, started 19.44 / 26.15 / 26.25 ms after a 0.03 ms commit; requesting residency before each commit moved 13.18 ms (median) into the calls and left the start where it was (20.96 / 23.74 / 26.46 ms); the same buffers in no set read like an empty set (7.85 against 8.37 ms at the median). A Metal 4 queue, the kind the driver uses, read alike. So at this size and pause the delay is Metal's own for bytes in a queue's residency set, and the driver's per-submission request moves it into vkQueueSubmit2. The README's queue gaps now state these rows, the jobs, that the machine was shared and that the driver was read, not instrumented. Docs only; the workspace Rustdoc (-D warnings) and doctest check of this commit is its own job, named where the commit is handed in. |
||
|
|
da020e5d7b |
Runtime: a compute kernel that reaches an explicit imageblock gets its state; its dispatch is refused
A compute pipeline state whose kernel reaches an explicit imageblock was refused at its make as
Gap::KernelInput of KernelInputKind::RuntimeFact naming ImageblockSize, which every arm64 macOS
guest boot meets once. The state is now made, and what stays refused is the dispatch, where Metal
reads the extent setImageblockWidth:height: set, which the compute encoder does not have:
- interface() takes RuntimeFact::ImageblockSize, keeping its cell bytes as Interface::imageblock,
and leaves SpecKey::ImageblockWidth and ImageblockHeight at the module's default (0 by 0)
instead of refusing them as a specialization it does not set.
- encoder::decide, which the dispatch, prepare_dispatch, dispatch_variant and the main pipeline's
key all go through, refuses a kernel with an imageblock first, as Gap::KernelInput of
RuntimeFact naming the fact (RuntimeFact::name). So no VkPipeline of such a kernel is made:
finish_pipeline has no main key, and a pre-pass gets no key. A dispatch of such a kernel that
writes no memory records nothing and is not refused, as for any kernel without effects.
- imageblock_memory_length_for_dimensions keeps its typed answer, Gap::ImageblockLength, for a
kernel that declares an imageblock: the one recording of Metal's answer for such a kernel
(conformance pipeline-facts-compute-imageblock, M3 Max, 256 bytes at 8 by 4 by 3) settles no rule.
The translator is untouched. Gap and KernelInputKind keep their variants; the docs of
Gap::KernelInput, KernelInputKind::RuntimeFact and Specialization, Gap::ImageblockLength (and its
basis line), the dispatch and the state's make say where the refusal now is. docs/REFUSALS.md,
docs/METAL-COVERAGE.md (setImageblockWidth:height:'s note) and docs/CONFORMANCE-COVERAGE.md are
regenerated. The runtime README's state facts and its known gap are re-worded, with the counts and
jobs kept. The conformance ledger's pipeline-facts-compute-imageblock row moves from case/state to
the facts' label and device (the consumer's own, as for every state) and imageblock_memory_length
(Gap::ImageblockLength). Validation's KernelImageblock requirement doc and its acceptance test's doc
name the dispatch's refusal and the renamed device test.
Test: tests::kernel_input::an_explicit_imageblock_kernel_is_made_and_its_dispatch_refused_as_its_named_runtime_fact
(replacing an_explicit_imageblock_kernel_is_refused_as_its_named_runtime_fact) makes a4_imageblock_extent's
state, reads its imageblock length as Gap::ImageblockLength, gets no dispatch_variant key, and has
one 4 by 2 threadgroup's dispatch refused as Gap::KernelInput of RuntimeFact { fact: "ImageblockSize" }.
|
||
|
|
b2fb0993d7 |
Runtime README: behind another queue's long work, a command buffer waits for up to two of them
The queue section said a command buffer of another queue committed later "waits behind no more of it", which reads as the room's 16 ms. That holds for work within the bound only: a queue always has room for two submissions whatever their runs, and nothing cuts a command buffer, so behind long ones another queue's command buffer waits for up to two whole command buffers. The sentence now says both, and the queue known gaps state the consequence once: the burst-start count on lavapipe (three command buffers of 30 ms, two of them, 60 ms, on the VkQueue at an idle queue's commit; job m3-max-69402, by count, not timing), that the runtime takes no queue priority, and the Intel Mac's answers on file (UHD 630: commit order unmarked, 0.4 ms beside the running buffer with the busy queue at a lower GPU priority, job m3-max-68129; 5300M: both at once, job m3-max-68137). Docs only. |
||
|
|
e23ac486be |
Runtime: an indexed draw's command buffer keeps its index buffer until it retires
The draw path kept an indirect draw's arguments' buffer (and an execution's range buffer) with Building::keep, but never the index buffer of draw_indexed_primitives or draw_indexed_primitives_indirect, though both docs say the command buffer keeps it until it retires, as Metal's command buffer retains what its draws use. A buffer is a view of a block that holds the block (buffer.rs), so where the buffer was its block's last holder (the consumer's plain buffers: it drops its block handle once the buffer is made), dropping it after encoding gave the block back at once (memory.rs Pool::give_back): its range was a free range of its allocation, a later take could land there and overwrite the indices before the GPU read them, and with nothing in flight the allocation itself could go once idle. The index buffer is now kept beside the arguments' buffer, after the draw's checks and only for a draw that records. Test: every_device_keeps_index_buffers_dropped_before_the_commit_until_their_draws_retire (tests/draw.rs): a direct indexed draw and an indexed indirect draw, each index buffer the one holder of a Shared block, both dropped after encoding and before the commit, two blocks of the same length then taken and filled with other indices; the target reads back exact (each half its own draw's colour), neither block is back in the pool before the retirement, and both are after it. |
||
|
|
5110fc3021 |
Validation: the runtime-row imports live in the Linux-only function that uses them
CI's macOS clippy under --cfg m2v_gpu (run 122057987258 at
|
||
|
|
71dab7bba8 |
Conformance: the killed-scratch test asks for the holder's path only when it runs
CI's Linux clippy (`cargo clippy --workspace --all-targets --all-features`, run 122057987258 at |
||
|
|
eb69a32299 |
Bless: the pin e3a3f5c7dc's golden and census header lines
The pin |
||
|
|
e3a3f5c7dc |
Runtime: the queue cut comes off again
Reverts, in one commit, the nineteen commits of c38852d665..c2088436aa that carry the queue cut and its order fixes (newest first): |
||
|
|
c2088436aa |
Runtime README: the 780M import-cost row names its memory measure
|
||
|
|
7d8aabed34 |
Runtime README: the import cost measured on a guest's compute benchmark on the 780M
The imported-blocks cost paragraph gives the cost on idle imports beside a play. This adds what it measures on a guest's own work. A guest's compute benchmark on a Radeon 780M (RADV, Mesa 26.2.6) ran two runs in each of two arms: - on the device's own unified answer, where the guest makes no-copy buffers (about 800 imports live); - on a two-copy answer given by a probe, where the guest makes Managed buffers (about 120 live). The no-copy arm spends 0.80 to 0.83 ms in each vkQueueSubmit2 against 0.11 to 0.12 ms, and 12.7 to 13.0 s of the submitting thread's CPU time against 2.3 s. The scored pass takes about 10.8 s longer, and the score differs by 1.1%. The Managed arm holds 2.3 to 2.5 GiB more device memory. Jobs m3-max-68988 and m3-max-69040 (no-copy), m3-max-69016 and m3-max-69073 (Managed), from the consumer's runs on the 780M. Docs only: no product change follows, since the score does not move past its 5%. |
||
|
|
6adfe028d8 |
Translator: a half vector joined from read lanes keeps their bits; 20 NaN ledger rows
The RTX 5080 Laptop's replay at |
||
|
|
333adf36cf |
Runtime: a head held behind an idle queue's sharer is staged into a group of its own, held
What: next_ready skips a head that sends_past holds only where it would join a group held whose first command buffer sends_past does not hold. Otherwise it stages the head as before: into a group of its own, or into a held group whose first is held too. Such a group waits in its queue. It has no room and wants none, and no host wait sends it through (has_room, wants, goes), until the earlier commit is submitted. Why: 530842c0bc skipped every such head, so it stayed committed and unscheduled until that commit was submitted. every_device_submits_a_write_on_an_idle_queue_before_another_queues_later_read waits for its reader to be scheduled, held in a group for the device's room. It timed out at the reader's status on lavapipe (m3-max-68984, 674 of 675) and on the Iris Xe (m3-max-68985, 676 of 677). A held group goes only by those three gates, so staging the head into one changes no order. Skipping it is needed only where it would join a group that goes before the earlier commit. Verified: not run when committed; its jobs follow. |
||
|
|
8828e8ad6c |
Runtime: no work goes before an earlier sharer of another queue that Metal submitted at its commit
What: one predicate in submit.rs, WorkState::sends_past(index, pending). It answers whether `pending`, a command buffer of the FIFO at `index`, would go before an earlier commit of another queue that Metal had submitted at its commit (Fifo::idle_first: the first command buffer not yet submitted of a queue committed to it idle, with a part ready) and that shares a tracked resource with it (by the hazards' ids), or where either reaches memory outside its resources. It replaces the host-wait-only sends_past and is asked at every place that lets work go: - next_ready: such a head is not staged, nor a head that would join a group whose first is such a one (the head choice); - has_room and wants: such a FIFO has no room and wants none, so it holds no other queue back by rank (the FIFO choice, and the groups that go at once, which stage only with room); - goes and waits_for_room: no host wait sends it through (the host-wait send). A group is asked by its first command buffer (Fifo::sends); those that joined it go with it. wants takes the FIFO's index in place of the FIFO, for the predicate. Why: the planner's (h3) shape, a regression of the cut. C, committed to an idle queue, is held by block_shared behind X, a cut command buffer of another queue it shares with. While held, C wants nothing. D, a sharer of C on a third queue committed after C and sent by no host wait, then took the room between X's pieces and copied C's buffer before C wrote it. Metal submits C at its commit, so its hazard tracking orders D after C. goes_before stays separate. It orders the closes of groups that all go now within one pass and holds nothing. sends_past decides whether work goes at all. They overlap only for sharers, and there goes_before still orders the groups that go without a room check: at teardown (stop), and a fence updater sent through by its waiter (updater_held). The over-hold row: the holder is still read when the work is staged or takes the room, not at its commit, as the host-wait rule read it. That is unchanged in kind, but it now covers every send, not only a host wait's. Two readers of one resource share it here, as in the cut rule (no read or write mode is kept per resource), so a read waits behind an idle queue's earlier read of the same buffer, which Metal does not order: an over-hold, now written in the README. No more is held: an earlier commit not submitted at its commit (its queue's work ahead of it), or one whose next part waits for an event not yet met, holds nothing, as before. Seen, not patched (each a shape of its own): updater_held sends a fence updater through to its waiter with no room check, so an updater held by this rule would still go. README: the cross-queue paragraph's host-wait sentence now states the rule for every send, the (h3) case and the over-hold. Verified: not run when committed; its jobs follow. |
||
|
|
daaccb7bb0 |
Tests: the later-sharer test prints the device's counts once all completed too
What: every_device_copies_an_idle_queues_copy_of_a_long_write_into_a_later_sharer prints the device's metrics a second time, once every command buffer has completed and before its assertion. Why: the planner's reading of the (h3) job needs proof that the second copy's submission went before the writer's last piece. That proof is Metrics::pieces_passed: a submission of a queue that went to the VkQueue while another queue's cut command buffer still had pieces not submitted (WorkState::close counts it while that command buffer is still its queue's head, and the head leaves its FIFO once its last piece is staged). The first copy is held until the writer's last piece is staged, so in this test only the second copy can make that count. The first print comes before the gate opens, before any of that happens. Verified: not run when committed. |
||
|
|
4f683ad891 |
Tests: the later sharer's queue has a known short run, so it fits the room behind the pieces
What: in every_device_copies_an_idle_queues_copy_of_a_long_write_into_a_later_sharer, the third
queue first runs one command buffer with no commands, and its expected run is then set to
BODY_RUN (1 ms, the test's own input), before the busy gate is made.
Why: in job m3-max-68964 the test passed on both arms, 3 of 3. On the cut arm it printed cuts 5
(the writer's six pieces) and shared_holds 1 (the first copy held). But the second copy's queue had
no expected run, so its group asked for room at u64::MAX, and room() takes such a group only with
fewer than two submissions in flight. The writer's pieces, each of run 0 and ranked behind it,
kept two or more in flight until the last one was staged. That released the first copy, which is
committed earlier and also at turn 0, so it ranks first. So the second copy followed the first
because of its own unknown run, not because of a rule that orders it after the first. With a run
of 1 ms the second copy fits room(), and its rank, turn 0, comes before the writer's next piece.
That leaves the planner's (h3) shape free to show.
Both items are on development
|
||
|
|
7cd99ae0b1 |
Tests: an idle queue's copy of a long write, then a later sharer of a third queue with no host wait
What: every_device_copies_an_idle_queues_copy_of_a_long_write_into_a_later_sharer. Behind the busy gate, a writer on one queue makes six dispatches of x = x * 2 + 1, two kernels of unknown rate in turn, so a runtime that cuts by a kernel's rate makes six pieces, more than the device's room takes. Then a copy of its buffer is committed to an idle queue, and a copy of that copy is committed to a third idle queue, with no host wait. An empty command buffer committed after them is scheduled before the gate opens. The test asserts the words Metal's order gives: 63 in the written buffer, the first copy and the second. It prints the device's counts once the copies were seen, so a run shows its cuts and shared holds where the tree counts them. Why: the planner's (h3) shape. A command buffer held behind a cut sharer of another queue wants nothing for the device's room, so a later sharer of it on a third queue that no host wait sends could go before it. Metal submits the first copy at its commit, as its queue has nothing ahead of it, and its hazard tracking orders the second copy after it (the runtime README's "Queues, command buffers and events" rule, from the M3 Max rows of job m3-max-68673). The test uses only items that development |
||
|
|
5f93a64342 |
Runtime README: the RX 7900 XTX's benchmark score is 3.7% lower with the pieces, cause not found
What: a known gap under Queues. A guest's compute benchmark on an RX 7900 XTX (RADV, Mesa 26.2.6) scores 3.7% lower on the mean with the pieces over eight runs: 118,115 against 122,618. The line gives all eight runs with their jobs and builds. - Pair one, with the pieces at |
||
|
|
6523e2b65c |
Runtime README: the RTX 3090's benchmark score with the pieces is level, by both alternated pairs
What: the known gap of each piece's submission cost said the 3090 guest scored 6.3% higher with the pieces. That rested on one base run, 75,949 (job m3-max-68789). The second base run, job m3-max-68954, scored 80,946, above both runs with the pieces: 80,706 (m3-max-68865) and 80,730 (m3-max-68889). So the sentence now gives all four runs and says the score did not move beyond the base runs' own spread. The base arm spreads 6.6% and the pieces arm 0.03%; the means are 2.89% apart. The host side gives both pairs: - submissions 23,670 and 23,489 with the pieces, against 20,750 and 20,406 without; - 912 and 923 ms inside the calls, against 606 and 666 ms. The clocks were the same in all four runs (busy SM p50 1,935 MHz, mostly P2), by the consumer's clock block. Why: the planner read the 3090 cell as spread, and the old sentence claimed a gain the rows do not show. The Iris sentences stand. Verified: a README change alone. The rows are the consumer's benchmark logs as reported. Workspace Rustdoc is next. |
||
|
|
76f369dbbf |
Runtime README: each piece is a submission, and what that costs a guest's benchmark on the Iris Xe and the RTX 3090
What: a known gap under Queues. Each piece of a cut command buffer is a submission, so the host pays a vkQueueSubmit2 call's price once per piece. The line records a guest's compute benchmark with the pieces ( |
||
|
|
2bcac43a53 |
Runtime: what a host wait sends waits for a sharer of another queue that Metal had submitted
What: a queue sent through by a host wait (Work::send, send_now) goes through only once no command buffer of another queue, committed before one it sends, the first not yet submitted of a queue that has submitted nothing since a commit found it idle (Fifo::idle_first), with a part ready, and holding a buffer or texture it holds by the ids the hazards track them by (or where either reaches memory outside its resources), is left unsubmitted (WorkState::sends_past). Until then it waits for the device's room, whose order sends that one first. The runtime README says so. Why: on the cut the device's room is shared. With busy work of a third queue filling it, a command buffer that fills, waits for an event and fills again on an idle queue is held up to its wait in a group for room, and a later command buffer of another queue that copies what it filled and signals the event, sent by a host wait, went past the room and ahead of it: its copy read none of the fill. Metal submits the first at its commit and orders the copy after its fill before the wait (the conformance case event-signaller-of-a-wait, M3 Max, job m3-max-68673). Only such a pair is held, and only until the first's ready part is submitted; a command buffer committed behind its own queue's work holds nothing, as on Metal (the README's M3 Max rows). Verified: pending. |
||
|
|
c5e98be51d |
Runtime: a queue whose work all completed takes turn 0 at its next commit, seen or not
What: WorkState::push reads the progress value the completion thread has seen complete (Done::completed), passed in by enqueue and commit: a queue with nothing queued and nothing in flight past it takes turn 0, as one that never submitted. Why: the submit thread forgets a queue's completed submissions only as it next looks (settle), and a completion with nothing held does not wake it. So a queue whose last submission had completed kept its old turn at its next commit, and a later commit of another, idle queue ranked before it (rank) and went first, the first's fill before its wait passed. Metal submits a command buffer committed to a queue with nothing ahead of it at its commit (the runtime README's M3 Max rows). Verified: pending. |
||
|
|
635da9d820 |
Runtime README: the 3090 read's build with pieces also fetches stage input, outside the encoders' path
What: the known gap of the pieces' instruction cost named |
||
|
|
1f7f77e4cc |
Runtime README: the pieces' cost in instructions and the Iris Xe's cross-queue wait, as known gaps
What: two known gaps under Queues. The first records what the pieces cost on the compute harness: the encoding thread's instructions a command buffer on an RTX 3090 (burst_2000 +1,239, 2.5%; burst_160 +1,609, 3.5%; burst_160_shared +1,633, 2.7%; frame_5cb +1,843, 2.8%; burst_2000x5 +4,566, 4.4%, about 830 for each compute encoder past the first; the one-command-buffer rows +952 to +1,166), the remainder counts on an RX 7900 XTX (+964 and +883, and 848 to 1,014 and 550 to 745 with parts of the path put back, 710 and 465 with all of them: spread over the path, nothing built), and the times, of which none moved 3% or more beyond its spread. The second records the Iris Xe's two_queues waiter: its GPU start 30.4 us after the signaller's end at the median, against 9.0 us with no pieces (where the waiter waits is not placed), and the late frames the pieces bring in on that device (23.7 ms against 34.8 ms at the median, committed to completed). Why: the close rule is widened from the burst rows to every harness row: every row over 3%, burst or not, goes into the known gaps with its number; a row over 5% whose loss is a fixed amount a command buffer is recorded beside the Iris's +21 us line; a row over 5% whose loss grows with the work is a regression of the cut. In the randomized read no time row is over 3% and none over 5%, so no row goes beside the Iris line and none is a regression; the instruction rows over 3% (burst_160 3.5%, burst_2000x5 4.4%) are recorded. The form stays: no other form that keeps Metal's order was found to fix the Iris Xe's late frames, which the pieces do. The read: compute harness, RTX 3090, job m3-max-68794, exclusive, four rounds of the two builds in random order (A B, A B, B A, A B), every run at P0 but six samples at P8 at round 1's start: A is |
||
|
|
4b1cdaf505 |
Tests: the room-hold present tests signal a semaphore of their own, which the stand-in present waits on
What: presenting_by_room presents with a binary semaphore it makes (present.rs's semaphore()), and once both command buffers complete, the stand-in present (show()) waits on it and copies the image out; the semaphore is destroyed with the stand-in. Why: the present named VK_NULL_HANDLE, which present_drawable's contract does not allow (ready is a binary semaphore of the device). With the spin fixed, the presenting command buffers reached the device, and both forms ended in SIGSEGV on lavapipe (m3-max-68769 at c4ba1b9d1d), the submission signalling no semaphore at all: the tests' own error, not the runtime's. Verified: see the jobs named where it is handed over. |
||
|
|
9e8baebc48 |
Runtime: behind a cut head waiting for room, what would be sent through waits in its queue's order
What: next_ready does not pick an entry that hold() would send its queue through to (ended before it went, nothing for the GPU, or presenting: Entry::sent_through, the one condition both now read) while the FIFO's head that waits for room is a cut command buffer. The FIFO offers nothing until room comes; the head's pieces go at the room's pace, and the entry goes behind them in the queue's order, scheduled as it reaches the head (or, presenting, once submitted). The runtime README's room paragraph says so. Why: the submit thread spun with the work lock held. Behind a cut head waiting for room (waits_for_room's None arm), next_ready returned the first entry not held, with waits; hold() took its early return for it (ended, empty or presenting), raising send_through and leaving it unheld, and a cut head never goes through on send_through (waits_for_room's `through`), so nothing next_ready reads changed: pass() continued on Staged and picked the same entry again, for as long as the room stayed full. Completions are settled only at pass()'s top and commits wait for the lock, so the room never came back. A cut command buffer of three or more pieces waits for room at its third piece by room() alone, so the window opened during each such command buffer's run. The fix holds Metal's order within the queue: the entry completes after the head and is scheduled no earlier than it. Verified: the four forms, each a test and a process of its own, hang without the fix and pass with it on lavapipe; with the compile check, the pieces tests and the runtime suite on lavapipe: see the jobs named where it is handed over. |
||
|
|
b1b375b8e1 |
Tests: each room-hold form is a test of its own, so no hung form masks another
What: the pieces test becomes every_device_retires_an_empty_command_buffer_behind_pieces_waiting_for_room and every_device_retires_an_ended_command_buffer_behind_pieces_waiting_for_room, and the present test every_device_retires_a_presenting_command_buffer_behind_pieces_waiting_for_room and every_device_sends_a_cut_presenting_command_buffer_as_the_room_comes, each one form through a shared body (behind_pieces, presenting_by_room) on a device of its own, under nextest a process of its own. Why: a hung form ends its process (exit 101 past the 10 s bound), so in m3-max-68758 the ended form and the cut presenting form never ran behind the empty and the present-behind forms that hung. Each form now shows its own answer. Verified: see the jobs named where it is handed over. |
||
|
|
40a9982a94 |
Tests: the two room-hold tests show their window by the head's status and its pieces sent
What: both tests (pieces.rs, present.rs) show the window open by the cut head's status, Scheduled, and two of its four pieces submitted 50 ms after the second went, asserted and printed before the command buffer under test is committed. They no longer wait for Metrics::held_for_room to rise. Why: a cut command buffer whose later pieces wait only for room is scheduled with its first piece and marked held there (WorkState::step, the cut-and-leads arm), with no held_for_room counted; hold() never takes it. So the count never rose, and both tests timed out in their window wait, 60 s, before committing anything (m3-max-68752 at 31a1f91891, m3-max-68755 at acfac8f4d2): the window was not shown, and nothing was tested. Verified: see the job named where it is handed over. |
||
|
|
02923fb2ae |
Tests: a presenting command buffer behind or among pieces waiting for room goes
What: every_device_retires_a_presenting_command_buffer_behind_pieces_waiting_for_room, with present.rs's stand-in drawable, behind the busy gate, the kernel's rate 3 ms a threadgroup (the test's input), in two forms: - behind: a cut command buffer of four pieces has two on the device and its head held for room (Metrics::held_for_room); a command buffer of its queue that only presents the drawable is committed behind it, and retires after it. - cut: another queue's cut command buffer holds the room the same way; a cut command buffer that presents, its first piece waiting for that room, is committed, and goes as the room comes. The window is printed before each commit. The commit and both completions are waited for on another thread within 10 s each; past that the test ends its process. Every step lands. Why: the present forms of the planner's spin read: hold() takes its early return for an entry that presents and leaves it unheld (submit.rs:1811-1814), while a cut head never goes through on send_through (:1696). Verified: see the job named where it is handed over. |
||
|
|
ec24ba8439 |
Tests: an empty or ended command buffer behind pieces waiting for room retires after them
What: every_device_retires_an_empty_or_ended_command_buffer_behind_pieces_waiting_for_room. A cut command buffer of four pieces (the kernel's rate 3 ms a threadgroup, the test's input) has two on the device behind the busy gate and waits for room for the rest, the head held for room (Metrics::held_for_room), shown before anything else is committed. Behind it on its queue comes a command buffer that holds nothing for the GPU, or one ended before it went (a fill, enqueued, its queue abandoned, then committed). Its commit and both completions are waited for on another thread within 10 s each; past that the test ends its process, as a submit thread spinning with the work lock held lets no handle drop. Both retire, the pieces first, every step landing. Why: the forcing test of a spin the planner read in submit.rs: hold() takes its early return for an entry that is ended, empty or presents and leaves it unheld (submit.rs:1811-1814), while a cut head never goes through on send_through (:1696), so next_ready can return the same entry with waits for room forever, and pass() continues on Staged with the lock held (:2440). Verified: see the job named where it is handed over. |
||
|
|
69754cb203 |
Runtime: the queue cut comes back, as it stood at f0b6fff640, for its fixes to build on
This reverts |
||
|
|
c38852d665 |
Tests: the wait-split pair behind busy work, and on a queue whose last work completed unseen
What: the wait-split test's pair is a helper, wait_split, with Metal's answer beside it (metal_wait_split). Two more tests run it: every_device_copies_an_idle_queues_fill_before_its_wait_behind_busy_work (a third queue's busy work holds the GPU and fills the device's room, the copy sent) and every_device_copies_a_fill_before_its_wait_on_a_queue_whose_last_work_completed (the first's queue ran one command buffer, held on the GPU by the busy gate until the submit thread is parked, then let complete before the first is committed, so the thread has not seen it complete; the copy not sent). Why: the two shapes a runtime whose room is the device's can pass the fill in: a group held for the device's room that a host wait's group passes, and a queue whose completed work the submit thread has not yet seen, so its next commit does not count it idle. Verified (this tree, as 22d01fe06d): the three wait-split tests on lavapipe (Mesa 26.2.4), each alternated without |
||
|
|
165ef68096 |
Runtime: a helper that ends before its reply is kept as StageBreach::Ended, refused like Time
A stage helper that ends before its whole reply, with no end of the consumer's (no cap, no time limit, no cancel), had no breach to be kept as. fill_stage answers StageFill::Ended and keeps nothing, so every later make, prepare_dispatch and dispatch of that pipeline answered Error::StageUnfilled again with no limit. A consumer that asks again meets the same end each time. On the Iris Xe (ANV, Mesa 26.2.6) a heavy kernel at 1,024 threads a threadgroup ended its helper eight times in a row that way (job m3-max-68748). The fault is in libvulkan_intel.so under the helper's vkCreateComputePipelines (jobs m3-max-68793 and m3-max-68824). StageBreach::Ended is that end. The consumer records it through record_stage_breach, the one way an end is kept. It is kept and refused as Time is (Gap::StageSize, StageGap::Breach), with no helper asked again: the first such end is the answer, and there is no count and no retry. A crash is not StageBreach::Compile, which says the driver answered an error. A kept end must not outlive a fix of ours to the helper. The entry holds, beside its byte, the helper version it was kept under: HELPER_VERSION, 4 bytes, the way a Memory entry holds its ceiling. An entry under a lower version is a miss and is removed, so the make asks for a fill again. HELPER_VERSION starts at 1, and its doc says to bump it with every change to what the helper's own code does (serve_stage, serve, compile, read_request). The stage key, WIRE_VERSION, fills and the other breaches are unchanged. Tests: - an_ended_breach_holds_to_its_helper_version_and_is_a_miss_below_it: an ended entry kept under HELPER_VERSION is 62 bytes and reads back under every ceiling. One under a lower version, with no version, or with a cut version is a miss and is removed. The digest of the helper's code text must equal the pair recorded for the current HELPER_VERSION, so a change to the helper that misses the bump fails there. - a_helper_that_ends_before_its_reply_is_kept_as_an_ended_breach (device): a helper that reads the request and ends with no reply gives StageFill::Ended. Once that is recorded, the next make, and a later device's on the same directory, answers Gap::StageSize(Breach(Ended)) with no fill. The runtime README's stage section records the Iris end, as read with a debugger, and the Ended breach's line. The signatures table gains the variant. docs/REFUSALS.md and basis.rs were regenerated and did not change. |
||
|
|
722872edec |
Runtime README: the 780M modifier answer says what was asked and answered
What: the known gap for a texture over a dma-buf's one import on the Radeon 780M now states the DRM_FORMAT_MOD_LINEAR answer as asked: offered at the program's pitch for the usages asked, the image requiring a dedicated allocation (job m3-max-68847). It adds that an import of its own per texture was not tried and is not built, and sizes what it could remove: 3.54 GB of the 40.49 GB a guest's run copies over its imports (job m3-max-68603), under 5% of each workload. Why: the earlier wording read as if the device had no in-place form, which was not shown. How verified: docs only; the figures are the jobs' printed answers. |
||
|
|
ed91da1c04 |
Runtime README: the 780M's dma-buf texture answers and the import copies' share per workload
What: the known gaps of memory blocks gain the Radeon 780M's answer for a texture over a dma-buf's one import. Its external image query refuses the dma-buf handle with LINEAR tiling for every usage asked, while the same linear image without the handle takes the program's pitch. With DRM_FORMAT_MOD_LINEAR tiling the image is offered at that pitch, but it requires a dedicated allocation. The textures' known gap on counted copies gains the share of its timed GPU time each workload of a recorded compute play loses to the copies over imported buffers. Why: the copies over a dma-buf import had no measured cost, and the gap line did not say which part of the driver's answer refuses. How verified: the format queries ran on the Radeon 780M (jobs m3-max-68787 and m3-max-68847). The shares are from the recorded play in job m3-max-68694, which alternated the no-copy buffers as udmabuf imports against the runtime's own Shared memory. The leading uploads' GPU time is exact; copies inside a command buffer are bounded by the time those command buffers lose against the other arm, paired by command buffer. Docs only. |
||
|
|
53bf3a3f3c |
Runtime: of the groups that go at once, the one committed first goes first
What: before the submit thread closes a group, each other queue's group that goes now and whose first command buffer was committed before every one it holds goes first (WorkState::goes_before, Fifo::first_committed), and the group right after, before anything more is staged. Why: a command buffer that fills, waits for an event and fills again, on an idle queue, is staged up to its wait into a group that goes only at the end of the pass, as that segment holds no signal. A command buffer of another queue committed after it, which copies what it filled and signals the event, went at its signal, ahead of that group, so its copy read none of the fill. Metal submits the first at its commit and its hazard tracking orders the copy after the fill before the wait (the conformance case event-signaller-of-a-wait, M3 Max, job m3-max-68673). Both groups go now either way; only their order changes, and nothing waits longer. Verified: pending. |
||
|
|
d271b7523d |
Tests: an idle queue's fill before its wait is copied by a later sharer of another queue it sends
What: the device test every_device_copies_an_idle_queues_fill_before_its_wait_into_a_later_sharer_it_sends. On one idle queue a command buffer fills the first half of a tracked buffer with 1, waits for a shared event's value 1, then fills the second half with 3; on another idle queue, committed after it, a command buffer copies the buffer and signals the value, and the host sends it (send_now). The submit thread, parked in a scheduled handler, first looks at the two once both are committed and the second sent. The test checks that the copy reads 1 in the first half and 0 in the second, as Metal's did (the conformance case event-signaller-of-a-wait, M3 Max, job m3-max-68673), and bounds every wait. Why: the conformance case read 0 in the first half on lavapipe (job m3-max-68692): the copy ran before the fill ahead of the wait. Verified: pending (the before-run on lavapipe). |
||
|
|
542ae6d906 |
Runtime README: the corpus's 26 kernels past the stage bound by profile, and two of them filled on three cards
Under "Kernels past the stage bound": the private corpus's kernels compiled for every committed profile with no device hold 26 past the bound on some profile (25 on each NVIDIA, AMD and Intel profile, 26 on moltenvk-m3 and the lavapipe profiles, 24 on runtime-floor). Twenty-four are twelve pairs of equal or near-equal weight from two libraries, row 205's family. The paragraph gives each pair's weights by key, no names. The heaviest kernel (weight 171,236 on the Intel profiles, 205,223 on NVIDIA and AMD) and a lighter kernel with its pair were each filled once in the helper, under the 3,072 MiB cap, from empty caches, at width 32 and at 1,024: - RTX 3090 (job m3-max-68749) and RX 7900 XTX (job m3-max-68750): all six made at both widths; the largest peak is 1,991 MiB (the heaviest at 1,024 on the 3090). - Iris Xe of RPL-P (job m3-max-68748): none made. Five were refused past the cap, the heaviest at width 32 with a 3,129 MiB peak; the heaviest at 1,024 ended on a helper SIGSEGV after 48.8 s at 1,291 MiB. Verified: the weigh is job m3-max-68532 at |
||
|
|
2953064a1c |
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.
(cherry picked from commit
|
||
|
|
d3e0384a43 |
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.
(cherry picked from commit
|
||
|
|
e0dcaaa16c |
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.
(cherry picked from commit
|
||
|
|
730cb55301 |
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 |
||
|
|
e3d30c5101 |
Runtime: the queue cut comes off development until its gates pass; the runtime is f979769faf's with stage input
What: the runtime crate goes back to f979769faf's, plus stage input. Its sources, its tests and api_signatures.tsv now equal those of |
||
|
|
f0b6fff640 |
Tests: the heap-texture pass is sized from the shorter of its first two spans
What: every_device_keeps_heap_textures_read_through_their_indices_past_their_release sizes the pass that samples as its textures drop from the shorter GPU span of the first two forms' one dispatch, not the first's alone, and prints each. Why: the first form's dispatch holds the kernel's first use. On a loaded lavapipe it spanned 2206321 ns, so the pass took 90 dispatches, which ran 7.8 ms at about 87 us each and ended 9 ms before the textures dropped 20 ms after the commit: the assertion that the drop comes before the pass's GPU end failed (m3-max-68726 at 9c7286dd8a, argument_sampling.rs:427). The second form's dispatch, behind long work on the same queue, runs after that first use. A span stretched another way only makes the pass shorter, so the shorter of the two is taken. Verified: see the branch's lavapipe and compile jobs, named where it is handed over. |
||
|
|
5686863157 |
Tests: three device tests hold on a loaded device by their own inputs and structural bounds
What and why, one test each; the runtime does not change. - every_device_schedules_a_wait_for_an_event_s_value_as_it_is_submitted: the two queues' expected runs (BODY_RUN, 1 ms, the test's own input) are set as each round begins, not once before both. Its 60.9 s on a loaded lavapipe (m3-max-68664, command.rs:188) was the test's own room deadlock, not the runtime: round 1's command buffers retire and their measured runs replace the input (QueueInner::ran, rising at once to a longer run). Past 2 ms, round 2's `next` has no room (submit::room: the two runs behind the oldest past GROUP_RUN) while Busy's gate holds every completion, so its submission waits out the 60 s PATIENCE. Each round now prints the runs its input replaces. PATIENCE stays. - every_device_keeps_heap_textures_read_through_their_indices_past_their_release: the pass that samples as its textures drop is sized from the GPU span of round 0's one sampling dispatch, to about 200 ms of run (PASS_RUN), at most the 40,000 dispatches it always took (about 200 ms on an RTX 3090). On a loaded lavapipe the fixed 40,000 ran past PATIENCE at finished() (m3-max-68664, 79.5 s). It now asserts the drop came before the pass's GPU end, so the round is the release while its pass runs that it names, and prints the count it took. - every_device_rates_a_one_piece_command_buffer_without_the_run_ahead_of_it: the short command buffer's rate behind the long one is bounded structurally, its run (one threadgroup: the rate) under the long one's run left as the short one was submitted (end - sent_at, about 20 ms). A pair begun at its submission, or anywhere earlier in the long run, holds at least that much; the right pair holds its own run alone. The bound it replaces, under twice the rate alone, compared two single runs of about 100 us taken milliseconds apart, and on lavapipe the device is the host CPU: under load the rate behind came to 2.26 times (220300000 ps against 97564000 ps alone, m3-max-68647), the run itself, as the pair measured it. The rate alone and the ratio are still printed. Verified: see the branch's lavapipe and compile jobs, named where it is handed over. |
||
|
|
58e9267b6c |
Conformance coverage: the ledger rows the three cards' NaN answers added
docs/CONFORMANCE-COVERAGE.md regenerated by scripts/conformance-coverage/coverage.py after edb361410a added fifteen ledger rows: the ledger count reads 7968 and the gaps table lists the fifteen. Job m3-max-68716 at edb361410a failed only its coverage check on this document (the conformance crate ran 1024 tests, and 1023 passed); its replay on lavapipe read 0 ledger drift. |
||
|
|
59e0a3f7ca |
Conformance: the stage-in fetch case's NaN rows on the XTX, the Iris Xe and the RTX 3090
attribute-format-fetches widens five NaN-bearing attributes (Half, Half2, Half3, Half4 and
FloatRG11B10) in the shader's fetch, and the device keeps its own NaN bits there under
`device-nan-encoding`. The ledger held those five sites for llvmpipe only, so each card's replay of
the case read them as gaps with no row for the card.
The three cards' replays (built at
|
||
|
|
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 |