fac976c7724be67c7afdfe2dce90b83acc51deed
5795
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
fac976c772 |
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. |
||
|
|
7ba0cd9fe6 |
RUNTIME 2343: GPU times placed by a calibration still beyond 20 us are announced and counted
A calibration pair is read again while the smallest deviation so far
states more than 20 us (`gpu_time::SETTLED`), four readings at most
(`least_deviation`). Where the least of four still stated more (93 and
125 us on the RX 7900 XTX under full parallel suites: a reading's
deviation holds the time its thread spent off the CPU), the runtime
placed the command buffer's GPU times by it, inside the command
buffer's life, with up to that error, and said nothing. Owner rule 2:
a near-equivalent is recorded and announced.
`GpuClock::span` now answers `Placement::Loose { deviation }` where the
pair places both times inside the life and its deviation exceeds
`SETTLED` (a pair outside the life is still set aside as before).
`Placement::read` gives the notice for every placement the first read
of a command buffer's GPU times announces, counting a loose one:
- new kind `Degradation::LooselyCalibratedGpuTimes`,
`loosely-calibrated-gpu-times`, class Precision, announced once per
device at the read (the site `uncalibrated-gpu-times` uses), its
reason stating the deviation; not `uncalibrated-gpu-times`, whose
cost says the times are placed by the completion, where these are
the pair's, the duration exact;
- new `WorkCounts::loosely_calibrated_gpu_times`: command buffers
whose times a read found placed so, counted at the read that
announces, so the count is nonzero exactly where the kind was
announced.
Tests: `tests::gpu_time::a_pair_still_beyond_the_settled_deviation_is_
announced_once_and_counted` feeds `least_deviation` a fake source of
four readings above 20 us (Loose, the kind with the deviation in its
reason, each read counted, announced once) and settled ones (Iris
Xe's 165 then 7.6 us; 20 us exactly: Calibrated, nothing), and a loose
pair outside the life (Disagreed, the uncalibrated kind, not counted).
The lane's `gpu_times` expects the kind exactly where counted, and holds
the count nonzero exactly where `calibration_deviation_most` exceeds
the slack (no disagreement); `read_kinds` adds it where counted
(mesh_draws), `disagreeable_kinds` allows it (first_use); a site const
`LOOSE_GPU_TIMES` takes it. The conformance cases that read GPU times
(`command-buffer-facts`, `empty-command-buffers`) allow its notice:
the host's load decides it, and every value still compares exactly.
docs/API.md's catalogue lists the kind; api_signatures.tsv blessed.
|
||
|
|
d9236a8a11 |
Known gaps: a commit held past 16 ms on a Radeon 780M; a teardown wait past 16 ms on an RTX 2080
Two latency tests fail on some GPUs at the 0.2.0 release candidate, recorded where a user reads open gaps (docs/FAST-PATHS.md, Known gaps) and in the 0.2.0 CHANGELOG entry, at the owner's call to document them as failing and release: - tests::held_step_order::command_buffers_behind_a_waiting_step_read_scheduled: on the Radeon 780M (Phoenix, m3-max-31782, exclusive) the long command buffer's commit returned 405.95 / 23.66 / 10.50 ms after its call over the test's three runs (bound 10 ms); pin 97's XTX printout shows the same shape (315.68 -> 12.59 -> 17.11 ms). The ordering the test is for held in every run. - tests::teardown_threads::a_running_queue_switch_check_leaves_the_device_to_the_program_s_thread: on an RTX 2080 (620.70.06) it failed 3 of 3 alone (m3-max-31777): the teardown waited 33.1 / 23.3 / 19.8 ms for the check, 19.6 / 22.0 / 18.4 ms of it the check's objects' release; it passes on the RTX 3090, RX 7900 XTX and Radeon 780M. That host's driver calls on the 2080 ran several times slower than usual during the measurement (cause open). Docs only.v0.2.0 |
||
|
|
093d256b75 |
gpu_times: a calibration beyond the slack is held to the runtime's re-read rule
`command_buffers_are_timed_in_the_hosts_time_base` held every calibration pair's stated deviation to 20 us. The runtime promises less: it reads a pair again while the smallest so far states more than 20 us, four readings at most (`gpu_time::least_deviation`, `WorkCounts::calibration_readings`), and checks each placed time against its command buffer's life within the deviation stated. A stated deviation includes the reading thread's time off the CPU, so a loaded host states more, and no placement of the test (alone, or the GPU held) controls the host's other jobs. On the RX 7900 XTX (RADV, Mesa 26.2.6) the least of four readings stated 37.5 us with the test alone on a host at load average 13.7 on 16 threads (job 31053), 93.4 us in pin 99's suite (31769) and 124.9 us in pin 96's, each with 0 disagreements. Pins 97 and 98's suites passed it. The test now holds a deviation beyond the slack to the rule: the pair that stated it read all four readings (readings >= 4 + 2 * (pairs - 1)). A re-read rule that stopped early still fails, as the Iris Xe's first reading after idle (165 us) would. Verified: m3-max-31778 (msi): clippy -D warnings plain and --cfg m2v_gpu (validation) 0; archive built. |
||
|
|
7c8e58275b |
Re-bless the compile census at 896acd2dbf
Only the product hash changes (the runtime-sources pin moved with 7ad012b7e6's doc-comment fix); no cell's state changed. Census job m3-max-31776. |
||
|
|
896acd2dbf |
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. |
||
|
|
7ad012b7e6 |
gpu_route docs: drop a redundant explicit link target
`cargo doc -p metal2vulkan-runtime --document-private-items` with -D warnings failed on
gpu_route.rs:21 (rustdoc::redundant_explicit_links): the label [`CommandTables`] already resolves
to super::CommandTables. Red at pins 97, 98 and 99 (PRIVDOC_metal2vulkan-runtime=1, since
|
||
|
|
f53a36d0e0 |
Re-bless the compile census at pin 99
Only the product hash changes (the runtime-sources pin moved with 5a6d3e3515's test-only trace
points); no cell's state changed. Census job m3-max-31763 at
|
||
|
|
4a8f305e8f |
CHANGELOG: 0.2.0 is the release
The release candidate for 0.2.0: development at this commit. Its product code is pin 98's (
|
||
|
|
f3d7926925 |
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. |
||
|
|
5a6d3e3515 |
Pin 98 diagnostics: a lost-wake failure prints the scheduler's steps; a slow taking-up prints the thread's run-queue wait
Test-only (trace points under cfg(all(test, any(m2v_gpu, m2v_cpu_icd)))); no behaviour change, no RUNTIME bump. Both tests failed only under the 780M HP suite's load at pin 98 (m3-max-31702) and could not be reproduced (m3-max-31743: 40/40 and 3/3 under 4 CPU hogs); these make the next failure name its path. The 40 ms bound and ours = taken - in_driver are unchanged. Three commits from steelbrain/regr98: scheduler_held_wakes: a lost-wake failure names the scheduler's steps What: a_held_batch_whose_wake_never_came_goes_at_the_next_slice keeps the scheduler's trace (command_buffer::completion::trace) from the kept group's gate on, and its failure prints it. The scheduler records, in the tests' builds alone (cfg(all(test, any(m2v_gpu, m2v_cpu_icd)))), each pass of its thread (after a slice or not, taking commits in or not), a waiting thread's and a committing thread's pass, each sleep that ended at its slice, a slice's rescue, and the group kept past its pass or sent. Nothing changes outside those builds. Why: the 780M HP suite leg of pin 98 (m3-max-31702) failed it with "1 slices, 0 slice rescues; commits taken in 1, passes 1", the same counts as the passing runs (m3-max-31616) but the rescue, and the kept command buffer completed 99.9 ms after the completions were published, at the slice. Reading the scheduler names no path that lets the group go at the slice without the pass counting its rescue; the trace says which pass sent it, and what it took in. Verified: in the lane's report (a loaded lavapipe run). ---- queue_order: a checked commit's taking up counts the scheduler thread's run-queue wait apart What: checked_commits_during_submissions_are_taken_up_promptly bounds the scheduler thread's own time to take up each of two checked command buffers after the VkQueue is free (40 ms), the time the batches' vkQueueSubmit calls spent in the driver apart. Now the time the thread, ready to run, waited on the host's run queue for a core over the same span is apart too: each submission handler notes its thread's schedstat under /proc (the second field, Linux's scheduler statistics), the first command buffer's naming the scheduler's thread, whose wait the test reads as it lets the VkQueue go. Where the system keeps none (macOS), or another thread took the command buffer, nothing is taken apart. Every round prints it (Round::run_queue), and the summary its most. Why: the 780M HP suite leg of pin 98 (m3-max-31702) failed round 1 with 51.3 ms of own time; its slowest round's later command buffer was submitted 10.3 ms after the release and its handler, on the same thread, ran at 73.6 ms, the driver's time flat. The test ran 9.0 s in that suite and 1.3 s alone on the same device (m3-max-31725), where it passed. A thread the host does not run is not slow in its own work. Verified: in the lane's report (a loaded lavapipe run shows the wait). ---- queue_order: the run-queue wait is printed, not taken out of the bounded time What: checked_commits_during_submissions_are_taken_up_promptly bounds the scheduler thread's own time again exactly as before 757485a87a: the time from the VkQueue's release to its taking of each checked command buffer, less the driver's vkQueueSubmit time, under 40 ms. The thread's run-queue wait over the same span (Linux's schedstat, Round::run_queue) stays measured and is printed beside taken, ours and in_driver, in each failing round's message and in the summary line, but is no longer subtracted. Why: the loaded lavapipe run (m3-max-31743, msi, the test pinned to 2 cores beside 4 busy loops) measured the wait (up to 3.6 ms) but did not make the 51 ms gap of the 780M HP suite leg of pin 98 (m3-max-31702), so nothing yet shows that the run-queue wait explains it. The next failure says whether it does. Verified: in the lane's report (msi: clippy for cpu_icd and gpu; lavapipe). Verified: m3-max-31747 (msi) at 02af33af54: clippy -D warnings (cpu_icd, gpu) 0; both tests pass on lavapipe. |
||
|
|
b01761dbed |
Pin 98 test fixes: the parity hazard control writes its own buffer; held_step_order's reset leg is judged by its own times
Test-only; no RUNTIME bump. Two commits from steelbrain/regr98: parity sequences: the hazard control's second copy writes a buffer of its own What: parity::sequences::lane::a_hazard_fails_when_its_commands_share_a_byte_and_else_is_explained ran two serial encoders over one untracked buffer: seq_copy writing word 256, then seq_copy reading word 256 (or 260) and writing word 400 of the same buffer. Now the second copy writes word 400 of a second untracked buffer. Every assertion is unchanged: the read of the word the first wrote fails as a hazard between commands that share a byte, with nothing explained; the read of the next word is explained as untracked memory and fails nothing. Why: since |
||
|
|
f90df51114 |
freed_memory test: hold the queue waiters unpublished while it reads the release's counts
tests::freed_memory::a_release_waits_for_the_batch_in_flight_where_the_device_parks_freed_memory failed on the RX 7900 XTX at pin 98 (m3-max-31704) with "parked 1, waiting 1, deallocators delayed 1, run 1": the deallocator had run by the time the test read its count, although the release had parked the import. The product was right. A parked import's deallocator waits in the parked block (`Parked::after`), and only the release a queue's waiter posts (`freed_memory.rs`'s `Unpark`) runs it, once the waiter has published that the queue's timeline reached the batch's value (completion.rs, the `parking.completed` and `after_completion` after the publish; `Parking::reached` filters the blocks). The test read `Device::work_counts`, whose snapshot reads `freed_memory_waiting` under the memory's lock near its start, and only then the deallocator's count. On the XTX the 1 GiB of fills completes in about a millisecond. A waiter that published the batch's completion as the release returned posted the Unpark, which took the memory's lock as the snapshot let go of it, freed the import and ran the deallocator before the test's read. So the read of `ran == 0` raced the batch's legitimate completion. The test now holds the queue waiters before they publish a completed value (`completion::trace::Point::Publish`, as `scheduler_held_wakes` does) from before the batch's commit until it has read the counts. The host then cannot see the batch complete, so the release always parks (the branch for fills completed before the release could no longer run, and goes) and `ran == 0` is sound however fast the GPU is. Once the hold is let go, the deallocator must run, on a handler thread. The device's own checks are settled first so that nothing of theirs waits for a completion during the hold. The assertion is unchanged. Verified: see the lane's report (clippy in three configurations, the module on lavapipe, the fixed test on the XTX). |
||
|
|
e602e06066 |
Re-bless the golden tables and the compile census at pin 98
The golden tables (bless job m3-max-31687 on the M3) gain the rows of abtex's owned fixture engine/abt_descriptor_sets (its AIR input listing, golden hashes and engine expectations). The 19 device-profile rows change because DescriptorCaps gained update_after_bind_uniform_texel_buffer and update_after_bind_storage_texel_buffer (RUNTIME 2342), which the profile fingerprints cover. No existing fixture's translation row changed. The authored compile census (m3-max-31688) changes only its product hash, from the SEMANTICS 2122 bump: no cell's state changed. |
||
|
|
2fadc74ab7 |
Pin 97 test fixes: the busy-VkQueue join test takes its own rounds; held_step_order calibrates by its own times
Test-only; no RUNTIME bump. Two commits from steelbrain/regr97q: command_queues: the busy-VkQueue join takes rounds of its own until a queue joined, and says what each look found What: a_queue_joining_another_s_busy_vk_queue_is_announced_once made one busy queue and three joiners, each joiner making one fill while 24 of the busy queue's fills were in flight, and asserted a join where the device shares. Now each round makes a busy queue and a joiner of its own, at least three rounds, and, where the device shares and no queue joined yet, up to 16. The assertions are unchanged: joins above 0 exactly where the device shares, and queue-sharing announced exactly once where a queue joined. Every run prints, and a failure says, the joins, the rounds, and the looks that found no other VkQueue busy (picks_with_none_busy), passed over a busy one's old oldest batch (joins_withheld_from_old_heads) or an unshared queue's (joins_withheld_from_unshared), and the queues gone long. Why: pin 97's RTX 3090 leg (m3-max-31476) failed it with "0 joins where the device shares: true"; pin 96's passed. Nothing between them touches its path: its work is plain blit fills, which no host-step rule sees, and joining reads queue_share.rs's per-VkQueue state, which no commit in 9303a1f03f..eee64c8668 changed (the test queue limits of |
||
|
|
723f8fa1cd |
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. |
||
|
|
8280b89626 |
SEMANTICS 2122: the texel-buffer heap classes change translated heap layouts
|
||
|
|
ec0be064d0 |
RUNTIME 2342, SEMANTICS 2122: Texture buffers read through argument buffers sit in texel-buffer heap classes
A pipeline whose argument buffers hold texture buffers was refused with ArgumentBufferTextures (NotImplemented, no location): the translator's heap layout (lower/texture/slot.rs declare_heap) had no set-1 class for a texture_buffer member, so SPIRV-Cross-shaped tier-2 argument buffers (descriptor sets as [[buffer(n)]] structs with texture_buffer, texture2d and sampler members) could not be made, on any device. - Set 1 gains texel-buffer heap classes: UNIFORM_TEXEL_BUFFER for read, formatless STORAGE_TEXEL_BUFFER for read_write and write. The class follows the facts' texture type. - DescriptorCaps gains update_after_bind_uniform_texel_buffer and update_after_bind_storage_texel_buffer; where a device lacks them a typed needs_any_of names the missing features. Non-uniform texel-buffer indexing and the without-format read/write needs are checked as for images; link counts STORAGE_TEXEL_BUFFER with the images against the update-after-bind limits. - New public bind::heap::HeapElement::TexelBuffer(vk::Format). - The runtime writes each live texture buffer's texel view at its resource ID, with a neutral texel view at element 0; a gone texture buffer's Texels stay alive until its tickets clear. A texture buffer whose bytes cannot be viewed in place (staged, tail-viewed, offset off minTexelBufferOffsetAlignment, past maxTexelBufferElements, swizzled, or a non-direct format) reads the neutral and is announced through the existing UnnamedTextureUnviewable. No new Degradation kind. - docs/REFUSALS.md and api_signatures.tsv regenerated. Test: runtime_lane::argument_texel_buffers::a_texture_buffer_in_an_argument_buffer_is_read_in_both_stages (an owned fixture in SPIRV-Cross's shape): vertex and fragment read a texture_buffer member of a set-0 argument buffer, the fragment also samples a set-1 texture2d through the sampler beside it; every pixel must equal texel[1] + texel[4]*tint + albedo. Verified: lavapipe with the validation layer, m3-max-31658 at 6626eeaff3: pass. Control m3-max-31636 (the fixture and test at the base, without the fix): fails with exactly the ArgumentBufferTextures NotImplemented refusal. |
||
|
|
f90b069111 |
uniform_bind_offsets' moved-draw fixture reads through engine_dir()
RUNTIME 2339's new tests::uniform_bind_offsets::moved_state read cof_offsets.ll at
Path::new(env!("CARGO_MANIFEST_DIR")), the build machine's checkout, beside the stack that moved
every such read onto metal2vulkan_devtools' helpers and removed this file's then-unused
`use std::path::Path`. On development the merge left the read unresolved (`Path` is not imported
under --cfg m2v_gpu / m2v_cpu_icd) and the dev tools' scan check
(tests::the_carried_tests_read_the_checkout_where_the_runner_names_it) names it. It reads
metal2vulkan_devtools::engine_dir().join("cof_offsets.ll") now.
Test-only. Verification: the msi job that compiles this commit and runs the scan check and the
file's tests on lavapipe is reported with it.
|
||
|
|
0ea511c7cd |
Re-bless the golden tables for the cof_offsets fixture
RUNTIME 2339 (
|
||
|
|
5c7cfa8f67 |
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. |
||
|
|
39bff0de2a |
The carried test trees read the checkout where the test runner names it
Every env!("CARGO_MANIFEST_DIR") in validation's runtime_lane.rs and runtime_lane/ and in
metal2vulkan-runtime/src/tests (135 sites) named the directory the test binary was built in. A
nextest archive built on msi and run on another node with --workspace-remap read msi's path there:
teardown_threads panicked reading runtime_examples.ll, and public_cases read no case shard.
metal2vulkan-devtools gets one resolver, workspace_dir(): two levels above the manifest directory
the runner names as the test runs (cargo and nextest name the test's crate; a remapped archive
names it in the running machine's checkout), where that root holds the validation fixtures, else
above the dev-tools crate as built (the fallback fixtures_dir already had). validation_dir() and
fixtures_dir() sit on it; engine_dir() is unchanged. The sites move onto them:
- fixture reads (fixtures/public, engine/ and examples/) onto fixtures_dir() and engine_dir(),
with the two hand-rolled "runtime variable else built" copies (attachment_reads, encoder_holds);
- committed cases and observations (validation_dir()/corpus), and public_cases and
public_case_names now read the public source rows through source::public_sources_under on
fixtures_dir() instead of source::public_sources(), which bakes the path;
- the runtime tests' device profiles (validation_dir()/profiles) and degradation_sites' read of
the lane's sources;
- the conformance recordings, docs/API.md and the runtime's own src/ through workspace_dir().
The imports of std::path the moves left unused are removed.
Test-only. tests::the_carried_tests_read_the_checkout_where_the_runner_names_it (devtools, the
previous commit) fails before this commit and passes after. Verification: the msi job that builds
both commits, runs the remapped archive at each and lints the tip is reported with this sha.
With 4e06c87523 (the scan check), e9a0927685 (render_state.rs and line_width tests; the scan covers all of runtime/src),
74aa3e44cc and 086962f1fa (fixes; source.rs fixture reads through fixtures_dir). Test code only.
Compiled in m3-max-31605 (msi: clippy x3; scan passes; lavapipe suites 6235 passed, failures all pre-existing pin-97
items or the runtime-sources pin; remapped run with the build tree hidden 201/202, the last needing an all-targets
archive, 31641). Base 4e06c87523 (31508): scan lists 135 sites; remapped run fails 63/202.
|
||
|
|
3b27e62ddd |
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. |
||
|
|
37fab025d4 |
RUNTIME 2341: A carried kept draw restates by its scissors alone only where the ended encoder's render state was its own
RUNTIME 2338 ( |
||
|
|
a54c496b6b |
scheduler_held_wakes: the tests' device takes the queue plan
Pin 97's 3090 q2 leg (31475): tests::scheduler_held_wakes:: a_batch_held_for_an_unshared_queue_goes_at_the_completion_published_as_it_was_looked_at panicked at device/mod.rs:1965, "this test's device takes the runtime tests' default queue limits (TEST_QUEUE_LIMITS: a round robin of 2 VkQueue(s), 0 for presenting) and made an unshared command queue while the program holds 2 of it". |
||
|
|
19be53f4ff |
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. |
||
|
|
1b5a527f5e |
RUNTIME 2340: Scheduler: a host step at its gate whose batch's uses are known keeps its place
What: since |
||
|
|
04840a4f4a |
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. |
||
|
|
734e1cac02 |
RUNTIME 2339: Bind a slot read at its residual over a range its bind offsets share
What: bind::instantiate::shared_range gives a descriptor-form slot of a Bounded window that its functions read at the residual one range for a run of bind offsets of the bound buffer: the padded buffer from 0 where it fits the view's maximum range (and 4 GiB), else the block of half that maximum its window starts in, to the maximum past the block's start; its SlotBindOffset residual the rest. A window of at most half the maximum never straddles its block's range; a longer one, or one at or past the padded end, keeps descriptor_range's range. planned_range takes it for every Bounded storage view (no function reads one at its bind offset alone), and for a uniform view where the new BindState::uniform_views_at_residual says the consumer reads every uniform view at its residual: its keys all take their residual forms. The runtime states it where pipeline::reads_views_at_bind does not hold (every device today: no driver carries DriverFact::ConstantOffsetUniformReadsPreloaded), through AtBindViews, at each bind state that states the view base alignment (render, compute twice, tile dispatch). Shapes, plans and keys are unchanged; the flag is not part of the shape. Why: a constant reference at a buffer index (constant float4 &) is a uniform view of a 16-byte Bounded window, whose range started at the bind offset with residual 0. Every offset-only rebind (a consumer's staged setVertexBytes: setVertexBuffer at the next 256 bytes of an upload chunk) then wrote another descriptor: rebind_into, push_set and the driver's vkCmdPushDescriptorSet at every draw (reims-vgpu's Iris: +538 ns a draw against a device pointer, +93 inside the push and +99 under record). The range at the bind offset serves only keys reading the view at the bind offset alone, which no device takes today: the shader already adds the residual. Now such a draw keeps its set-0 writes (writes_kept) and pushes only its residual, as a device pointer's draw does. Metal and Vulkan: each read inside the window reads byte lo + (bind - lo) + m = bind + m, the bytes it read before, through the same instructions. A read outside the window, which Metal leaves undefined, reads the buffer's bytes inside the range. The range starts at 0 or a block multiple, a multiple of the base alignment (VUID-VkWriteDescriptorSet-descriptorType-00327/00328), stays within the view's maximum (00332/00333) and the padded allocation (VUID-VkDescriptorBufferInfo-range-00342); a dynamic descriptor's offset is its start as before (VUID-vkCmdBindDescriptorSets-pDynamicOffsets-01971). Verified: by the jobs that follow (unit tests of shared_range and planned_range, the lavapipe runtime test constants_moved_along_one_buffer_keep_their_set_zero, the release medians of runtime_lane::constant_offsets before and after). With (bench and tests): 78463d1e1d The moved-constant set-0 test counts every second draw again as taking every step in builds with debug assertions; 5e7d715629 The moved-constant set-0 test lists which of the second pass's draws were rebound; 99a3459dc6 The moved-constant set-0 test moves the vertex constant alone, as constant_offsets does; a9c4b07790 The moved-constant set-0 test names what the second pass's draws did where some were not moved; 5e938c75c5 The moved-constant set-0 test draws the bench's shape; a bounded storage window's dispatch test binds the shared range; 69e598a6b5 Drop the stale copy of the range-from-bind-offset test; round-trip the new BindState field; ea4602012c cof_device reads its float4 at the instance's element; cd6492fd41 constant_offsets also draws over chunks in host pages, under the consumer's policy; 4d6e17bb89 constant_offsets takes the AIR library trait into scope; 1221f53ce0 Time draws that rebind a constant reference by offset against a device pointer. Compiled in m3-max-31548 (msi: clippy, lavapipe uniform_bind_offsets/draw_again/general_form/inline_continues/ kept_shadowed_draws 48/48). The set-0 test fails at the base (16 writes pushed, want 0; 31536). Release counts (31392): set-0 pushes per constant draw 1.00 -> 0, push constants 0 -> 1.00. The new fixture's golden rows re-bless on development. |
||
|
|
188606728a |
heap_textures: the untracked lane's texture lies in place, and splits are asserted only there
31432 (the lane at cb8c03fd25, settled pipelines) on the RTX 3090: both forms read the write in both heaps, but it still split 0 command buffers at aliases. No creation left its making running and the Private heap's command buffer began no segment, so a dispatch recorded later was not the cause. The lane's texture was of storage usage (ShaderRead | ShaderWrite). Metal keeps such a colour texture uncompressed (heap_tiled::metal_keeps_uncompressed), so its bytes are Metal's tiles. The runtime keeps it as a shadow of them, with an image in memory of its own (texture/heap.rs). No image then lies over the heap's bytes: the shadow's copy in reads them after the write, ordered as any read of bytes, so there is nothing to split, and the data is right. This is read from the code; the run below shows it. The texture is now of sampled and render-target usage, as in blit_write_then_texture_use, which splits on the 3090. Metal compresses such a texture, so its image lies in place where one fits. The lane asserts a split only where a texture lay in place (no shadow form between its making and its read, runtime_lane::shadow_forms), and the HEAPTEX lines print it per heap. The segments print goes. The pool settle stays: a dispatch recorded later splits nothing either. Test-only. Verified: cargo fmt. The build and the 3090/780M run are pending; I expect at least one split on the 3090, with a texture in place. Compiled in m3-max-31498 (msi: clippy plain and m2v_gpu, validation archive). Test-only. |
||
|
|
ac296e9b5a |
Bench: a download into a guest RAM over 1, 12 and 128 of its chunks
What: host_ram_spread_bench, an ignored release bench of copy_to_host_ram of a page and of a 1.6 MB tile from a Private buffer into an 8 GiB fresh memfd RAM, the tile's pages drawn from its first chunk, its first 12, or all 128: the call's CPU time, the GPU's and commit to completion, with the chunks touched and held and the dispatches a copy recorded; the page and the near tile again once every chunk is imported, and a raw Private to Shared blit of each size and an empty command buffer for scale. Why: the consumer measured ~15 us a 64 MiB chunk a small download's pages touch on an RTX 3090; this is our own shape of it, to say where the time goes. Verified: not yet run (this commit is what the first jobs build). Compiled in m3-max-31435 (msi: release, --cfg m2v_cpu_icd) and archived in 31436 (--cfg m2v_gpu). Test-only (ignored bench). |
||
|
|
c54c56bd3b |
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. |
||
|
|
203bc97bb9 |
Test counters of plan walks and twin-use checks: compiled only where their test is
What: binding.rs's PLAN_WALKS and plan_walks, and encoder.rs's TWIN_USES_CHECKED and twin_uses_checked, with every increment of them, now take cfg(all(test, debug_assertions, any(m2v_gpu, m2v_cpu_icd))), as kept_resident_checks beside them does. Why: their one reader, tests::resident_uses, compiles only with debug_assertions, so a release test build under --cfg m2v_gpu or m2v_cpu_icd warned that plan_walks and twin_uses_checked are never used (seen in the dlrate lane's release lavapipe build, job m3-max-31435), which fails any release test build under -Dwarnings; debug clippy never sees it. Verified: see the lane's report (a release test build under -Dwarnings and debug clippy). Compiled in m3-max-31462 (msi: release lib test build under --cfg m2v_cpu_icd -Dwarnings; clippy --cfg m2v_gpu debug). Test-only cfg. |
||
|
|
86f02a00fa |
Re-bless the authored compile census at pin 97 (eee64c8668)
corpus-triage --audit authored-compile --bless in m3-max-31443 at
|
||
|
|
eee64c8668 |
heap_textures: the untracked lane encodes once the pipeline pool settled
On the RTX 3090 (31247, the lane at 3df940c15f), both forms read the kernel's write: 0 of 4096 texels as the blit wrote them and 4096 holding a word of the write, in the Shared and the Private heap. But the device split 0 command buffers at aliases, and the lane asserts at least one where DriverFact::ImageUsesMissBufferWritesInOneCommandBuffer holds. The Radeon 780M passed both forms with 0 splits. A compute state's creation under the default PipelineWaitPolicy::Bounded hands its making to the device's pool and returns. A dispatch whose pipeline is still being made then records later, into a VkCommandBuffer of its own (pending_dispatch.rs). There it is apart from the write before it, so there is nothing to split. The lane made its two states on a fresh scratch cache and encoded at once. The lane now waits for the pool to settle (pipelines_settled, as draw_work and made_at_creation do), so both dispatches record into the encoder's VkCommandBuffer, where the split rule acts. The HEAPTEX lines print the creations that left their making running and the segments each command buffer began, which show the path the run took. Test-only. Verified: cargo fmt. The build and the 3090 run are pending. Compiled in m3-max-31407 (msi: clippy plain and m2v_gpu, validation archive). Test-only. |
||
|
|
5e3afa3d79 |
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. |
||
|
|
33369d0e8e |
RUNTIME 2338: Re-homed and carried kept draws restate by their scissor rectangles alone where nothing beyond them changed
Kept::rehomed_into and Kept::carried_into reset the kept draw's render-state stamps to fresh ones (Stated::default()), so the next draw of each derived again everything the encoder's render state decides (restated.rs's restate_kept: the route, the bind state's values, the draw state), though between the walk's draws the encoders set their scissor rectangles alone: on the RTX 5080 compositor walk (107 encoders of 5 draws a frame, abwalk-203314 at 5a4df749ec) 414 of the 428 rebound draws a frame took the full restate, about 0.26 us each, and 14 restated by scissors. A re-homed draw stays under its encoder's render state: rehomed_into now draws its `set` stamp afresh and keeps its stamp beyond the scissor rectangles, so its next draw restates by them alone where the encoder set nothing beyond them since (Stated::scissors_alone), and by everything where it did. A carried draw moves to another encoder, whose render state starts at Metal's defaults: the ending encoder records its pass's extent where it never set its render state beyond its scissor rectangles (DrawAgain::beyond_set, RenderLowering::again_defaults, Carried::defaults), and the opening one gives the carried draws its own stamp beyond them where its pass is of the same extent and it set nothing beyond them either (RenderLowering::carried_stated); else a fresh one, as before. Both encoders' render states are then Metal's defaults but for the scissor rectangles, and the default viewport is the attachment's extent, so restate_scissors answers what restate_kept would. The `set` stamp still differs from the encoder's, so record_rebound still adds the restated draw's pixels to its instance's drawn area and records its dynamic states afresh. Test: tests::split_keeps' two tests assert the re-homed draws (2) and, across two encoders, the re-homed and carried draws (6) restate by their scissor rectangles alone (WorkCounts::draws_restated_scissors), with the same commands, state commands and pixels as every draw taking every step; builds with debug assertions check every second rebound draw against every step. Verification: the jobs that compile and run it are reported with this sha. Compiled in m3-max-31357 (msi: clippy x3; 92 runtime render and kept-draw tests on lavapipe in debug, every second rebound draw checked against every step). |
||
|
|
ebbaf7eff6 |
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. |
||
|
|
5fcd8be7de |
RUNTIME 2337: A pass's first draw that samples a color the pass clears reads its copy cleared to the clear, with no barrier too
A draw that samples a texture its own pass renders reads the texture's shadow, a copy taken before the pass's load actions (texture/attached_reads.rs). In a pass that clears the color, a first draw that sampled it with no barrier read the texels from before the pass at every pixel it read: the M3 Max's answer, while both x86 Macs read the clear there (probe ownread: no draw before it, so the load and the draws before it wrote only the clear). The copy was cleared to the clear (Texture::cleared_copy, vkCmdClearColorImage) only after a memory barrier before the pass's first draw. The Macs disagree, so Metal's answer is either; the macOS guests are x86 ones, and a clear of the copy costs less than a copy of the texture. RenderLowering's draw now takes the cleared copy for every draw that samples a color the pass clears before any draw of the pass recorded, wherever Texture::cleared_copy holds (a whole single-sampled 2D texture of one level and slice that one color renders in place), with a barrier before it or none; the draw keeps nothing to draw again, as after the barrier. A pass that loads the color, and every read outside cleared_copy, read as before. Tests: attachment_reads' no-barrier lane becomes a_first_draw_with_no_barrier_reads_its_pass_s_load, Load and Clear over both target kinds, the texture of its own image taking the cleared copy (attachment_read_clears) and reading the clear where the pass clears; check() counts a cleared copy as taking no split's place with no barrier. framebuffer_fetch gains a_first_fetch_after_a_clear_reads_the_clear (a fetch after a Clear reads the clear, not the texels from before the pass). The conformance rows pass-start-barrier-*-sample with no barrier accept the clear too, as the -read rows did. docs/API.md's accepted differences and attached_reads.rs's docs say which Macs answer what. Verification: the jobs that compile and run it are reported with this sha. With: 645f1c3323 snapshot_reads' first test makes its readers' pipelines before the counted pass; af0a44cc6d The render lanes and inline-split tests read their fixtures where the test runner names the crate; 8b5cd6dfb4 attachment_reads' first-draw lane lets a target over a buffer's bytes take the cleared copy too (test-only). The user's GitHub issue 17. Compiled in m3-max-31319 at 8b5cd6dfb4 (clippy x3; lavapipe lanes, the first-draw lane, the fetch-after-clear lane, the 14 pass-start-barrier conformance rows exact and default; the negative fails). |
||
|
|
86d50ef800 |
heap_textures: a kernel's write of an untracked heap's buffer, read through a texture there in one encoder
A lane for an image use over untracked bytes that a buffer wrote inside one VkCommandBuffer, on a device where DriverFact::ImageUsesMissBufferWritesInOneCommandBuffer holds (the RTX 3090). The tracker's summaries leave untracked resources out, and FoldOrder::byte_writes covers tracked ones only. Whether a write through an untracked heap's buffer still splits a later image use in one encoder had no device test. The lane covers a Shared and a Private placement heap, both untracked, each with a 64x64 RGBA8Unorm storage texture at offset 0 and a buffer of its answered size there. A blit writes the texture's pattern. Then one serial compute encoder runs scale_and_offset into the buffer (1e6 + i into every word), a memory barrier of buffers and textures, and rows_read of the texture. Every texel must hold a word of the write (top byte 0x49), and none the pattern (alpha 0xCD). The write's dispatch names the buffer by its binding, so where the fact holds the read is expected to split at aliases (command_buffers_split_at_aliases > 0), and elsewhere none splits. A write the dispatch's uses do not name (through an address or an argument buffer, its buffer resident) is not covered. command_observing notes and checks the uses alone, not the resident set, and no owned fixture stores through a loaded pointer yet. With e58ce1e02f: heap_textures: the untracked lane's write through an address, its buffer resident The untracked-heap lane wrote the heap's buffer through a binding only. A kernel that stores through the address its argument buffer holds, the encoder making the buffer resident for writing (useResource:usage:), writes the same bytes as the resident set's use: the plan lists the resident buffer as a write of its whole range (bind::plan::slots:: used_uses), and the encoder notes the command's uses, resident ones first, before the next command's image use meets them (alias_split::AliasWrites). This lane checks that on a device where DriverFact::ImageUsesMissBufferWritesInOneCommandBuffer holds (the RTX 3090) the read through the texture still takes the write, in a new VkCommandBuffer, and that elsewhere none splits. The kernel is an owned fixture, examples/argument_stores.metal (store_through_argument: base + i into word i of the buffer whose address buffer(0) holds), compiled by scripts/regen-air-fixtures --dir examples argument_stores (Metal 32023.922, LLVM 21.1.8). The two forms share one body (untracked_write_then_texture_read); the HEAPTEX untracked lines name the form. Verified: cargo fmt; the regen script's own check (metal-as of the typed text disassembles to the .ll, llvm-as 21 accepts it). Clippy and the device runs follow. Compiled in m3-max-31391 (msi: clippy plain and m2v_gpu, validation archive). Test-only. |
||
|
|
96a504a130 |
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. |
||
|
|
7b1725eb34 |
RUNTIME 2336: Lay no more of a predicated loop's copies than keep its waiting host steps within 16
On RADV, runtime_lane::predication::every_dispatch_form_runs_in_each_pass_past_the_copies ran 40-77 s alone and passed its 60 s wait for one command buffer under the suite. The cost is the runtime's, not the test's breadth: each piece of work a host step records after the GPU's work before it (an indirect dispatch of a kernel that observes its partition, an indirect command buffer's execution inside a block) is its own batch, a round trip to the host (submit, wait for the GPU, record, submit) in every run of a loop's laying, whether its copy's pass runs or skips. A loop was laid down as 64 copies (16 inside another), bounded only by its commands (LAID_BUDGET), so the test's inner DoWhile of 20 + 1 passes inside a DoWhile of two laid 1024 copies of its body: measured on lavapipe at the base (msi job m3-max-31287, a timing probe), its command buffer's first run recorded 4097 host steps and made 8195 submissions (6145 and 12291 on the device without device addresses, whose step form records six such pieces a pass), where its 21 passes ran 84 (126); the DoWhile of 100 passes 257 (385). That command buffer was 94% of the test's 21,772 submissions, and each costs a GPU round trip, a few milliseconds on RADV. copies_of now bounds a loop's copies by a second budget too: the work apart whose host step waits for the GPU (Deferred::gpu_written) that its copies lay down, at most WAITED_BUDGET (16), counted as LAID_BUDGET counts commands, from the first copy's, inner loops' copies included (Predication::waited, Looping::waited_at). A loop of no such work keeps its 64 or 16 copies. A loop that ends before its copies pays at most 16 round trips for the copies it skips, and one that runs past them one more round trip, its check, per 16. The run-again path, unchanged, takes any count of copies down to one. Tests: every_dispatch_form_runs_in_each_pass and the failing test assert each loop's first run records at most 16 host steps and the check (257 and 4097 at the base: the negative control); the 100 passes no longer run again exactly once. docs/API.md and docs/RUNTIME-PORTING.md name the new bound. With abd0662e9f: the budget trades nothing for accuracy, so it has no FAST-PATHS row. |
||
|
|
e9a9a53e55 |
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. |
||
|
|
6ef0802488 |
RUNTIME 2335: The draw replay kernels' pool piece holds the device as a runtime holder, never the program's last handle
Device::begin_draw_replay_kernels (RUNTIME 2330) hands the pool one piece that makes the draw replay's three kernels after the creation of a render state that supports indirect command buffers, and the creation waits for none of them. The piece upgraded a weak handle of the device, which device/holds.rs counts as a program handle. A program that dropped its last handles while the piece was still making a kernel had its drop return with the device live. The pool's thread then let the device go last, and an exit meanwhile left that teardown undone. On NVIDIA's driver the exit handler of libEGL_nvidia then faults on the live VkDevice (docs/FAST-PATHS.md, known gaps). This is render_fold::an_execution_of_render_commands_ends_its_group's SIGSEGV after it passed, on the RTX 3090 and the RTX 5080 Laptop GPU. The 5080's core (systemd-coredump, job 31206) has the main thread in exit() inside libEGL_nvidia's exit handler, in libnvidia-eglcore. No runtime thread was in a Vulkan call, and the device's shader-cache worker was still alive; that worker stops only in the device's teardown. Now the piece takes the device as one of the runtime's holders (WeakDevice::hold, Holder::DrawReplayKernels) for each kernel's making, lets it go between kernels, and reads holds_go_on before each one. The program's last drop stops it at its next kernel and waits for the one it is making, so the device is torn down on the program's thread before that drop returns. The creation still waits for none of the kernels. Test: teardown_threads::a_running_draw_replay_kernels_making_leaves_the_device_to_the_program_s_thread. An ICB-capable state's creation starts the making, which is held before a kernel while it holds the device. The program drops the state and the device, and the test asserts the teardown ended on the program's thread before the drop returned. |
||
|
|
b94c15a5c0 |
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. |
||
|
|
e9eaa47436 |
RUNTIME 2334: A reader through snapshots rebound into an instance recorded inline after a split keeps its pairs
RUNTIME 2332 admits an instance whose draw reads colors through snapshots to the inline splits (render/inline_splits.rs), but record_rebound still refused a kept reader rebound into such an instance: the arm (Some(pairs), Some(held)) returned the internal error "a reader rebound into an instance recorded inline after a split", whose comment the admission had made false. On ms01's Iris Xe (ANV, which takes snapshots) runtime_lane::attachment_reads:: own_pixel_reads_copy_in_only_around_their_scissors failed its draw with that error (job m3-max-31219, at 5a4df749ec). The arm now keeps each of the reader's pairs in the instance's room, the drawing one inside its coverage query, as the every-step path keeps them (Kept::draw, begin_query, end_query): the pass's end records them through the pass's record, in order. Verification: the jobs that compile and run it are reported with this sha. |
||
|
|
7200b49c2f |
heap_trimmed makes a long chain of few values live and a short one of many, on every device
The test made one kernel, 320,000 fused multiply-adds with 64 values live
(
|
||
|
|
5d25521f03 |
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. |
||
|
|
5efe2f1d73 |
Test queue limits count the program's live command queue handles
The runtime tests' default queue limits count the queues the program holds, not live ones The check that fails a test needing the queue plan counted live queues (QueueShared). A command buffer holds its queue's QueueShared, and the runtime's threads let a completed one go a moment after its wait returns. So a test that let a queue go and then made two more could fail or pass by timing. The check now counts the command queues the program holds a handle of: - each QueueLine counts, under cfg(test), the command buffers alive whose `commandQueue` it is; - a queue the program made is held where its strong references outnumber those command buffers plus the caller's upgrade (QueueLine::held_by_the_program, Line::program_queues_held); - a command buffer takes its count before its handle of the queue and drops it after, so a count in passing reads one fewer, never one more. The product's count of live queues (WorkCounts::command_queues_live_most) is unchanged. The device test a_default_test_device_fails_where_its_work_needs_the_plan now keeps a command buffer of a queue it let go before making the third. The live-queue count panicked there; the held count does not. The message reads "while the program holds 2 of its command queues". docs/VALIDATION.md and TEST_QUEUE_LIMITS' doc say the same. The command buffer's count among its queue's is a guard held for its drop: _counted Clippy (-D warnings) refused 3d6e4e5957's field `counted`, never read: the field exists for its Drop, which takes the command buffer's count off its queue's. Named _counted, as a guard held for its drop. The test limits' check runs where the program makes a queue, not where a recovery places one again With the held count, a recovery's queue that took its place on the new generation counted itself and the program's other queues. So device_recovery's a_loss_holds_the_hang_s_queue_until_the_recovery and work_held_unsubmitted_at_a_loss_fails_as_its_victims_in_queue_order (two queues each) failed on lavapipe at 577d649100. The rest of the suite passed: 2741 of 2743. The check now runs in Device::command_queue, for a new round-robin or unshared queue of the program's, before its place. A queue placed again after a recovery was counted where it was made. Verified: job 31249 at 1f69cb2e0c: clippy plain, --cfg m2v_gpu and --cfg m2v_cpu_icd; queue_limits, queue_limits_device and device_recovery on lavapipe three times (22/22 each); the runtime suite on lavapipe 2743/2743; a negative control (the old live count) fails at the third queue. Test-only (cfg(test)). |
||
|
|
cbfe9940c8 |
copied_base_device holds the whole-base merge under 2 s in release builds only
a_whole_written_device_base_is_read_back_by_the_gpu timed a first merge back of a 256 MiB device base after 3 s idle and held it under 2 s. On the RX 7900 XTX (um790) its debug build took 2911.9, 3255.3 and 3131.9 ms in the pin 94 and 96 legs, the last exclusive, where a release build on the same host took 291.5 ms (job 17624). The probe (m3-max-30832, exclusive) ran the test twice from pin 96's archive, alone and with the device kept open: the XTX's PCI power/runtime_status stayed active and runtime_suspended_time 0 through both, amdgpu.runpm -1, autosuspend 5000 ms, link 16 GT/s x16; the merge took 2971.0 and 3120.7 ms, every one of 262,144 blocks read back. So no runtime suspend: the time is the debug build's unoptimized host work. The test keeps every claim the product controls (one read back of every block, an exact merge) and holds the 2 s bound where the build is optimized; a debug build prints the time. Verified: cargo fmt. The XTX run follows. |