58f2ab2f2b94875acc900b9e92f61160bb01e4e4
8869
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
58f2ab2f2b |
Private Rustdoc: the eight unresolved or redundant intra-doc links resolve
What: `cargo doc --document-private-items` under -D warnings reported eight diagnostics on
development (306d357141's tree, lint job m3-max-65851). CI's private intra-doc links step holds
each crate at 0. Each is fixed where it stands:
- metal2vulkan:
- lower/arith/libm/mod.rs: Lib::instructions is #[cfg(test)], so the doc names it in code.
- lower/dispatch.rs: arena_slot links KernelDecl::arena_slot, the method it means.
- lower/fragment/fetch.rs: the link to extended_range::Blend::packed16, which no longer exists,
goes.
- lower/mesh/mod.rs: builtins links the BUILTINS constant.
- lower/stage_io/plan.rs: the quoted [[render_target_array_index]] is code, not a link.
- metal2vulkan-runtime:
- stage.rs: TEST_BOUND exists only under the device-test cfgs, so the doc names it in code.
- device.rs: Error::StageUnfilled's explicit target was redundant, since Error is in scope.
- metal2vulkan-conformance: cases/shared_creator_formats.rs: Failure::of links
Failure::of_rt, our side's constructor.
Why: the class of the bug row "rt private rustdoc: 3 redundant explicit links"; main's word to fix
all eight in one commit.
Verified: comments only. The compile job, with each crate's private Rustdoc -D warnings, is named
in the report.
|
||
|
|
87a39975fa |
Arith docs: a denormal, NaN or min/max note is the operation's static note, not one a measurement decides
What: the lower/arith docs said a note was recorded "where the device is not measured to read them as Metal does", or "where the profile lacks the deviation". No device has been measured since |
||
|
|
28d614f175 |
Probe bgra4_write_and_mipmap: its header says what the runtime does with the three answers today
What: the probe's opening paragraph said the runtime held no measurement of BGRA4Unorm's three
answers, that write_conversion answered Unmeasured, that the word view had no entry for it, and
that the mipmap refusal "stands until this runs". It now says what the code does, from a code
read:
- write_conversion holds each channel as HalfUnorm { bits: 4 } (the WRITE leg). A device that
renders the image converts the output itself, under the static DeviceColorConversion note.
- BlitCommandEncoder::generate_mipmaps takes the format like every float colour format: one linear
vkCmdBlitImage a level under DeviceFilteredMipmaps, and Gap::MipmapFilter where the optimal
image has no blit source, blit destination or linear filter. Nothing refuses it.
- WordAttachment::layout holds the word (red 8, green 4, blue 0, alpha 12). The R16_UINT view
builds no blend other than one and zero, and a colour input is NotImplemented(Format), though
the FETCH and BLEND legs measured Metal taking both.
The "What each reading licenses" section goes. It named items that no longer exist
(mipmap_answers.txt, mipmap_plan::not_implemented, bind::mipmap_filter,
framebuffer_fetch::renders_through_words, RowState), and the header now says what each reading
backs. The answered section's last clause, "the fallback was NOT taken", becomes "the word view's
refusals of both are our gap", which is true today.
Why: the bug row "The probe comment in bgra4_write_and_mipmap.m still says 'the refusal stands
until this runs'".
Verified: code read only (metal/format/mod.rs write_conversion, metal/format/word.rs,
pipeline/color_writes.rs word_color, lower/stage_io/color_write.rs, lower/fragment/color.rs
select_param, metal2vulkan-runtime blit.rs generate_mipmaps, mipmapped and filtered). Comment
only. No build reads the .m file.
|
||
|
|
306d357141 |
Bless at the pin, cb7168fba7: golden hashes, the census under executor ABI v212, dsx_lane_reads' printout and the render descriptor key
The zero-sink private-store form ( |
||
|
|
4a636f1b85 |
rt README: a long Shared buffer's make against a Mac's first write; NVIDIA's dedicated allocations
Two known-gap rows, the planner's (11-21), with no change of behaviour. - After the paragraph that says a new Shared buffer's zeros are written inside Device::new_buffer: the in-guest rows. Making a new 547 MiB Shared buffer and writing it once, the first three in a process, took 191.2, 152.6 and 146.3 ms on an RTX 3090 (job m3-max-65737) and 252.3, 110.0 and 106.7 ms on a Radeon 780M (job m3-max-65736), against a Radeon Pro 5300M Mac's make of 0.179 ms and first write pass of 221.27 ms (job m3-max-65625). The planner closed the pool-take row as placement only on these rows. - In the NVIDIA allocation paragraph: device-local memory dedicated to its buffer allocates 7 to 30 times as fast and frees 5 to 20 times as fast on the RTX 3090 (job m3-max-65734), and why the runtime's pool allocations stay plain (they hold textures, VUID-vkBindImageMemory-memory-10926; no faster with its first fill on a Radeon 780M or an Iris Xe, jobs m3-max-65776, m3-max-65785). The planner closed the dedicated form with no build. |
||
|
|
cb7168fba7 |
Validation: the kernel case of dsx_lane_reads reads only lanes that take its branch
simdgroup-and-quad-moves-in-a-branch-of-the-even-lanes-of-a-kernel made its eighteen moves in a branch only the even lanes take, and most of them read an odd lane, which is inactive there. MSL 4.1 section 6.10.2: "A thread needs to only read data from another active thread in the SIMD-group", so those words were undefined Metal. On lavapipe 46 of the 1,152 words differed (simd_shuffle_up(x, 1) and quad_shuffle_up(x, 1) from an even lane), with no precision note to explain them. A case defect: no translator change, no venue row. Every move now reads an even lane, or keeps its own value past the group's edge: lane ^ 6, xor 2, up 2, down 4, rotate up 2 and down 2, broadcast lane 20, the fills by 2, and in the quad q ^ 2, xor 2, broadcast 2, up, down and both rotations by 2, the fills by 2. The vertex entries are unchanged; their IR is identical in the regenerated module. The module is shared, so every case over it is re-keyed to its new AIR (8947c1ec...): the six vertex cases and the kernel case (ff55fa41... -> 299bfb13...), each re-qualified on the Apple M3 Max (job m3-max-65801: regen with Apple metal 32023.922 / macOS SDK 27.2, corpus-case-check --install, corpus-metal x3 runs each, all rc=0). The kernel case's Metal output equals the moves' documented answers on all 1,152 words (checked off line against MSL's definitions). Bless due on development: dsx_lane_reads' golden rows (changed input: the module hash of all seven entries in both companions, the kernel entry's cells) and the authored compile census (seven re-keyed case ids). |
||
|
|
25abaea784 |
Validation: a mismatch under notes stays well formed; tests over public answer gaps
The validation suite at 995de45572 (job m3-max-65797, 5 of 1,334 failed) found: - The committed Vulkan observations of older executors (v176, v182) hold mismatches under unbounded notes, recorded before the noted status existed. The row contract refused them, so the store layout tests failed. Such a row is stale by its executor ABI, not malformed: the contract now requires only that held_open_by name a difference that could be noted. A noted difference still needs differing bytes, an unbounded class, no escaped target, and no gap. The executor (difference_status) is unchanged and records Mismatch under notes only with held_open_by. - One C3 answer-gap entry (quads_split_by_clipping) is a private case, which a public checkout cannot check: the difference_status test now judges the entries over public fixtures (at least 5). - A C3 test turned a noted row's class to Exact without its status, and the narrowed report test lacked the noted_difference column. Verified: not at commit time; the suite reruns on the branch tip. |
||
|
|
5d143de078 |
Validation: a difference under precision notes is a noted difference, counted apart
A candidate row whose bytes differ from Metal's under a comparison class unbounded by
precision notes was recorded Mismatch, so the public lavapipe batch counted 186 mismatches of
which 185 carry a note that can explain a difference, and a new mismatch would hide among
them. Such a row now records CandidateStatus::NotedDifference: never a match, never accepted,
and saying no more than that the row differs and its notes can explain a difference. It is
counted in its own column: the batch outcome and class noted_difference (batch-report,
batch-family, batch-scope, batch-summary), the evidence state noted_difference in
corpus-status. Mismatch stays for an exact class, a difference past a bounded table, and an
out-of-bounds target that escaped.
The owner's decision of 2026-10-06 stays: a case the C3 reviewed list holds under an answer
gap its structure meets (AnswerGap::met_by) keeps Mismatch, and the row names the gap in a new
field, held_open_by, which the executor's verdict line and the batch-run line print.
ReviewedList::holding_open is that rule, shared by C3's report (with the venue's device) and
the executor (candidate::engine::difference_status, with the case's structure alone: the
runtime path has no profile to ask which devices have the gap, so a listed case's difference
is a mismatch on every device, which hides none). C3 reads a noted difference as a mismatch,
so its verdicts do not change; the fast-math regrouping reading keys on "differs" instead of
"Mismatch".
The row contract enforces the vocabulary: a noted difference needs differing bytes, an
unbounded class and no escaped target, and no held_open_by; a mismatch that could be noted
needs held_open_by. comparison.rs's contract sentence now reads that a difference is never a
match: under notes it is a noted difference (unless an answer gap holds its case open), else a
mismatch.
Executor ABI vulkan-engine-v211 -> v212 (the recorded status changed): every recorded
candidate row is stale until rerun. Bless due on development: the authored compile census,
which keys on the executor ABI.
Tests: the row vocabulary (observation), classify and the report's column and held_open_by
line, install of a noted row (vulkan_batch), and difference_status over every committed C3
answer-gap entry (each stays Mismatch naming its gap) and a public case the list does not hold
(a noted difference).
Verified: not at commit time; the compile job and the validation suite run on this sha.
Verified with the two commits after it (the suite fixes and the ff55fa41 case fix), at their
tip 611f45a559 on development
|
||
|
|
6cf6ee19d0 |
rt: time a texture's and an exported surface's make by part
Seven new Metrics parts, each a Timed as the take's parts: image_creates (vkCreateImage of a texture's, a shadow's and a surface plane's make), image_binds (vkBindImageMemory of those images), image_view_creates (every vkCreateImageView), texture_place_lock_waits (a texture placement's wait for the arrays' lock), home_lock_waits (a new texture's, shadow's or acquired drawable's wait for the work lock in Work::home), surface_allocations (an in-place surface's exportable vkAllocateMemory) and surface_handles (each export of its handle). Counters only: no policy, no switch. README parts list and api_signatures.tsv updated. Tests: make_parts (a texture made at an index is one call of each texture part; an in-place surface of one plane adds one allocation and one or three handle exports). A texture's place in a texture block is not among the takes: only a texture block that the place takes is; the place itself, under the places lock, is untimed (README). Why: on the RTX 3090 (consumer walk m3-max-65677) 25 of 96 makes of 1 ms or more showed no part rising on any thread; these parts time what such a make does that no part timed. Driver calls made under a runtime lock, seen while adding the timers (no locking changed): the arrays lock across vkUpdateDescriptorSets (Arrays::place_texture), and the work lock across Upload::begin's vkCreateCommandPool, vkAllocateCommandBuffers, vkBeginCommandBuffer, vkCreateQueryPool, vkResetQueryPool and vkCmdWriteTimestamp2 (Work::home). A lock wait counts in the waiting make's own part; the holder's time is in no part. Verified at f6c36e2e91: compile job m3-max-65788 (fmt, signatures, refusal surface, clippy plain / --cfg m2v_gpu / --cfg m2v_cpu_icd, workspace Rustdoc -D warnings, api-docs) green; the runtime suite on lavapipe 637 passed, 3 skipped, the make_parts tests with opaque-fd and dma-buf surfaces made in place. The README sentence fix on top is not compiled or read by a test. |
||
|
|
ed872f4dd2 |
Re-pin the runtime sources at the landing tip
The landed packet changed a runtime-sources input, so the committed digest no longer described the sources and `the_runtime_sources_are_the_committed_ones` would fail. Recomputed over the same inputs and committed by land-pkt.sh. |
||
|
|
b4a7c175d4 |
A guarded private-arena store reads and writes its word through one pointer
A contained store into the private arena (each word written at select(inb, word, 0) as select(inb, value, old)) took one access chain for its read of old and another for its write, so a word store at a run-time index cost 13 instructions on the device arena, over the 11 its shape was bounded by (engine_device_arena, suites job m3-max-65682 on the RX 780M Hawk Point profile). ArenaMem::write_or_keep now loads old, selects and stores through the one pointer, and KeptMem's form of it keeps the kept-cell branch of its plain write. A partial word already took one pointer (ArenaMem::write_bits). The shape's bound is now 12, the word load's: the store reads the word it writes, which is what dropping its two blocks costs (the test's module docs). SEMANTICS_VERSION 2267 (modules change). Tests: engine_device_arena's shapes, each within its bound and adding no block on every identity profile; engine_arena's run-time store through the interpreter. Measured: one kernel, 16d856fc, of the table capture; cold; through the runtime's helper form under the consumer's cap; validation layer and driver shader caches off; arms alternating in one exclusive job a card. Arm A is the pin |
||
|
|
00ee1bd86f |
Runtime test private_sinks: the NaN kernel's stores past its arrays have names of their own
The NaN case's two stores at k reused %pa2 and %pb2, the names of element 2's pointers, so llvm-as refused the module (multiple definition of local value 'pa2', lavapipe job m3-max-65711). |
||
|
|
cd0dce11b5 |
A contained store into a thread's private memory rewrites what it does not address, with no branch
A contained store whose bytes are not all in bounds used to sit in a builder-closed if_, two
blocks a store. A store into a thread's own private memory now always runs:
- private arena (a Private array or a slot in device memory): each word it writes is written at
select(inb, word, 0) as select(inb, value, old), old read from that word first, and a partial
word's mask is select(inb, mask, 0). Out of bounds it rewrites word 0 with word 0's own bits.
- typed alloca: a checked store takes each dynamic index past its level as 0 (as a checked load
already did) and writes select(ok, v, old), old the element at those indices, read first.
The private arena and a typed alloca are the thread's own, so no other invocation writes the
element between the read and the write. Threadgroup and payload arena stores keep their if_: an
invocation rewriting a shared word's old value would undo another's write (the module docs).
Nothing is added to the thread's memory and the plan's private bytes do not change. A store with
no old-value read (the clamped index written unconditionally) is not used: it would overwrite a
live element.
This replaces the sink form (steelbrain/storesink: cd68dd4c8e, 0e178ee64a, 9aeed12ecf,
ad85331cb2, dead, not landed), which wrote past the object and so added bytes to the plan.
SEMANTICS_VERSION 2266 (modules change).
Tests: a run-time store into the private arena and into a typed alloca adds no block and changes
no word (CPU interpreter, engine_arena); each device-arena access shape adds no block
(engine_device_arena); on each device (runtime private_sinks), stores inside two private arrays
of 4 and 2100 words answer what the M3 Max answered for the same steps (probe
private_sinks.m, job m3-max-65609), stores past them answer what the same kernel without them
answers, and element 0 keeps the bits of a NaN with payload bits (quiet, signalling and negative)
with a store past its array.
Standing condition: at the pin carrying this form, the consumer's cold launch lines on the RTX
3090, the RX 7900 XTX and the 780M give render seconds (first sample to quit, same scene, 64
samples) against the same span at
|
||
|
|
2d12a2be0b |
AGENTS.md rule 2: eight query-chosen second forms; the driver-zeroed clause goes
The owner, Telegram 2599 (20:29 PST 11-21, through the relay), verbatim: "Re 98, I accept". Item 98 put to him rule 2's text and this edit: "nine" becomes "eight", and the clause on driver-zeroed memory is removed. Nothing else in the file changes. The form left the code in |
||
|
|
fee1d03dd4 |
rt README: a driver's allocation also holds another thread's allocation
The paragraph on a driver holding the device's other calls during an allocation gains the allocation case, measured by a standalone Vulkan program of ours on the RTX 3090 (NVIDIA 620.70.06), exclusive job m3-max-65667, 31 rounds with the arm order reversed every other round: a 2,621,440-byte dedicated exportable allocation begun 1 ms into a 547 MiB Shared allocation took 85.3 ms median (57.8 us alone), begun 1 ms into that allocation's free 111.4 ms, and begun 1 ms into a 547 MiB Private allocation 15.3 ms; two such allocations begun together on two threads took 1.7 to 3.0 times the sum of their times alone, from 2.6 MB to 547 MiB. The probe's threads share no lock of ours, so the hold is the driver's; rt's export path takes no lock across vkAllocateMemory either. This closes the consumer's overlapping exported-surface and exported-block makes (15.73 and 14.57 ms) as the driver's serialization. Verified: docs only; the workspace docs check runs at development after the landing. |
||
|
|
11d5186b5d |
rt README: on ANV a guest's kernels of entry weight 355,578 to 424,132 are refused at the helper's cap
A known gap of pipeline states. On a host whose Vulkan driver is Mesa's Intel one, two kernels past the stage bound are refused (Gap::StageSize) where Metal makes them: on the Iris Xe of RPL-P under the packaged Mesa 26.2.6, their helpers passed the 8 GiB cap 34 s and 51 s into the compile (job m3-max-65470). The measuring build (Mesa 26.2.6 with count prints and a heap census) let the lighter one run on to past 18 GiB resident, unfinished at 840 s (job m3-max-65511); the stock driver's time past 8 GiB is not measured. The line names the two compiler costs by their Mesa 26.3.1 source lines: the liveness analysis's six per-block bitsets over all virtual registers (4,972 MiB, then 9,549 MiB, for the heavier kernel, job m3-max-65588) and the register allocator's interference graph, whose node capacity doubles once spill nodes pass it (3,124 MiB for the lighter kernel's 228,938 nodes, then 12,498 MiB, job m3-max-65511). The composition read on the same card (job m3-max-65631) put the address arithmetic our lowering emits at 42,678 of the heavier kernel's 270,067 allocation nodes (15.8%), under the third that a form of ours would need to bring it within the cap, so this is recorded as a known gap. Verified: a docs-only change; the workspace Rustdoc check with -D warnings runs as its own job. |
||
|
|
35fe287776 |
Validation: a sample count the runtime makes no texture of is the device's not_enabled
A kernel case through the runtime that binds a multisampled texture of a sample
count the device's image format query lacks failed with free text ("texture 0:
a sample count of 2 is not among the device's (0xd)"): runtime_error took the
runtime's Limit::TextureSamples as any other error. The executor's own context
refuses the same texture typed (NotEnabled, from the same query), and the run
through the runtime already records a pixel format it makes no image of so.
Now Limit::TextureSamples is NotEnabled too, naming the texture, so the case
records a typed refusal on a device without the count and runs where the device
has it. On llvmpipe (sample counts 1, 4 and 8) that is the two public cases
3cadd32e61a4 (four-multisample-reads-at-two-samples) and 505599ae1551
(size-queries-of-multisampled-buffer-and-depth-cube-textures), which failed
before (job m3-max-65594).
- runtime: runtime_error maps Limit::TextureSamples to NotEnabled.
- engine_textures: a_sample_count_the_device_lacks_is_refused_as_not_enabled
(was ..._before_any_image) runs the case on each run, the own context and,
on Linux, through the runtime, and asserts NotEnabled naming texture 1 and
its 2 samples on both (the runtime arm failed with free text without this).
- docs/VALIDATION.md: says so.
These cases recorded no row before, so no recorded row observes the change; it
rides vulkan-engine-v211, the bump of the parent commit.
Verified before this commit: the two failures, on llvmpipe (Mesa 26.2.4) at
|
||
|
|
81eb5e3826 |
Validation: a texture-buffer out-of-bounds target through the runtime lies between guards
The run of a kernel case through the runtime made each texture buffer over an unguarded buffer (Placed::new), so a target of the texel buffer form recorded no guard count (escaped and past_end None). out_of_bounds::guarded() names every such target guarded, so matches() failed contained_in_guard and called equal bytes a Mismatch, which validate_content then refused as contradicting the equal hashes. Since texture buffers moved to the runtime ( |
||
|
|
0631f3432a |
Census bless at 2a3cc1cf47: the runtime's enables, nine profiles
The authored-compile census re-blessed on the M3 Max in job m3-max-65642 (corpus-triage --audit authored-compile --bless, cold: 2376 cases x 9 profiles, 21384 cells, failed=0). Every move is the enables move |
||
|
|
7f3a917d3a |
Bless at 2a3cc1cf47: golden table, engine inventory, opened chains; the census drops amd-rdna3-radv
The pin's one bless, run on the M3 Max (macOS 27.0.1, xcrun metal-as, llvm@21) in job m3-max-65624 at development |
||
|
|
2a3cc1cf47 |
validation: the runtime's command shape raises indirect_indexed_draws in the contract test
What: executor_contract::tests::engine_case_families_follow_the_case_literals asserted that the runtime's indirect command shape raises nothing. It now asserts that the shape raises indirect_indexed_draws alone. Its comment says the engine's candidate does not map the shape. The test already holds every departure from the shape to its runtime limit, so the case test the_runtime_s_command_shape_is_a_typed_gap_of_the_engine_candidate drops its own two departures and keeps the typed refusal and the checker's gap. unsupported_observation_requirements, a public item, linked to the private replay_observes_commands, which workspace Rustdoc -D warnings refuses. It now links case_requirements. Why: job m3-max-65502 at 4ffd256717's previous base (277e388fe0) failed these two: doc (one private-intra-doc-links error) and that one validation test. fmt, signatures and clippy plain, --cfg m2v_gpu and --cfg m2v_cpu_icd were green; m3-max-65550 then passed all 1333. Verified: m3-max-65550 and m3-max-65585, as the commit before says. |
||
|
|
38104834d4 |
validation: indirect_indexed_draws names the runtime's command shape the executor does not map
What: one requirement row, ToolingRequirement::IndirectIndexedDraws ("indirect_indexed_draws"),
stops the engine's candidate. It is this crate's gap (Limit::Tooling). Its structural check in
executor_contract::case_requirements matches an indirect command buffer of the one shape the
runtime builds, which no runtime-limit row names: render commands of indexed draws alone that
inherit the pipeline state and bind their own buffers, with no command the host encodes. Every
other command buffer already carries indirect_compute_commands, indirect_draw_types,
indirect_command_inheritance or host_encoded_indirect_commands, and a pipeline state in an
argument buffer carries argument_buffer_pipeline_state.
The free-text NotImplemented in candidate::engine::compute_case and graphics::stage_resources
("an indirect command buffer or a pipeline state in an argument buffer") is deleted. Both run
after require_case_families, which now refuses every such case typed, so a case of the
runtime's shape meets NotSupported::Requirements({indirect_indexed_draws}). Since the row is a
tooling gap, the checker's evidence_gap also takes no case of it ("engine_candidate:
indirect_indexed_draws (the candidate is stopped)").
The contract sentence of replay_observes_commands said both executors execute a case's
commands after its producer. It now says the Metal oracle does and the engine's candidate
executes none, naming the row. The same claim in unsupported_observation_requirements is
corrected the same way, and so are compute_case's doc (it no longer lists command buffers and
pipeline states among what it runs) and docs/VALIDATION.md (the runtime's form carries the row,
no longer executor_not_implemented).
Why: one vocabulary. The runtime-built shape was the only indirect command buffer the
vocabulary did not name: it met a free-text refusal.
Not built: mapping the runtime's shape through the runtime's indirect command buffer. Its
trigger is a guest count. No guest reaches an indirect command buffer today, because the
consumer refuses the creation. The row's doc records the trigger.
Versions: the classifier's analyzer_version goes from structural-triage-v85 to v86 (the
meaning of a replayed module's case changes: only the Metal oracle executes it). requirement.rs
and executor_contract.rs are classifier inputs, so the key changes with them too. The
executor ABI does not move: no committed case reaches the deleted arms.
Expected census moves, at the next named pin, not run here: none.
- Authoring-capability census: the row comes from a case's literals alone, never from a
source's structure, so no census row carries it. The full reclassify that the version bump
forces should give the same counts.
- Authored compile census: none of the 29 command buffers in the committed cases has the
runtime's shape (all 25 cases with one already carry a runtime-limit row, see
committed_command_buffer_and_pipeline_state_cases_refuse_by_their_requirements), so no cell
moves.
Tests: requirement::the_runtime_s_indirect_command_shape_stops_the_candidate_as_a_tooling_gap,
and case::tests::indirect_commands::the_runtime_s_command_shape_is_a_typed_gap_of_the_engine_candidate.
The second checks that the shape carries the row alone, that the checker names it as an
evidence gap, and that compute_case refuses it typed. It also checks that leaving the shape
(buffers inherited, or draws of primitives) carries the runtime-limit row instead.
Verified: m3-max-65550 (these two commits on the pre-enables base 7e080082cf): fmt,
signatures, clippy plain, --cfg m2v_gpu and --cfg m2v_cpu_icd, workspace Rustdoc -D warnings
green, validation 1333/1333; m3-max-65585 at 9e3e484a8a on
|
||
|
|
0b5f23ac86 |
device tests: 13 committed profiles list VK_EXT_provoking_vertex after the RDNA3 deletion
What: render_features_follow_each_source and the_provoking_vertex_mode_per_pipeline_follows_each_source counted at least 14 committed profiles that list VK_EXT_provoking_vertex (and state provokingVertexModePerPipeline). Both now count at least 13. Why: 97352e8059 deleted amd-rdna3-radv, one of the 14 profiles that listed it. Counted in the committed files: VK_EXT_provoking_vertex 13 (was 14). The other counted extensions stay above their bars: depth_clip_enable 13 (bar 10), depth_clamp_control 10 (5), primitive_topology_list_restart 13 (10), sample_locations 14 (10), multi_draw 13 (10). Verified: job m3-max-65518 at 97352e8059 failed both tests with "13 profiles list ExtProvokingVertex" and "13". Its rerun follows. |
||
|
|
d41d412bed |
validation: the runtime sources' hash after the RDNA3 profile's deletion
What: runtime-sources.sha256 becomes 03fe65203d91ea8e368a09c2a44588c9409469aca180deedb3401852a679d30b. RUNTIME_VERSION does not move. Why: 97352e8059 changed one runtime input, crates/metal2vulkan/src/metal/format/word.rs. The change is in its test module only: the profile stem of one test, amd-rdna3-radv, became amd-780m-radv. No non-test code changed, so no behaviour of a run changes; only the hash moves. Verified: job m3-max-65524, at a tree holding 97352e8059, failed candidate::engine::artifact::tests::the_runtime_sources_are_the_committed_ones with exactly this hash as the build's own (now) and the committed 19151ccb... as the old one. Its rerun follows. |
||
|
|
072eaaba18 |
profiles: delete amd-rdna3-radv, whose every cell is the Radeon 780M's
What: the RX 7900 XTX capture amd-rdna3-radv derives the same translation fingerprint as amd-780m-radv: the Radeon 780M and the RX 7900 XTX under one RADV build. So every golden and census cell of the profile equals the 780M's ( |
||
|
|
af97fa1bee |
Validation: a context member's field name is read by the tests alone
With the old executor's list and `named_member` gone, `Member::name` is read only by the enables tests (their messages and the opened-chains rendering), so it is `#[cfg(test)]`, as `Member::registry` is. Clippy -D warnings refused it as dead in job m3-max-65544 (all three configurations). Left for lane unshipped's item (5) (the robustBufferAccess / robustBufferAccess2 choice): coverage/tier_table.rs still compiles stated profiles for its robustness containment legs; this move does not change it. Verification: none at this commit; its compile job follows. |
||
|
|
a2ad41850e |
Validation enables what the runtime enables, from the runtime's own tables
What: one definition of the enabled set. The runtime gains one public function, `metal2vulkan_runtime::floor::enable_set()`: every feature and extension of the translator's vocabulary that device creation enables on some device (its ENABLED groups' named features and its creation extensions), and `shader_enables` reads the same iteration. Validation's `engine::runtime_enables(description)` keeps of a description what that set holds (plus the features that have no member at the runtime's Vulkan version and the extensions exposing kept features) and `engine::runtime_description(stem)` reads a committed profile at the runtime's version restricted to it. The engine context's list (`engine_list`) is that set; NOT_ENABLED, the old executor's list, `Enables::copy`/`expose` and the unnamed members loop are deleted. The authored-compile census, `corpus-pipeline` and `load_device` compile for `runtime_description`. Why: validation executed, and the census reported, forms the runtime never ships: the ordered framebuffer fetch on lavapipe, ray query and acceleration structures with deferred host operations, float atomic add, OpFmaKHR, buffer robustness and others the runtime's floor tables do not enable. Tests: a runtime test that `enable_set()` equals what `shader_enables` derives on a device with every ENABLED feature and every creation extension; a validation test that no committed profile's context (device and restricted) enables a member or extension outside the set, ray query, acceleration structure and deferred host operations named. docs/VALIDATION.md states the four places where the census's reading differs from the runtime's own answer for a device. ENGINE_EXECUTOR_ABI vulkan-engine-v209 -> v210. Verification: none at this commit; its compile, suite and census jobs follow. |
||
|
|
591f813569 |
REFUSALS.md: a rate map outside the compile's measured bounds is ours
docs/REFUSALS.md section 4 showed '-' for its five rows (UnpinnedCompile: ScreenExtent, LayerCount, DenseSamples, SampleOutOfRange, SampleCount). The code says the basis: each is built in one place, `RasterizationRateMap::new` (bind/rate_map.rs), through `RateMapError::Unpinned`, which refuses a descriptor outside the bounds where Apple M3's compile was measured, and the enum's own doc states "The bounds are this crate's, not Metal's". So the script derives `ours` for the section, as it does for the translation caps and the deadline. No row of another section moved. Every section's '-' total is now 0. Verified (locally, source-reading scripts): refusal_surface.py --check and --selftest pass. |
||
|
|
bf6eee3e03 |
Front end: an unmodeled function stage is refused as Unsupported, not as invalid input
`unsupported_stage` (abi/check.rs) built `Error::InvalidInput` holding
`InputErrorKind::Unsupported(Feature::Stage(tag))` itself, where the front end's other four
refusals of what it does not implement go through `From<InputError>`, which makes them
`Error::Unsupported`. So a metallib's intersection function (container TYPE 6), or one of a
stage tag the model does not know, reached the translator and the runtime as malformed input:
the runtime's Error::basis answered None for it, not ours. It now goes through the same `From`:
`Error::Unsupported(Stage(tag))`, NotImplemented, which the runtime answers as ours. Nothing
else moves; docs/REFUSALS.md already listed it as a NotImplemented refusal.
No persisted outcome records this error's class, so no SEMANTICS bump:
- the runtime's cache directory: its refusal marker (cache.rs `REFUSED`) is written only for an
Unsupported variant of a kernel whose plain module lowered (pipeline.rs `lower_variant`, and
the GpuEncodedIndirectCommands arm), which a stage refusal never reaches since it fails the
plain compile; the marker holds no class either;
- the authored compile census (corpus/authored-compile.tsv, 2385 lines): no invalid_input cell
and no Stage refusal;
- the golden tables (golden_hashes.tsv, public_fixture_expectations_engine.tsv): no InvalidInput
cell and no Stage cell. Their fixtures are bitcode modules, which the container check never
reads;
- the validation index: the committed observations (corpus/observations) and the cutover lists
(cutover/*.json) hold no Stage outcome; their one invalid_input row is
Canon::CallTypeMismatch. The per-host index and translation census are keyed by the product
fingerprint (translation_audit.rs), which this source change moves.
The front end's test of the stage check now asserts the refusal is Error::Unsupported naming
Stage(tag).
States-only play before landing (job m3-max-65497, lavapipe, commits 2-4 on
|
||
|
|
dd150e4f46 |
Delete the 14 Feature variants and 3 Needs variants nothing builds
Nothing in the product crates built these 14 Feature variants: SamplePositions, TextureSize,
TextureSampleCount, TextureView, MipmapGeneration, HostMemory, GpuTimes,
ViewFormatReinterpretation, SeparateMultisampledDepthStencil, SparseTextures,
TimelineSemaphores, HeapTextureTiling, UndeclaredTextureUsage and RenderTargetSize. They were
refusals of the runtime this tree cut over from, and so they were docs/REFUSALS.md's last 14 '-'
rows. Nothing built the Needs variants DeviceCapability, MetalGpuFamily and MetalRefuses either,
nor called their constructors Unsupported::device_capability and Unsupported::metal_gpu_family
outside tests. No doc or test showed one to be the vocabulary of a Metal refusal anything
answers: the three Feature docs that said the runtime answers MetalGpuFamily or MetalRefuses
were corrected in the previous commit.
Searches:
- The tree, outside the definitions, the reach rows and the generated tables:
- Feature::SeparateMultisampledDepthStencil in one translator test
(bind/depth_stencil_copy/tests.rs), now Feature::StencilExport, since
depth_stencil_copy_modules refuses with whatever feature its caller names;
- Feature::SparseTextures, SparseNeed and Unsupported::device_capability in one conformance
test of verdict::device_gap_of's DeviceCapability arm. That test pinned a chain from the
runtime's `sparse_refusal`, which no longer exists, so the test and the arm go together;
- Unsupported::metal_gpu_family and the three Needs variants in error/tests.rs
(one_of_each and the retry table);
- the golden and public-fixture tables' refusal cell (golden_hashes.rs, public_fixtures_engine.rs)
named the other Needs through a wildcard arm, now unreachable: the three arms are the cell;
- stale prose naming them in conformance cases/sparse_heaps.rs, probes/bgra4_write_and_mipmap.m,
the engine fixtures README and docs/API.md (its TextureSampleCount sentence now names the
runtime's Limit::TextureSamples, which refuses that texture);
- the payload enums SparseNeed and LinearNeed are used by nothing else, and go too.
The other hits for these names are other enums' variants (the runtime's Limit::TextureSize,
Refusal::TextureSampleCount, Gap::TextureView, ImportHandle::HostMemory, ...).
- The consumer's checkout at bd9d6ae85a: 0 hits for Feature:: with any of the 14, SparseNeed,
LinearNeed, Needs::DeviceCapability, Needs::MetalGpuFamily, Needs::MetalRefuses,
metal_gpu_family or device_capability( (its own `Piece::SamplePositions` and
`Piece::SparseTextures` and its own HostMemory types are unrelated).
Needs is now AnyOf, NotImplemented and NotRepresentable; Needs::basis answers Device, Ours and
Device for them. The script drops the two constructors and their condition texts.
docs/REFUSALS.md: section 1 is 119 variants, every one with a site and a basis (device 51,
ours 68, '-' 0). api_signatures.tsv: 35 records removed, all in metal2vulkan::error; the public
surface table loses SparseNeed and LinearNeed.
Verified (locally, source-reading scripts): refusal_surface.py --check and --selftest pass;
signatures.py --check passes after --bless.
|
||
|
|
dff8c48964 |
device tests: the RX 7900 XTX capture shares the Radeon 780M's fingerprint
What: fingerprints_distinguish_committed_profiles lists ("amd-780m-radv", "amd-rdna3-radv")
among the committed profiles that share a fingerprint, and its comment names the pair: the
Radeon 780M and the Radeon RX 7900 XTX under one RADV build (Mesa 26.2.6).
Why: since amd-rdna3-radv is a capture of an RX 7900 XTX (883faa2d62), its derived
description equals amd-780m-radv's in everything a translation reads. The test's own first
assertion checks exactly that (the two descriptions with identity and allocation sizes cleared
are equal) and passed; only its list of expected pairs was red.
So the rdna3 cells of the golden table and of the authored compile census take the 780M's
fingerprint at the next pin's bless, not the 9 sample-count cells and Navi 31 feature moves
883faa2d62's message expected.
Verified: job m3-max-65469 at 883faa2d62 (host suites) failed this test with exactly the new
pair as the one difference, and golden_hashes_match_the_table as stale with 1861 cells under a
changed profile fingerprint (a bless item). Its validation suite passed (1331 tests, 3
skipped). This commit's own run follows.
|
||
|
|
aecdc8ee84 |
profiles: amd-rdna3-radv is a capture of an RX 7900 XTX, with per-format sample counts
The RDNA3 census profile was a gpuinfo report (51898, an RX 7800 XT on Mesa 26.2.3). Such a report holds no VkImageFormatProperties, so the profile stated no color attachment format's own sample counts, only the device-wide framebufferIntegerColorSampleCounts, which RADV states as 1x. The authored compile census therefore refused integer color targets above 1x on that column (RasterSampleCount needs FramebufferIntegerColorSampleCount(N) | ColorAttachmentSampleCount(format, N)), 9 cells. amd-780m-radv, the same driver measured, compiles all 9, and the runtime on a real RDNA3 card queries each format's counts itself. The profile is now a local capture of a card we run, made as the other local captures are: `vulkaninfo --json` and its `corpus-vulkan --capture-formats` supplement on an AMD Radeon RX 7900 XTX (RADV NAVI31, Mesa 26.2.6, job m3-max-65462; device queries only), converted by scripts/regen-device-profiles (--offline, the pinned vk.xml). Its m2v_color_attachment_sample_counts states 70 formats, R32_UINT and R32G32B32A32_UINT among them at 1, 2, 4 and 8 samples. The SOURCES entry and the profiles README row say so; no venue names the profile. The c3 test that refuses a gpuinfo report under a venue now names amd-rdna2-apu-radv, a gpuinfo profile still. Bless items, at the next pin and not here: the golden table's amd-rdna3-radv cells (the profile's fingerprint moves), the authored compile census's amd-rdna3-radv column (the 9 sample-count cells are expected to compile, and other cells move where Navi31 under 26.2.6 states other features or limits than the old report), and the opened-chains pin's two amd-rdna3-radv contexts. |
||
|
|
3e7a7c1e34 |
Translator: the builder's growth is charged inside a block, and its doublings before they are reserved
The SPIR-V builder cannot hold the meter, so the walk charged the builder's growth after each AIR
block's code. That left two gaps.
- One block could grow the builder by any amount before its charge. On the heaviest kernel of a
guest library (Iris Xe profile), the module-wide value table (one 16-byte entry per result)
doubled from 16 to 32 MiB inside one block.
- The entry hooks' code and the walk's variables (6.0 MiB there) were charged only once the walk
returned.
Together, the attempt held 21.8 MiB more than the ledger counted at one point (probe job
m3-max-65302, GPU-free, release).
Now:
- structurize::emit::Poll holds the walk's meter and growth. The emitter counts each instruction
of a block's code on it: CodeEmitter::block and block_live take it, and lower::Emitter counts
in block, segment and synchronization.
- The walk charges once its variables are allocated, after each block, and every 16 counted
instructions. Each charge counts the builder's footprint plus what the next 4,096 results,
blocks and open-block instructions reserve (FunctionBuilder::footprint_ahead): the doubling of
the value table, of the block table, and of the open block's instruction storage, wherever
4,096 more would pass the capacity. A doubling is on the ledger before it is reserved.
- What is charged ahead and not reserved stays charged (the ledger keeps the high-water mark)
until the builder grows into it.
- The walk's growth starts from what the caller charged: lower::emit charges the hooks' code
before the walk.
Nothing emitted changes. The modules, the refusal classes and the work units are the same; only
when the ledger counts the builder moves.
Verified:
- New test ledger_resident::a_long_block_s_code_is_charged_while_it_grows: one block of 8,000
bfloat operations, under ledger caps of one to seven eighths of its 22.6 MB peak. Each refusal
holds at most the cap and a ninth.
- Red on development (job m3-max-65388): under the 5.65 MB cap, the refusal came with
16.76 MB held, the block's whole code.
- Green here (job m3-max-65425): 3.88 MB held under the same cap.
- Compile job m3-max-65425: fmt; clippy plain, --cfg m2v_gpu and --cfg m2v_cpu_icd; workspace
Rustdoc -D warnings; the metal2vulkan and metal2vulkan-air suites, golden hashes and the render
descriptor key among them.
- Both guest libraries, every kernel lowered plain and with partial threadgroups on its library's
profile: 252 rows in job m3-max-65424 against m3-max-65302.
- All 252 translate. Every module hash and every work count is equal.
- The heaviest row's ledger peak stays 440.2 of 450 MiB. Other peaks rise by at most 1.7 MiB,
on the smallest rows: the charge ahead that nothing reserved. Live growth is unchanged.
- The builder's bytes past its charge, at any push, fall from at most 16.0 MiB to 0.
- The most held past the ledger falls from 21.8 to 13.1 MiB. The rest is outside the walk:
the module's finalization after it.
- The heaviest row makes 67,562 charges where it made 48,031.
States-only play before landing (job m3-max-65452, lavapipe, this change on
|
||
|
|
004573964a |
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. |
||
|
|
7f156bc920 |
Error::basis answers a translation error from what its refusal needs
The runtime's Error::basis answered None for every Error::Translation, so each translator
refusal a guest met sat in a consumer's census unsorted between Metal's own refusal and our
gap, and 36 of the translator's 133 Feature variants showed no basis in docs/REFUSALS.md.
What:
- RefusalBasis moves to metal2vulkan::error; the runtime re-exports it at the same path
(metal2vulkan_runtime::RefusalBasis: its signature records do not move).
- Needs::basis: AnyOf, DeviceCapability and NotRepresentable are Device, NotImplemented is
Ours, MetalGpuFamily MetalDocumented, MetalRefuses MetalMeasured.
- metal2vulkan::error::Error::basis: a refusal's from its Needs; LimitExceeded, Budget and
Internal Ours; InvalidInput, InvalidDescriptor, NeedsInput and Cancelled None. Both matches
are exhaustive in the translator, so a new Needs or Error variant must answer (the runtime
could not match the translator's #[non_exhaustive] enums without a wildcard arm).
- The runtime's arm is `Error::Translation { error, .. } => error.basis()`.
- refusal_surface.py follows the helper a site hands its feature to (a front-end reference is
NotImplemented; the feature argument of a construction; a helper's argument; the enclosing
function's computed construction; a function that returns the feature, through its calls in
its file). Its kind-to-basis table is read from Needs::basis's arms. --check fails on a
variant with a site whose basis is not settled.
- docs/REFUSALS.md: the 22 variants with a site and no basis are settled, and their Where
cells filled; no other row's Where or Basis moved. Section 1's totals: device 51, ours 68,
'-' 14 (the 14 variants nothing builds).
- The docs of SimdgroupMatrix16x16x16, IndirectRenderState and GlobalBuiltinInFragment (and
three comments that repeated them) said the runtime answers them as Metal's own refusal; no
code does, and the translation refuses them NotImplemented on every device, so they say that.
Size, past the 200-line mark (hand-written lines, generated tables excluded): 272 added, 50
removed. The script +147/-12 (helper following and its call scan about 60, the Needs table and
derived basis 20, scan bookkeeping 25, the unsettled check 12, selftest cases 20, doc text 10);
the translator +63/-7 (21 of them RefusalBasis moved from the runtime, -23/+8 there); the
runtime test +44; docs/API.md +6.
Verified (locally, source-reading scripts): refusal_surface.py --check and --selftest pass;
with unsettled() emptied the selftest fails; signatures.py --check passes after --bless added
7 records, all on metal2vulkan::error.
Verified: compile m3-max-65442 (fmt, refusal_surface.py --check and --selftest, signatures.py --check,
clippy plain / --cfg m2v_gpu / --cfg m2v_cpu_icd, workspace Rustdoc -D warnings, scripts/api-docs);
host suites m3-max-65443 (metal2vulkan, -air, -runtime: 3969/3969, the golden hashes and the old
render key among them; doctests); before-run m3-max-65444 (development plus the new test alone):
a_translation_error_answers_the_basis_of_what_it_needs fails as expected (None against Some(Device)).
|
||
|
|
bebd518dfb |
validation: delete runs_through_runtime, always true for a mapped kernel case
The predicate answered true for a Threads or Threadgroups dispatch. Every kernel case the engine
maps comes from compute_case, which dispatches by threads (a case has no indirect dispatch to map),
so it was true for every case it was asked about. Its one product caller, run_on_context, now
routes every mapped kernel case through the runtime when no profiles-layer restriction is
requested, as before. The runtime run's own match still refuses any dispatch but threads or
threadgroups.
Deleted with it: the predicate's own test (a_plain_kernel_case_and_only_one_runs_through_the_runtime)
and its plain_kernel helper, which nothing else used. The doc references are rewritten
(ComputeRun::spv_sha256, runtime_fingerprint, run_on_runtime, runs_render_through_runtime,
platform::runtime, engine_textures' runs, docs/VALIDATION.md).
Search: `git grep -n runs_through_runtime` at
|
||
|
|
b4559d038c |
rt README: pipeline states answer no gpuResourceID
The runtime's ComputePipelineState and RenderPipelineState have no gpu_resource_id, where
Metal's states answer MTLComputePipelineState.gpuResourceID and
MTLRenderPipelineState.gpuResourceID. The README did not say so. Its known gaps of pipeline
states now do: the runtime gives no word for an argument buffer's compute_pipeline_state or
render_pipeline_state member, the consumer answers the property itself, and a function that
reads such a member is refused at its state's making. Both types' doc comments name the
property they lack.
The refusal a guest can meet is typed, not a silent zero. The translator admits a
pipeline-state member's word only as an indirect command's pipeline setter, and under the
identity domains, which every runtime state is translated under, both setters are
Unsupported{GpuEncodedIndirectCommands, NotImplemented}. Until now only the compute setter's
refusal was tested, and only under the resident-table domains. The new test
a_commands_pipeline_setter_is_refused_under_the_identity_domains compiles
set_pipeline_state_compute_command and set_pipeline_state_render_command, each through the
pipeline state its argument buffer holds, under DevicePolicy::default() on lavapipe and
moltenvk-m3, and asserts that refusal.
Test-only and docs: no translator code changes, and no SEMANTICS bump.
|
||
|
|
9abae5d95b |
rt: at a loss the completion side marks what the idle wait covered completed
At a loss the completion thread waited for the device to be idle and retired everything in flight as lost, but left its completed mark (Done::completed) at the last progress value it had seen reached. What waits for a progress value reads that mark, so memory given back while other work was in flight was never freed after a loss: an import given back with nothing of it in flight, while another command buffer was, kept its release waiting for good (the imports gauge stayed at 1 with releases_waiting 0, as the Windows UHD 630's stalled import test printed). The lost branch of the round now notes the last value in flight before vkDeviceWaitIdle, raises the mark to it once the wait returns, and retires as lost only what is at or below it; one submitted during the wait stays in flight for the next round's own idle wait. Vulkan's Lost Device section (5.2.3): "for the purpose of determining whether a command buffer is in the pending state, or whether resources are considered in-use by the device, a return value of VK_ERROR_DEVICE_LOST is equivalent to VK_SUCCESS". So once the idle wait returns, what was in flight before it holds nothing, whatever it returned. The mark's readers, each right under that rule: - the block-maker thread's Wait::over (memory.rs): imports and exports given back, objects and indices held for the reaper, and idle allocations go once the work before them is no longer pending, which the idle wait answers; - the submit side's settle (submit.rs, pass): carried values and each queue's in-flight values at or below the mark drop, so Work::settled answers no wait for them, and a command buffer ended after the loss retires at once rather than behind its queue's last value; statuses and errors come from the retirement, as before; - the staging ring's reclaim (Work::stage): spans of submissions the idle wait covered are taken back, so a staging upload or copy after a loss that found the ring full returns Ok, its upload ending with the lost device's work, where it returned VK_ERROR_DEVICE_LOST from its wait; it still does once the ring fills with uploads made after the loss. Ruled acceptable: Metal's copy calls return no error, and a guest learns of the loss from its command buffers' status; - no guest wait reads it: waitUntilCompleted reads its command buffer's status, a shared event and a timeline value their own semaphores, Core::wait_progress the progress semaphore. No status, event value or handler order changes. The runtime README's loss contract says what waited for the work goes as at its completion. Verified on lavapipe (an injected loss, Device::report_loss): the test from the commit before, every_device_runs_a_release_waiting_on_other_work_after_a_loss, timed out at 120 s without this change (job m3-max-65429, at 341c0c7f8f: "releases_waiting 0, imports 1 ... the completion thread, which saw progress 0 reached ... the last at progress 1") and passes with it (job m3-max-65435, run on 664c47256c, whose tree is this commit's), printing "the completion side's mark 0 before the loss, 1 after; the release ran". The same job: fmt, API signatures, clippy plain / m2v_gpu / m2v_cpu_icd, workspace Rustdoc -D warnings and the runtime's whole lavapipe suite (633 run, 633 passed) all exit 0. A real card's loss is not shown here. |
||
|
|
e8b0669352 |
rt tests: an import's release waiting on other work runs after a loss
An import given back with nothing of it in flight, while another command buffer is in flight, waits for that command buffer's submission to complete (memory::Wait). The new device test holds a fill of another block in flight behind busy work, imports host memory and drops its block, then reports a loss (Device::report_loss, the runtime's own loss path, no GPU fault) and lets the busy work go. The fill must end DeviceLost in flight and the release must run within wait_until's 120 s; the test prints the completion side's progress mark before the loss and after the release. The fix follows in the next commit; this test alone fails, as the completion thread retires what was in flight at a loss without raising its mark, so the import's wait is never over. |
||
|
|
a93a0d69dc |
Replay player: the unwritten count reads a buffer by its slot's access and its block's earlier bytes
The player's `unwritten` line (Shared buffers a dispatch read before any recorded write, upload
or GPU pass reached them) misread in two of the three ways the tool bug row named:
(1) every buffer a compute encoder bound or used counted as read at the next dispatch, so outputs
counted: 12,607 of one recording's 12,611 were write-only first bindings;
(3) a buffer made in a stream block counted as unwritten from its making, though m2v.write records
into the block before the making had put its bytes there.
The third, that commits at m2v.split and m2v.commitPart are not counted, does not hold: the
player plays each as the command buffer's `commit` to the backend (frames_releases_and_splits
and a_part_commits_only_where_the_host_cut_it show the backend's commits), whose commit counts.
Now, per compute encoder, the tracker keeps the waiting buffer bound at each buffer slot, its
state's buffer accesses (ComputePipelineState::buffer_accesses) and the buffers useResource:usage:
names with their usage bits. A dispatch reads a buffer at a slot its state reads and writes it at
a slot it writes; a slot the state does not use touches nothing; a used buffer goes by its read and
write bits. A buffer another call of the encoder named, or one bound under a skipped state, is
read and written, as before, and the line says how many of the count were only counted so. In a
command buffer a dispatch's write comes before later dispatches' reads. At the commit the buffers
read while waiting are counted once each and those written are reached. Each Shared block or heap
keeps the byte ranges reached in it, merged; a buffer made over reached bytes is not waiting.
Tests: a_dispatch_reading_a_buffer_nothing_recorded_reached_is_counted_once (rewritten for slots
and the block's earlier bytes), a_dispatch_reads_a_buffer_only_where_its_state_or_its_usage_reads_it,
a_buffer_made_over_its_block_s_reached_bytes_is_not_unwritten (host), and on the device cfgs
the_unwritten_line_counts_what_a_state_reads_before_anything_reached_it (scale_offset reads #6,
writes #7, reads #11 made over an m2v.write: "unwritten 1", where the old rule counts 3).
docs/REPLAY-STREAM.md's paragraph says the rule.
|
||
|
|
fea2623083 |
rt: a compute pipeline state answers its buffer slots' accesses
ComputePipelineState::buffer_accesses, the twin of texture_accesses: each buffer slot the kernel uses, by index, with the access a dispatch of the state marks in its hazards for the buffer bound there (the compiled interface's, which the encoder already reads): WriteOnly where the kernel writes the buffer and does not read it, ReadWrite where it does both, ReadOnly otherwise. It is what the kernel's operations do, not the declared access Metal's reflection answers, which is ReadWrite for every `device` buffer, outputs included. The replay player needs it to count a buffer as read only where the dispatch's state reads its slot (its unwritten count took every bound buffer as read, outputs too). The translator's own public API gives the access only in a ComputePipeline the player does not hold: rt compiles the state and keeps its interface, and Function::reflection gives the declared access. Test: every_device_answers_a_state_s_buffer_accesses (harness kernels: scale_offset ReadOnly, WriteOnly, ReadOnly; lcg_step ReadWrite, ReadOnly), under the device cfgs. The runtime README and the API signatures table name it. |
||
|
|
af143ab5cb |
rt tests: an import's waiting release runs after a loss
A device loss while an import's release waits on a committed command buffer must not keep that release from running: after a loss nothing has to keep working, but nothing may hang. The new device test imports host memory into a Shared block, commits a fill of it, drops the block so the release waits for that command buffer, then reports a loss (Device::report_loss, the runtime's own loss path, no GPU fault). Two cases, each on a device of its own: the command buffer held on an event nothing signals (it ends DeviceLost not in flight) and held in flight behind busy work on the GPU (DeviceLost in flight once the busy work is let go). Either way the release must run, within wait_until's 120 s, whose timeout names the completion thread's step. This covers only the injected-loss path, on lavapipe by default (an opt-in GPU-hazard test on a real card is not needed for it: no GPU fault is made). |
||
|
|
885b19bb78 |
rt tests: a timed-out release wait names the device's loss and the completion thread's step
The UHD 630 run of import_time's host-memory test (Windows, job m3-max-65348) timed out with both sides lost: progress stopped at 365 while submissions reached 368, and the completion thread was in no wait of its own while a command buffer the submit side ended sat unretired. Its print could not say the loss's cause, nor where the completion thread stood. Diagnostics only, under the device cfgs: - Work::stall ends with the device's first loss as recorded (its call, result and fault) and the last submission's progress value when it came (WorkState::lost_at, test cfg only, set at the first Work::lose). - Done::enter marks the step of its round the completion thread enters: the lost device's idle wait, the loss's fault report, work.completed, pool.retired, the timestamps' read, the clock's calibration, each retiree (its kind and progress), each of a command buffer's handlers (which of its scheduled and completed ones), its finish, each listener, the fired events' drop and the round's last lock. Done::stall names the step last entered where the thread is in no wait. - The lavapipe test of the readings also checks the submit side reads "not lost". No product path changes: every marker and field is compiled only under --cfg m2v_gpu or --cfg m2v_cpu_icd in tests. |
||
|
|
87351e9767 |
rt tests: wait_until takes the device as the four callers that hold a reference have it
clippy's needless_borrow under --cfg m2v_gpu and --cfg m2v_cpu_icd (job m3-max-65343): import_time's two and imported_aliases' two callers hold a &Device. |
||
|
|
59638f029d |
rt tests: the stall readings name a command buffer held for an event
every_device_s_stall_readings_name_a_command_buffer_held_for_an_event: a committed command
buffer that waits on an event nothing signalled is read as held by the submit side ("1 heads
held for an event's value") with no command buffer in flight on the completion side; once the
event is signalled and it completed, the submit side holds none. It checks that the readings a
timed-out wait_until prints say what each side holds, on every device of the cfg's kind.
|
||
|
|
8e0910dbef |
rt tests: a release wait that times out says what the completion and submit sides hold
import's wait_until (the release waits of the import tests, import_time's among them) timed out on the UHD 630 under Windows (m3-max-65153: "2 submissions, 3 command buffers completed ..., the last completion seen 0.1 s into it ...; releases_waiting 0, imports 1"), and its message could not tell work the GPU did not finish from work it finished that nothing collected. Its message now ends with two readings taken at the timeout, each trying its side's lock for a second (one held longer is named, not waited for): - Done::stall: the command buffers in flight among the completion side's retirees; the oldest retiree's kind and progress value, the progress semaphore's counter and whether a wait of timeout 0 on that value reports it reached (signalled or not); where the completion thread waits (in a round, on the host, or on the GPU with the values of its wait-any and the wake semaphore's counter); the progress it saw reached, its watched events, lost, stopping. - Work::stall: across the submit side's queues, the command buffers not wholly submitted (and of them committed), heads held for an event's value, staged groups, submissions not seen complete and the last submission's progress value. Diagnostics only, compiled under the device cfgs: DoneState keeps its GPU wait's values for the reading (waits_for, test cfg only); no product path changes. wait_until takes the device instead of its counters, at its 17 call sites. |
||
|
|
3d2b846caa |
Runtime cache directory: a newer translator's open retires both generations
Every lowering's and record's name under translations/ and renders/ holds the translator's SEMANTICS_VERSION, and a lowering decodes under its own ARTIFACT_FORMAT_VERSION alone. So after a version change no file of the old version is looked up again, yet it stayed counted until young filled, and the one rotation then only moved it from young to old. A consumer's directory held 97.6 MB of translations, of which 92.7 MB were of older versions. The state file now records, after young's number, its bytes and their checksum (bytes 0..24, unchanged), the newest SEMANTICS_VERSION and ARTIFACT_FORMAT_VERSION a store opened the directory under, each at its highest, with a checksum (bytes 24..40). At its open, under the state's lock (Store::meet), a store whose translator is newer than the record in either version moves young two generations on, counted empty, so the young and old it found are both below old and the existing removal thread removes them, and it records the higher of each version. A store at the recorded versions or older ones retires nothing and records nothing: product builds of every version share one directory in the consumer's layout, so two builds alternating on it, or one running beside the other, keep each other's files after the newer one's first open, and the older one's writes go into young. A state whose versions are missing or do not check after a young's record that does (an earlier version's 24-byte state file) reads as older than every translator, so the first open after this change retires once; an earlier version writes only bytes 0..24 at the start of a file it opens without truncation, so the record stays. A state that does not check at all (a new directory's, or a torn one) is rebuilt from the generations' names as before and retires nothing. Read-only directories retire nothing. The removal now takes the dead generations lowest first, so a removal cut short while two are dead (the retire's case) leaves the one just below old, which the next open looks for. Store::open takes the store's Versions; Caches::new passes Versions::BUILT (the translator's constants). No SEMANTICS bump: the translator's output and keys are unchanged. The cache.rs module doc, the runtime README's cache-directory section and DeviceOptions::pipeline_cache_dir's doc say so. Tests (host, each on a directory of its own, in src/tests/cache.rs): - a_newer_translators_open_retires_both_generations_once: filled under (S, F), four stores open at once under (S+1, F), then under (S, F+1): young 3 -> 5 once, generations 2 and 3 gone, no older file left, writes and hits work, a reopen retires nothing. - an_older_translators_open_retires_nothing_of_a_newer_ones: after the newer one's open, the older one's open removes nothing and records nothing, its write and the newer one's file are both read by the newer one's reopen; a translator newer in format alone retires and the record keeps the higher of each, so neither earlier one retires after it. - a_state_with_no_versions_reads_as_older_once: the record cut to 24 bytes, or its checksum broken, retires once; then an earlier version's 24-byte write at offset 0 leaves the record, and the next open reads that write and retires nothing. - the_dead_generations_are_removed_lowest_first: dead generations 30, 9, 1, 10, 2 listed as 1, 2, 9, 10, 30. Verified: compile job m3-max-65330 (fmt, the signatures table, clippy plain, --cfg m2v_gpu and --cfg m2v_cpu_icd, workspace Rustdoc -D warnings, the store's host tests 23/23, and metal2vulkan-runtime's suite on lavapipe 629 passed, the four new tests among them). |
||
|
|
4dc64aebe1 |
Runtime: exports count their bytes (Gauges::export_bytes)
Exported blocks and an opaque handle's surfaces in place had a live count (Gauges::exports) and no byte gauge, so a consumer could not read how much memory its exported surfaces and blocks hold. Gauges::export_bytes counts each export's allocation size, the size its Export names: it rises beside the count where memory::export and memory::export_surface allocate, and falls beside it in free_own, where the memory is freed (Own::Export now carries the size). A copy form surface's exported block counts there; a dma-buf's surface in place stays in surface_import_bytes. Tests: the export test reads the bytes after one make (+ Export::size), back at its free, and with 64 live (their sizes' sum, then 0); the surface test reads them after each make (the export's size for the opaque and copy forms, none for a dma-buf in place) and at 0 after the frees, and the drop test holds them in the gauges back at each free and equal at rounds 100 and 200. each_device's teardown check holds every gauge at 0 at device drop. README gauge text and the signature table updated. |
||
|
|
2b265713c8 |
matrix: two comments name the RTX 3090 by its link, not by its host
scripts/matrix/results.py (the per-process level note above HARNESS_ALONE) and its test in scripts/matrix/test_results.py named the 3090 of rounds |
||
|
|
4a09c07658 |
Replay player: a play cut after its last frame names the command buffers held there, not an invalid stream
A play cut with --until-frame F (or at its recording range) ended exit 1 with "invalid stream: command buffers [...] still wait on events at the stream's end" where a command buffer committed before the cut waited on an event a call past the cut signals (glbench-3090-r4 cut at 400: cbs 128646 and 128648). The calls past the stop may signal it, so the stream is not invalid there. The player now tells the stream's end from the stop after its last frame. At the stop, the command buffers still held on events go into Report::held and a `held #ID ...` line, and the play ends as it would without them (exit 0 for `ok`). At the stream's end a held command buffer stays the invalid-stream error, a last frame past the end included. Test: a_play_stopped_after_its_last_frame_names_the_command_buffers_held_there (a synthetic stream: cut at frame 0 names #4 held and waits for nothing; played whole, the later signal lets #4 complete; a stream ending with #4 held is invalid with no last frame and with one past its end). Without the fix the cut play ends Err(Invalid). |