37fffd39fc4b2e6d6c335eefd08dc04f983974d2
1676
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
37fffd39fc |
replay: the display library line names the sidecar by SHA-256 and git blob id
The planner's condition on the display sidecar: every play states which display library it ran. The report's display library line now gives the sidecar's length, its SHA-256, and its git blob id (the SHA-1 of "blob LENGTH\0" and the bytes). The blob id names the file in the host's tree: every stream so far holds blob b1aea1f0, 47,426 bytes. The doc also says the sidecar holds the host's display shaders alone, and that a player makes only the device's library from source of no arguments from it. The validation crate takes sha1 0.11 (RustCrypto, MIT OR Apache-2.0; the same digest family as sha2 0.11) for the blob id. Test: the integration test expects the 5-byte sidecar's SHA-256 and the blob id `git hash-object` gives for the same bytes (8d7ffd7e). Verified by the lane check named in the hand-over. |
||
|
|
0ee01c4eda |
replay: the host's library from source is made of the stream's display library sidecar
webdiv-780m-3's record 11498, newLibraryWithSource:options:error: on the device with no arguments, is reims's host loading its own display shaders. The players skipped every library from source, and with it the host's 773 present draws, so both plays of webdiv-780m-3 ended as no verdict. A program's own libraries reach the stream as data, never as source. The decided form is a sidecar beside the stream, NAME.display.metallib, like NAME.range: - command-replay reads the sidecar (replay::display_library) and gives it to either backend (with_display_library). - The report says so in the line after `range`: `display library the stream's sidecar, N bytes`, or `display library none: the host's library from source is skipped`. - Both players make a library from source of no arguments from the sidecar, as from data. Any other library from source, or one without a sidecar, stays skipped and counted. docs/REPLAY-STREAM.md sections 1 and 10 state the sidecar and the line. Tests: - An integration test reads the line without the sidecar and with a 5-byte one; the range test's line positions follow the new line. - A device test makes a function of the host's library with the display library and skips both without it. Verified by the lane check named in the hand-over. |
||
|
|
d7156b3ca7 |
replay: a placement owed to a held commit takes the index without waiting, counted
A placement whose index is owed to a command buffer that no record played so far lets
complete (its event wait is signalled only by a later record) stopped the play with
PlayError::Held. In the recording that order proves the recording device gave the index to the
new object before that command buffer completed: that is its index policy. The player now plays
what the device did: it takes the index without waiting and counts the placement on its own
report line ('indices given while a commit they owe is held N: ...'). The index stays owed to
the held commit. Where the owed commit is not held, the player still waits for it.
PlayError::Held, held_error and HeldBuffer's queue and unmet waits are deleted: nothing reads
them now. Backend::held takes the held command buffers' stream ids.
The rt_replay test that pinned the stop now expects the index taken (16) and the count of 1.
Verified by the check job named in the hand-over.
|
||
|
|
f3f13c87ab |
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. |
||
|
|
b7ef04ae97 |
rt: a sampler state binds with LOD clamps that read as its own; others are Gap::LodClamps
The replay streams bind sampler states with Metal's bind-time LOD clamps (`setFragmentSamplerStates:lodMinClamps:lodMaxClamps:withRange:`): web3d on the 780M makes 2,635 such calls and on the 3090 2,627, every one over a state made with clamps (0, FLT_MAX), half of them binding (0, FLT_MAX) and half (0, 1000); glbench makes none (replay's census). rt had no such form, so the player skipped and counted the second kind. A sample's level is clamped into the clamps and then to the texture's levels, at most 14 (Metal's largest textures have 15 levels), and a level below 0 is level 0. So two clamps read alike where each bound held to [0, 15] (the translator's LAST_WORD_LEVEL) is equal: in Metal's sampler, in the device sampler `vk_sampler` makes (Vulkan clamps into [minLod, maxLod] and then to the view's levels) and in the sampler word. The translator states the rule (`metal::sampler::lod_clamps_read_alike`); rt's compute encoder (`set_sampler_state_with_lod_clamps`) and render encoder (`set_vertex_sampler_state_with_lod_clamps`, `set_fragment_sampler_state_with_lod_clamps`) bind the state as it is where the clamps read as its own, which covers every call the streams make at no cost, and refuse others as the new `Gap::LodClamps`, binding nothing (no stream makes one; a variant or a shader clamp is built when one does). Each range form is a loop of its single form. Tests: the translator's unit test pins the rule (1000 and infinity over FLT_MAX, -1 over 0 alike; 14, a raised lower bound and NaN not) and that every alike pair gives the descriptor's word, query level and device lods; a device test binds on the three forms and gets the gap on each; the sampling test binds its state with (0, 1000) and checks its samples as before. REFUSALS.md regenerated; the signature and surface tables take the new items. Verified in the job named in the landing message. |
||
|
|
aab68d6253 |
rt: a read_write slot a function only reads is the swizzled-texture gap too
The gap was found from the slot's hazard access, which the translator gives by use: a read_write slot the function only reads is a read there, so a swizzled view bound to it passed the check and its read answered the texel unswizzled. The device test caught it on lavapipe (49090: the read_write read of the view returned no gap). The translator now states the declared side: TextureSlot::storage, true where the function declares the slot write or read_write and so reaches a storage image, whose view maps each channel to itself. rt keeps the slots read through one (storage with a read) for kernels and for draws, and the gap is found from that list. The cache encoding carries the field (ARTIFACT_FORMAT_VERSION 540); api_signatures gains the field; REFUSALS regenerated. Verified: to follow in the build, tests and touched stages. |
||
|
|
2012b832c0 |
rt: a read_write slot bound to a swizzled texture is a typed gap at the bind
Apple defines the swizzle for reads and samples. A write through a swizzled
view, and a render pass into one, store the texels unswizzled: Metal's
documented answer, so that half leaves the README's known gap. A read() of an
access::read_write slot reads through the texture's storage element, which
maps each channel to itself as Vulkan requires of a storage image
(VUID-VkWriteDescriptorSet-descriptorType-00336), and would answer the texel
unswizzled where Metal reads it through the swizzle: a wrong answer, which no
static note covers.
Such a draw or dispatch is now Gap::SwizzledReadWrite { slot }, found with the
bind-time facts (the draw's Facts::find, the dispatch's alignment check), so
the test runs once per pipeline-state or binding change and only for the
translated interface's read-write texture slots. The players count it as they
count every gap.
Test (tests/swizzle.rs, on devices, the owned fixture rrp_swizzled_storage):
an access::read read through a [B,G,R,1] view of (10,20,30,40) answers
(30,20,10,255); an access::write write through it stores (0.2,0.4,0.6,0.8)
unswizzled at each texel; the read_write kernel bound to the view is
Gap::SwizzledReadWrite { slot: 0 } and over the texture itself reads its
texel.
|
||
|
|
1440a93e6c |
rt: swizzled texture views, the view's swizzle over its parent's
newTextureViewWithPixelFormat:textureType:levels:slices:swizzle: is Texture::new_texture_view_with_swizzle. The view's swizzle combines with the parent's as Apple states it (each channel the view takes from red, green, blue or alpha is the parent's as the parent's swizzle reads it; Apple's example [R,G,A,B] over [R,1,1,G] is [R,1,G,1]), so a view of a swizzled texture is built too and TextureViewKind::Swizzle goes. The view's descriptor holds the combined swizzle and its resource ID that swizzle's TextureWord. Metal takes the call whatever the parent's usage: glbench-780m-r1's 128 non-identity views are of textures of shader-write, and most of render-target, usage. A view takes its descriptor's checks but the swizzle-with-writes refusal, which Metal makes of a texture's own descriptor alone (prepare's checks split into checked()). The sampled element takes the combined swizzle; the storage element and attachment views map each channel to itself, as Vulkan requires (VUID-VkWriteDescriptorSet-descriptorType-00336, the rendering attachments' identity VUIDs). A read of an access::read_write texture and a write through such a view therefore reach the texels unswizzled where Metal swizzles them (and, recorded by swizzled-storage-*, undoes the swizzle on writes): a known gap in the README. The rt player maps the selector and its resourceIndex form; the conformance rt side makes the requested swizzled views instead of answering unavailable. Tests: the combination (Apple's example, identity on either side, constants, a rotation twice); on devices, a view's descriptor and word for Apple's example, a view without a swizzle keeping the parent's, and a swizzled view of a shader-write, render-target texture made. |
||
|
|
9c40b3cd83 |
rt: depth tests, writes and bias as dynamic state, under static notes; an unknown store action stores
The render-state lane's depth step (the planner's step 1). - A depth-stencil state's depth test, write and compare operation are dynamic state, recorded where they changed; DrawKind::DepthTest is gone. A pipeline bakes the depth format alone, so a change of depth-stencil state or bias makes no pipeline. In a pass without a depth attachment Vulkan skips the test, where Metal's documentation states no answer. - set_depth_bias (setDepthBias:slopeScale:clamp:): the bias and slope scale as given, enabled for a draw of triangles where either is not zero and never for lines (Metal biases triangles alone). A clamp other than 0 is Gap::Draw of DepthBiasClamp (no stream sets one). - Static notes, carried by the operation: PrecisionNote::DeviceDepthBias (RenderCommandEncoder::DEPTH_BIAS_NOTE: the slope measure, and a fixed-point attachment's unit, are the device's; Apple states neither; read from Vulkan's Depth Bias section and Apple's setDepthBias page), and PrecisionNote::DepthDenormals (DepthStencilState::precision_note, a state that tests or writes depth: every driver measured but MoltenVK on an M4 compares a denormal depth otherwise than Metal; RADV and ANV store one as zero). The old runtime maps DepthDenormals to its own depth-denormals kind and takes device-depth-bias as a note kind; codec, fast_paths, validation's allowance (Unbounded), API.md and ARTIFACT_FORMAT_VERSION 539 follow. No signed-depth note: no clear, viewport or upload gives rt a negative or NaN depth, and Vulkan leaves a depth past the viewport's range undefined. - MTLStoreActionUnknown stores (Vulkan fixes the store as the rendering begins); the encoder's set_color_store_action, set_depth_store_action and set_stencil_store_action change nothing the device does and refuse a resolving action (Resolve). On a tile-based device this stores a target Metal would have discarded (README). - set_triangle_fill_mode, set_depth_clip_mode, set_viewports and set_scissor_rects take Metal's defaults (Fill, Clip, one viewport or rectangle) as nothing and refuse the rest, typed (FillMode, DepthClamp, Viewports): replay found every stream at the defaults. - The conformance rt side plays the depth bias, fill, clip and viewport-count steps and announces the encoder's notes; the replay player maps setDepthBias:slopeScale:clamp:, the three store action setters, setTriangleFillMode: and setDepthClipMode:. - Tests: a depth attachment cleared to 0.5 with its store action unknown, tested under Less with writes, failing at 0.375, passing Greater by its bias alone, every mode setter's refusal, and no pipeline made by the state changes; the instructions a depth-tested draw retires beside a plain one, printed. REFUSALS.md regenerated, the API table blessed. |
||
|
|
e3b8d67b5b |
runtime: a command buffer whose timestamps read unavailable completes, counted, and is no victim
A regression fix in the frozen old runtime. Matrix 749c939440's UHD 630 leg (Windows, Intel driver 101.2145, job 48872) failed the old runtime's burst_2000 and burst_2000x5 with "the command buffer ended Error: Some(GpuRecoveryVictim)", with no device loss and no recovery notice: at least one of the old runtime's 2,010 submissions a run read a timestamp unavailable once its queue's timeline had passed it, and the old runtime took that as work the driver dropped and failed it as a victim of a GPU recovery. The old runtime's poll already orders the read after a host wait on the fence or the timeline, so this driver showed the signal before the timestamps' availability. A signalled submission with its timestamps unavailable is no lost GPU: the command buffer now completes, its GPU times 0, counted as before (`WorkCounts::unrun_command_buffers`), as the new runtime counts the same case and fails nothing. The cost is the case the branch was made for: work Linux's amdgpu drops with no error (a job its timeout ended, and those queued behind it) completes with no error too. The FAST-PATHS known gaps, the module docs, the error's and the count's docs and the README say so. Test: the device test `dropped_work` now asserts the injected unavailable read completes with no error, its fill ran, its GPU times 0, counted once, and the queue runs on (the old form asserted the victim). Verified in the jobs named in the landing message. |
||
|
|
1ba761329c |
replay: a render pipeline record's tessellation state and call-stack depths are read
reims's recorder (descwire) now writes three keys at the end of each newRenderPipelineStateWithDescriptor:error: map, always: - `tessellation`, a map of the seven tessellation properties as Metal's raw values; - `maxVertexCallStackDepth`; - `maxFragmentCallStackDepth`. The players refused any key they did not know, so every pipeline of such a stream would have been refused. A stream without the keys means Metal's defaults (0, 16, false, 0, 0, 0, 0; depths 1 and 1): the device built those before the recorder carried them. There is no header bit, and the host's short display map is unchanged. Both players (translator::render_pipeline) now accept the keys: - The depths always go to the descriptor. - The tessellation state goes to it only where it differs from Metal's defaults and the vertex function is a post-tessellation one (patchType not None). Any other vertex function ignores the state, as Metal does, so a plain pipeline is never handed tessellation state the new runtime would refuse. docs/REPLAY-STREAM.md section 9 states the keys, their defaults and the names that differ from Metal's. Test: a unit test parses the recorder's pinned record (partition 3, factor 32, scale on, half, uint32 indices, per-patch, counter-clockwise; depths 2 and 3) to those values, a record without the keys to the defaults, and refuses an unknown key at the top and inside the tessellation map. Verified by the lane check named in the hand-over. |
||
|
|
57272b7db9 |
replay: a compute pipeline state the runtime does not build is skipped and counted
A per-gap play counts the gaps, but a compute pipeline state that the runtime
answered with a typed gap, or that the translator refused, stopped the new
runtime's play at once. glbench-3090-r2 stopped at frame 0 on an
IdentityDomains refusal, and nothing after it was counted.
Compute pipeline states are now skipped and counted the way render pipeline
states are (
|
||
|
|
3070737d28 |
translator: a kernel that encodes indirect commands is refused for that feature under the identity domains
Under the identity domains an encoder operation was refused only at the domains' admission check, as Unsupported{IdentityDomains, NotImplemented}: its plan pushes the resident set's root table and the execution status, which the identity domains do not take. The refusal now names the feature the kernel uses: the encoder operation's own check (encode.rs, needs) refuses it as Unsupported{GpuEncodedIndirectCommands, NotImplemented} under those domains. The new runtime already answers a state for indirect command buffers with Gap::IndirectCommandBuffers; its README says the translator refuses a kernel that encodes into one. docs/REFUSALS.md regenerated.
Verified: the new engine_identity test fails before the change (IdentityDomains) and passes after; job named with the sha.
|
||
|
|
96ef4a692e |
replay: a buffer's linear texture plays as the texture over it where 2D
The SPI newLinearTextureWithDescriptor:offset:bytesPerRow:bytesPerImage:
stopped the new runtime's play of webdiv-780m-2 at frame 0 ("not played on a
buffer"): the stream makes one such texture, a 2D one over a no-copy buffer.
Neither player knew the selector.
The old runtime measured the SPI as newTextureWithDescriptor:offset:bytesPerRow:
for a 2D descriptor, plus 2D arrays whose slices Metal lays out itself
(bytesPerImage ignored; Buffer::new_linear_texture). The old player now calls
that. The new runtime has no form of the array layout, so its player plays a
2D descriptor as the public texture over the buffer (its resource index
included) and refuses any other type, "a linear texture of a type other than
2D". docs/REPLAY-STREAM.md section 5 names the selector.
Test: a device test plays a 2D linear texture with nothing skipped and gets
the refusal for a 2D array. Verified by the lane check named in the hand-over.
|
||
|
|
e04254de14 |
matrix: a timing leg names its old runtime's own spread, and is timed again past 10%
The planner's rule for timing legs: each prints the BASE arm's own spread across its passes; past 10% the leg is VOID and is timed once more at another time, and a leg VOID twice is reported as "venue unstable", never as a red row. In a matrix harness leg the base arm is the old runtime, and the rows it times more than once in a leg are the re-timed ones: its main run and each re-timed pair's (RETIME_PAIRS). results.base_spread takes, of each such row, the old runtime's largest time over its smallest, less 1, on the time the row is judged on (its GPU time where gpu_judged), and the largest of the rows; a creation row's first samples are cold, spread by nature and judged cold against cold, so none counts; with no row re-timed it is n/a and voids nothing. Past BASE_SPREAD (10%), harness_budget names every problem the leg's times would raise VOID and parks it, and the problems of its records and counts stand; the over table reads VOID on each of the leg's times. The matrix (Run.timed_again) times such a leg's harness once more, after the node's other jobs (the Windows host's right after its own), and judges that timing. The leg's line names its base spread and what came of a first timing; a leg VOID in both reads `venue unstable`, verdict UNSTABLE, which the run counts apart and which does not fail it. A node's last job is now the last one it actually runs, the re-timing included, so the tree and the carry's mirror are tidied after it. Verified: the matrix's Python tests, new ones: the spread on time and on GPU time, n/a with no re-timed row, a cold first sample never counting; a leg past it failing on its records alone and the same row failing within it; the verdict line's spread, n/a and UNSTABLE; the over table's VOID; and a node's harness timed once more after its other jobs, once only, its last job the tidying one. In the job named in the landing message. |
||
|
|
7e33975f58 |
matrix: NVIDIA's first take of 64 MiB is judged on the new runtime's own part
The planner's ruling on create_64MiB/first_take on NVIDIA's legs: the gate changes, not the
ceilings. From the next round on the row is judged on the new runtime's own part, its first take
less the time inside the driver's calls the same process recorded, against the old runtime's whole
first take, each the median of the five creation processes; the driver's part and the whole ratio
are shown beside it, with the gap's name. An own part past the row's limit (1.03 times its floor,
the parity every row gets) fails the leg as a regression of its own.
The driver's part is `first_allocation_total`, the new runtime's `vkAllocateMemory` time on the
harness's thread in the same take, kept from every process already (FIRST_KEEP). rt counts no
`vkMapMemory` time, so the map stays in the own part, the stricter reading. On
|
||
|
|
c027cc2cfa |
replay: skipped render pipeline states are counted by the runtime's gap
The report gave one line for every skipped render pipeline state, its
total and the first one's answer, so a stream's states refused for a
depth attachment, for framebuffer fetch or by the translator read as one
number. The planner's census of what the new runtime refuses needs the
count of each kind per stream.
The backend now keeps the skipped states by the gap as Rust prints it
for debugging (Translation where the translator refused), with the
first one's object and answer, and the report gives a
"skipped render states GAP N, the first #ID: WHY" line for each, as it
does for render commands; skipped_render_states is their sum.
docs/REPLAY-STREAM.md describes the line.
Verified: see the check job (a new rt_replay device test: a state with
a Depth32Float depth attachment is counted under
RenderPipeline { kind: DepthAttachment }).
|
||
|
|
f9633bf18d |
rt: a pass's depth attachment is loaded, cleared and stored, untested; a pipeline state takes its depth format
The render-state lane's first feature. A replay stream's 478 depth passes (depth census
m3-max-48544, the one stream with any) are a shader-read Depth32Float texture with no stencil
attachment beside it, a Clear of 1 (476) or a Load (2) and a Store, drawn under Metal's default
depth-stencil state (compare Always, no write) by four pipeline states of depthAttachmentPixelFormat
Depth32Float. rt refused all of them: the pass by RenderPassKind::DepthAttachment, the states by
RenderPipelineKind::DepthAttachment.
- pass.rs: Pass holds the depth attachment as it holds the stencil one: a format with depth
(else Refusal::AttachmentFormat, as Metal's validation stops it), the texture's view of the
level and layer, Metal's load and store actions as for a colour, its clear depth a float.
`vkCmdBeginRendering` takes it as pDepthAttachment. With a stencil attachment beside it the two
are one view (VUID-VkRenderingInfo-pDepthAttachment-06085): two others are
RenderPassKind::DepthStencilViews. A Clear outside [0, 1] or NaN is RenderPassKind::ClearDepth
(VUID-VkClearDepthStencilValue-depth-00022; the floor has no VK_EXT_depth_range_unrestricted).
Pass::targets yields each image once, so a combined texture's one view is moved, kept and
barriered once.
- render.rs: the descriptor's depth format is no refusal. Fixed holds the translator's depth
format (vk_format over the device's format query: a format the device does not render depth
in is the translator's typed refusal), the VkPipeline renders into it, and renders_into holds
it to the pass's depth attachment, as the colour and stencil formats are.
- The draw keeps DrawKind::DepthTest for a state that tests or writes depth; the encoder's
dynamic depth state stays off, which is what the default state means.
- error.rs: RenderPassKind::DepthAttachment and RenderPipelineKind::DepthAttachment go;
DepthStencilViews and ClearDepth come. Their docs, the bases and Refusal::AttachmentFormat's
doc say what is built.
- README: the render pass and encoder sections and their known gaps.
- docs/REFUSALS.md regenerated; the API signature table blessed (two variants out, two in).
- tests:
- draw.rs every_device_clears_loads_and_stores_a_depth_attachment_its_draws_do_not_test: a
shader-read Depth32Float attachment cleared to 0.25, then loaded, each pass one submission,
three barriers, one pass, no byte copied; the colour drawn; the depth read back 0.25; a state
without the pass's depth format, one with it in a pass without depth, and a Less test are
each their gap.
- pass.rs: the depth refusal is replaced by a depth attachment of a colour format, a depth and
a stencil of two textures, and a clear depth of 2 and of NaN.
- render.rs: the depth attachment leaves the pipeline refusal list.
Verified: nothing yet; the next check job compiles and runs it.
|
||
|
|
a314b75ee6 |
replay: a play ends at the stream's recording range unless --past-range yes takes it past
A known-bad tail cost a ring timeout on a shared card and a wrongly bounded play. The player now ends every play at the recording range by default: - the stream's sidecar, NAME.range beside NAME.0000.m2vr, one line: "last-frame F" or "whole"; - else the player's table RECORDED_RANGES for the streams recorded before sidecars, found by the first segment's file name and byte length: u2 1128, u3 1178, r3 1137, r4 1099, b3 whole; - else the whole stream (the 3D streams until their ranges are stated). --past-range yes plays past it; without it --until-frame F stops at the earlier of F and the range. Every report says which range the play used, where it came from and whether the play ends there, on a range line after the completion mark; a sidecar of neither form is a harness error (exit 2). docs/REPLAY-STREAM.md: section 1 names the sidecar, section 10 the default, the flag and the report line. Tests: replay::tests a_recording_range_comes_from_the_sidecar_then_the_table (sidecar over table, table row by name and length, no row, bad sidecar); integration replay_range runs the binary over a synthetic stream with no sidecar, a last-frame sidecar, the flag and a bad sidecar (no device opens); replay_completion_mark now expects the range line second. |
||
|
|
0a0ce8e29b |
rt: a cube array texture is a typed gap, so no view needs imageCubeArray
rt made VK_IMAGE_VIEW_TYPE_CUBE_ARRAY views without the imageCubeArray feature, which its floor (Vulkan 1.3) does not require: the conformance whole set's layer leg on lavapipe (job m3-max-48531) logged VUID-VkImageViewCreateInfo-viewType-01004 ten times once the rt side made the cases' cube array textures. No replay stream makes a cube array texture or view (cube census over every stream, jobs listed in the landing message), so by the planner's scope rule a cube array is a typed gap until one does, and the floor is unchanged. - error.rs: Gap::CubeArrayTexture, basis ours. - texture.rs: prepare refuses a CubeArray descriptor, which every texture and every view of one passes through, so no cube array view is made; the descriptor's and new_texture's docs name it. - README: the texture section's gaps. - docs/REFUSALS.md regenerated; the API signature table blessed (one variant added). - tests/texture.rs: a cube array texture is the gap on every device of the cfg. Verified: nothing yet; the next check job compiles and runs it. |
||
|
|
5849a7f029 |
matrix: each runtime's creation rows run in a process of their own, cold against cold
The planner's rule: a cold first sample is compared cold against cold. The creation rows ran in five processes that each timed both runtimes, the new runtime first, so the driver's process-wide setup fell on the new runtime's first pipeline and the old runtime's first samples came after it, warm. Measured on the Iris Xe (job 48650, ms01 alone, both runtimes from the harness at cb25e3a83e, five processes each): the old runtime's create_state/first was 5265.8 us behind the new runtime in one process and 16732.8 us in a process of its own (0.315x); device_first 0.167x, first_call 0.099x. The one-process ratio new/old 1.302 at first was a cold-against-warm ratio; cold against cold it is 0.410. Of the two forms the planner allowed, each runtime's own fresh process is the cheaper: the harness does not change, and the extra five processes a leg runs take about a second each (create_state's processes on the Iris ran in under one second). The other form, one unrelated pipeline before either runtime in a shared process, would need harness code and leaves the first samples process-warm, not cold. So each of the five rounds now runs `--runtime new` and `--runtime old` in processes of their own, each on a fresh driver cache and store, the order alternating from round to round (new first in rounds 1, 3 and 5); the first round's two outputs are kept whole, the later rounds' first samples as before. The records, their names and the budget's medians do not change. Verified: the matrix's Python tests in the job named in the landing message (the harness-runs test now pins the processes and their order). |
||
|
|
6605f18ddf |
harness, matrix: the frames' commit-to-complete row is gone after its one round
The planner's frame ruling showed the frames' old figure, their last command buffer's
commit-to-complete time (`<row>/commit_to_complete`), beside the new throughput row for one round,
unjudged, then deleted. The round at
|
||
|
|
ca92b2aa9e |
harness: a compute state row's first dispatches 64x1x1, the streams' commonest size; one thread beside it
The create_state row's first dispatched one thread (1x1x1), a size of few dispatches: 3.9% of the compute dispatches in the discrete replay recordings (from 3 to 5 kernels) and at most 0.5% in the unified ones, by identity's census of every stream's threadsPerThreadgroup. A runtime that compiles its pipeline for the dispatch's size (the old runtime) compiled the first at 1x1x1, where a program's first dispatch runs at its own size. The first now dispatches one threadgroup of FIRST_THREADGROUP, 64x1x1: the commonest size over the five streams of record, 24.1% of their compute dispatches (41.7% of the unified recordings', 7.1% of the discrete ones', where 128x1x1 leads with 39.3%; 128x1x1 is 23.3% overall). Each thread's 16 bytes are checked. Today's form stays beside it, shown and never judged: another content's first (the kernel with other constants) dispatched as one thread, create_state/first_one_thread (CreateReport::one_thread_first_us; results.SHOWN_FIRST). The name has no digits so the matrix's FIRST_KEEP keeps it from every creation process, which a results test holds. The warm-up stays at one thread. docs/VALIDATION.md and the crate doc say it; the authored device test asserts the compute row has the one-thread first. |
||
|
|
c1bd2d46d6 |
replay: a report of a stream recorded before the completion fix says so on its first line
The recorder's completion fix marks a stream with header flag bit 1, FLAG_COMPLETION_BYTES_RECORDED (value 2): at each command buffer's completion the stream holds every chunk the buffer's work could store to as the GPU left it, before any later CPU write, on all four late routes (signalled event, final status read, refused hook, released command buffer). Fixed streams read flags 3; every stream recorded so far reads 1. - The reader takes bit 1 (it refused any bit but 0 before), so a fixed stream plays. - command-replay play writes "recorded before the recorder's completion fix: the stream may differ from what the program did" by itself as the first line of report.txt for every stream without bit 1, so no table relayed from a report loses it. The stream is now read before the device type is parsed, so even a report that stops there carries it. - docs/REPLAY-STREAM.md: section 1 names the bit, section 6 replaces the rule that described a stream without completion writes as allowed with the completion invariant and what a stream without the bit may miss, and section 10 names the line and its place in report.txt. Tests: replay_completion_mark (integration) runs the player binary on a one-call stream with flags 1 (the report begins with the line) and flags 3 (it does not), with a device type no device has so no device opens; the header flags test now reads flags 3 and refuses bit 2. |
||
|
|
f1f846e636 |
rt docs: the consumer's own drivers in the guide, the validation ladder and the surface table
`Instance::with_drivers` and `Error::NoDirectDriverLoading` are public: the runtime's guide says what the call does, what it refuses and what it leaves to the consumer (loading the library and keeping it loaded); docs/VALIDATION.md says how a job runs the device tests through it (`M2V_DIRECT_DRIVER`) and what shows the path ran; the signature table takes the two records (scripts/api-signatures/signatures.py --bless). docs/REFUSALS.md regenerated unchanged: the variant refuses nothing Metal accepts, it says the host's loader lacks an extension. Verified: the generators' output; the build and the tests in the jobs named in the landing message. |
||
|
|
d3bfe3815d |
harness, matrix: a frame row is its throughput, and its latency from idle a row of its own
The planner's metric for the frame rows. A frame row's time was its runs' last command buffer's commit-to-complete time with two runs in flight, which mixes the time a frame adds with how long it waits behind the one before. Now `frame` and `frame_5cb` (Plan::frames) carry two figures, each the steady time (best window of ten) of the harness's own completed-handler times: - THROUGHPUT, the row of record (matrix_time): two runs in flight, from one run's last completed handler to the next's. The pairs around the waits that read the gauges after runs 100 and 200 (GAUGE_RUNS) are left out, as an untimed run sits between them. - LATENCY FROM IDLE, the row `<row>_from_idle` (FROM_IDLE): as many runs again after the timed ones, one in flight, each committed once the one before it completed, from just before its first commit to its last completed handler. The completed handlers now report the time of their commit and of their own run against one origin (Completions, Handled), so the commit-to-complete times, the throughput and the latency come from one record. The frames' commit-to-complete time is still printed, as `<row>/commit_to_complete`, which the matrix shows and does not judge (SHOWN_ROWS) for one round. Each latency row takes the ceiling and floor its workload's row has (listed_row), in the budget, the over table and the re-time selection, and is re-timed through its workload's runs. Other workloads are unchanged, long_4cb's commit-to-complete time included. The shape follows core's one-run-in-flight probe (3eaec97076), without its environment gate. Verified: test_results (a new test: a latency row past its workload's ceiling and the budget, the commit-to-complete row shown and never judged, the over table and the re-time selection choosing the latency rows); the harness's unit tests gain the throughput and latency arithmetic (the gauge pairs left out) and matrix_time's frames case; the harness gate job named in the landing message runs clippy, rustdoc, the unit tests and the authored workloads on lavapipe. |
||
|
|
6d4ca09039 |
translator: a render pipeline into a snorm attachment records SnormMinimumKept on Device::from_queries
metal2vulkan-rt's conformance side ran the six snorm-store cases on lavapipe (job 48051). Each diverged where Metal's tile store writes a loaded minimum code (-128, or -32768) back as the code above it, and the device's pass keeps the bytes. The old runtime announces that as `snorm-minimum-kept` at the draw, from its encoder (render/tile_store.rs). The new runtime has no such encoder step, and the translator recorded no note, so the answer went unannounced. A missing static note is a bug (rule 1: a static note fixed per operation). - `PrecisionNote::SnormMinimumKept` (appended): the note of a render pipeline that draws single-sampled into a color attachment of R8Snorm, RG8Snorm, RGBA8Snorm, R16Snorm, RG16Snorm or RGBA16Snorm. - `pipeline::private_state::note_snorm_minimum` records it on the fragment stage (the vertex stage where there is none), whatever the pass loads. That is static, so it may over-announce a cleared pass. - It is recorded only where the profile's new fact says `SnormMinimumNote::Noted`. That is `Device::from_queries` (ProfileFacts::EVERY); `Device::new` (ROWS) stays `Announced`. `Device::new`'s modules, keys and the old runtime's announcement are unchanged. - The old runtime maps the note to its existing `Degradation::SnormMinimumKept` (an explicit `from_precision_note` arm). Validation's comparison allowance is Unbounded, as for the other device-answer notes. The codec takes the variant, and ARTIFACT_FORMAT_VERSION goes from 536 to 537. fast_paths lists the note under Elsewhere. api_signatures gets the two variant rows and the macro row. docs/API.md's `snorm-minimum-kept` entry says where the static note is recorded. Test: engine_private_render_state's a_snorm_attachment_notes_the_minimum_code_metal_s_pass_rewrites. On lavapipe and moltenvk-m3, for each of the six formats, the note is on the fragment stage alone through Device::from_queries and on no stage through Device::new. No stage records it at four samples, or into RGBA8Unorm or RGBA16Float. The six conformance cases on the rt side are the end-to-end test (the check job's replay, named in the report). |
||
|
|
58229ccd71 |
replay: a copy back to the guest's RAM plays as buffer copies into a sink
The new runtime's backend skipped m2v.copyToGuestRam and counted it, so every play's verdict ended at the first one (u2 frame 97, u3 frame 99), though nothing in a play reads that RAM. The planner ruled it does not end the played range, and that work the recording host did live plays as the runtime's, cost included. It now plays as the old backend's does: each run copied by the blit encoder, in its order, into a Shared place of the play's own that nothing reads, each run widened to the whole words it touches within the buffer (a buffer copy takes whole 4-byte words). The place is given back at the command buffer's commit, as a copy from the guest's RAM gives back its staging. The report counts the bytes (copied_back_guest_ram_bytes); skipped_guest_ram_reads is gone. Verified: see the check job (a new rt_replay device test: nothing skipped, the widened bytes counted, the buffer's bytes kept). |
||
|
|
02eaf89136 |
matrix: the report ends with one table of every row over its limit, with its status
Two legs of eleven passed and every red was known, so the reds were no longer read. The report (`matrix run` and `matrix show`) now ends with one table: every harness row over its limit on every leg (results.over_rows, the rows harness_budget fails or names as its card's variance), with its kind (GPU time, host time, or count for the instructions gate), its ratio and limit, the frozen arm's verdict (VOID, stands, rebased, no base) and its status. The status comes from scripts/matrix/status.tsv, one typed entry per card and row (a `*` in the row matches any run): an open record with its owner and first round, whose age the table counts in rounds; a known gap with the place it was ruled; or a note alone. A row with neither reads NEW in the first round it is over (not over in its leg's base) and UNOWNED after; a CARD_VARIANCE row reads as its card's known gap. The table changes no verdict: the red rule waits for the planner's ruling. Seeded from the rulings so far: NVIDIA create_64MiB/first_take, a known gap (the 2080 and the 3090); create_64MiB on AMD, a note that it is no known gap and is unjudged until the first interleaved round; the Iris Xe's GPU-time rows, a note of one time-boxed investigation after that round; the Iris row_cells, identity's open record (first over at |
||
|
|
65aac391c2 |
matrix: the frozen arm compares only rounds of one harness, one old runtime and one shape
The noise meter read the old runtime's move between two rounds as noise even where the harness or the old runtime changed between them ( |
||
|
|
3027cf9b68 |
matrix: each creation process times both runtimes, the new runtime first
The creation rows ran in five processes per runtime, all of the old runtime's before the new runtime's, so a node or clock that moved between them moved one runtime's samples alone, an order effect. Each of the five processes now times both runtimes, `--runtime new,old --only 'create_*'`, on its own fresh driver cache and store: a creation's first sample on the new runtime is cold, and the old runtime's follows it on the same cache. FIRST_KEEP takes each sample's runtime from its line. The median of five per runtime and every row, ceiling and floor stay. Verified: test_matrix's harness-run test (five `new,old` creation processes, both runtimes' samples kept once each) and test_results' creation test (FIRST_KEEP keeps the old runtime's sample beside the new's and drops a GPU line); the Linux and Windows job scripts pass `bash -n`. |
||
|
|
abf3d4133d |
matrix: both runtimes' rows are timed in one process, their passes alternating
Two cards showed the noise the old runtime's frozen arm measures: the Iris Xe's frame moved 2.8x between rounds, the UHD 630's about 2x between passes of one process. The leg timed each runtime in a process of its own, one after the other, so a clock or a co-runner that moved between them moved one runtime's times and not the other's. Now one process times both, `harness --runtime new,old`: each workload runs on the new runtime, then on the old, so their passes alternate on the GPU and the node as they are at that moment. The new runtime runs first in each workload, so its first uses, the judged cold ones, compile before the old runtime's of the same workload, as cold as in a process of its own. The process is the leg's one suite, `harness`; a failure still names its runtime (`M2V-FAILED harness-<runtime>/<row>`). The creation rows keep their five fresh processes per runtime, now alternating old and new; rows over their limits are re-timed alone as before. No row, ceiling or floor changes, and the deterministic records are untouched. The frozen arm's column (FROZEN_DRIFT) stays the check on it. Verified: test_matrix's new test runs the leg's timing script against a stand-in harness: one `new,old` process, the new runtime's warm run, the creation processes alternating, one suite whose records hold both runtimes' rows once each. The Linux and Windows job scripts render and pass `bash -n`. |
||
|
|
06b940f810 |
matrix: the frozen arm is the noise meter: a row whose old time moved past 10% on the base is VOID
The old runtime takes regression fixes only, so its time of a harness row moves between rounds
with the node, the driver and the harness, not with the change under test. Each leg now compares,
per row, the old runtime's time the row is judged on (its GPU p50 where gpu_judged, the median of
the five processes for a creation row's first sample, else its time) with the same time in the
leg's base, the previous round. Past FROZEN_DRIFT (10%) either way, harness_budget names the row
VOID and judges nothing from it: its comparison comes from a re-time in one process with both
runtimes interleaved. The report (run and show) shows the move on every row the base has, and a
line per leg naming the void rows; show computes it from the notes, so a round already noted is
read with it.
Verified: test_results (47 tests, a new one for the void rule, the GPU and median-of-five forms,
no base, and the column). `matrix show 140714ceae` against its base
|
||
|
|
40e135c308 |
replay: the new runtime's backend rounds each buffer's place to its recorded granule
The backend packed buffers first fit at Metal's 256-byte alignment, so a program's write past a buffer's end landed in the next buffer. A recorded stream's program did that: an append list of 4000 records took about 870 more on one play, and the overrun went 17340 bytes into twelve 4-byte counters and the start of a 48000-byte buffer that the player had packed behind it. The recording had given each of those buffers its own 32 KiB-granular range, so the same overrun landed in the list's own slack there. The clobbered counters then feed the next rounds; a 780M page fault past a 64 MB buffer and a hang on a 3090 follow them (expected, the proof plays pending). Each buffer's place now spans its length rounded up to its recorded granule: the largest power of two that divides its recorded gpuAddress, from 256 bytes to 64 KiB, and 256 bytes where the stream records no address (the player's own staging included). Both copies of a two-copy Managed buffer take it. A buffer past the class's block length takes a block of its own of the rounded span. The backend's new "places by recorded granule" line counts the places by granule and gives the most bytes of slack held at once. Test: rt_replay's buffers_keep_the_slack_of_their_recorded_granule plays two 4-byte buffers recorded at addresses of 32 KiB and 64 KiB granules and reads back their relocated addresses from a third: they lie apart by at least the lower one's granule (256 bytes apart before). docs/REPLAY-STREAM.md says how the backend places buffers. |
||
|
|
795c834ded |
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. |
||
|
|
d6a1a86d98 |
translator: the one-row variant leaves out the barriers of pairs apart in rows on every device; CompiledFunction says whether a kernel's lockstep barriers run in rows
LoweringInputs::one_row's lockstep order cleared the pairs that meet only where a SIMD group spans two rows only where Lockstep::rows held, which needs maximal reconvergence on 32-lane subgroups without the device's own lockstep: the old binder's condition for asking the variant. On a device without that tier (lavapipe's 8-lane subgroups, the UHD 630 without the extension, GCN's 64-lane waves) a one-row compile kept every barrier, though the clearing is exact there too: in a threadgroup whose SIMD groups each lie within one row, those pairs never meet, whatever runs the SIMD groups. The order now searches the pairs under the rows facts for every one-row compile and clears them wherever every pair left wants a threadgroup barrier at most. Lockstep::rows and RowLockstep keep their meaning, so Device::new's plans, and the old binder's one-row compiles, which it asks only where rows holds, are unchanged. CompiledFunction::runs_lockstep_barriers_in_rows (KernelFacts::lockstep_in_rows) says whether a kernel's lockstep order inserted a barrier that runs where each SIMD group lies within one row: any but the threadgroup barriers that order only pairs meeting across rows (Lockstep::across_rows), which the module runs only where its local size lets a SIMD group span two rows, a test the driver folds. Only where it holds can the one-row variant run fewer barriers than the kernel's own module at a one-row size, so a runtime asks the variant only there. It is decided from the plain compile's order and changes no module. docs/API.md states it; the api_signatures table gains its row. SEMANTICS_VERSION 2181 -> 2182: a one-row compile on a device without that tier changes. The old runtime's render descriptor key is re-pinned under it (b3d05d42). ARTIFACT_FORMAT_VERSION 536 -> 537: KernelFacts gains lockstep_in_rows. Test: a_one_row_variant_clears_the_pairs_apart_in_rows_without_a_32_lane_tier, on lavapipe's from_queries profile under the identity domains. Three kernels, each with its stores in its entry block and past a bounds test (six in all), keep lockstep barriers in their plain module and state no RowLockstep: - one storing the three words 3 cell + k of its cell y * stride + x in int arithmetic, as Apple compiles it (nsw on every step, the index sign-extended); - the same in uint arithmetic, whose steps carry no flags; - one whose threads store at x and x + 1. In the one-row variant the first has none. It states OneRow, takes no simd class, does not observe its partition with partial threadgroups (the variant without one_row does), and runs its grid in tiles. The other two keep their barriers: the wrapping index is not proved apart in rows, and the neighbours meet within one row. Every plain module runs its lockstep barriers in rows but the unguarded int cells kernel's, whose barriers all order pairs across rows. Verified: - Check 48214 (msi) at this series' tip on development |
||
|
|
051236c0c2 |
replay: a placement over an equal sampler state's index does not wait, and one a held commit owes stops the play
u3 stopped at player frame 259: the placement of a sampler state at index 16 waited for commit 1614 (#20713), which rt held at Committed because it waits for event #35 to reach 309, which only command buffer #20439 signals, encoded 20 records later. The program had released #10401 (index 16, bound directly by #20713) and made #20822 with the same descriptor the next call; Metal gave it ID 16 again. Nothing changed for the work in flight, and the original run did not wait (it could not: #20713's signal was not yet encoded). - A sampler state whose recorded descriptor is the one placed last at its index takes the index without waiting, counted on the indices line; the index stays owed for another sampler state. - The player tells the backend, at each look for command buffers to wait for, the committed ones no record played so far lets complete (Backend::held: their unmet event waits, or a held one ahead on their queue). A placement owing its index to one of those stops with PlayError::Held naming the chain, instead of waiting for ever. - docs/REPLAY-STREAM.md says what record order does not promise (a committed buffer may wait on a later record's signal) and what the indices line and the stop say. Tests: a unit test of the equal rule in Indices; rt_replay device tests of our own sequence: an equal sampler state at an index a held commit owes plays through without a wait; another descriptor there stops with Held naming #6 and its unmet wait. Check follows. |
||
|
|
4fbe03c3a0 |
rt: maxColorAttachments of 8 joins the floor, and the pass's colour-attachment limit goes
The floor now requires maxColorAttachments of at least 8, Metal's eight colour attachments
(MAX_COLOR_ATTACHMENTS, the render pass descriptor's slots). Vulkan 1.3 requires only 4: the
spec's Required Limits table (Table 76, vkspec 1.4.366) lists maxColorAttachments as "4 (Vulkan
Core) 7 (Vulkan Roadmap 2022) 8 (Vulkan Roadmap 2024, Vulkan 1.4)", min. A device below 8 is now
named below the floor at creation ("maxColorAttachments 7, below 8"), so a pass's colour
attachments, at most the descriptor's eight slots, never reach past the device's. The check in
pass.rs and its refusal, Limit::ColorAttachments, could no longer fire and are deleted.
Breaking, intended: the public variant metal2vulkan-rt::Limit::ColorAttachments { count, max } is
removed (api_signatures.tsv loses that one line, blessed). docs/REFUSALS.md is regenerated (the
new runtime's Limit goes from 10 to 9 variants). The README's limits table gains the row and the
Limits paragraph the spec's minimums; the render pass passage says a pass may use all eight.
The floor test's low-limit cases go from 16 to 17 with the maxColorAttachments case.
|
||
|
|
518800af99 |
rt: a wait in a handler or a listener for what its own thread does next is a typed refusal
The completion thread runs a device's completed handlers and listeners, and it is the thread that marks a command buffer completed, an event's GPU value observed, and a queue's place free. A wait there for any of those not yet done could only end by that thread's next step, so it hung by construction. Each is now Refusal::WaitOnOwnThread, and a wait already met answers at once: - wait_until_completed: Ok for a command buffer completed or ended, the handler's own among them, else the refusal; nothing is sent. - wait_until_scheduled: the refusal for one not yet scheduled. - SharedEvent::wait_until_signaled_value: Ok(true) for a value reached, else the refusal. - CommandQueue::command_buffer on a queue whose maximum count are made and not yet completed: the refusal on the completion thread and on the submit thread (a scheduled handler), whose next steps free the place. The condition is the program's own state (what it committed, what has completed), never a ring's fill. Outside a handler every wait answers as before. Test: every_device_refuses_in_a_handler_each_wait_its_own_thread_would_have_to_end checks 15 answers in a scheduled handler, a completed handler and a listener. REFUSALS.md regenerated and the signatures table blessed: Refusal gains WaitOnOwnThread (a new variant of a non-exhaustive enum; no consumer breaks). |
||
|
|
ea8e7843b7 |
rt: scheduled handlers run on the submit thread, before their submission, and wake no thread
The consumer adds a scheduled handler to every command buffer. The submit thread handed each command buffer's scheduled handlers to the completion thread (Done::scheduled), and where that thread waited on the GPU the hand-over was a host vkSignalSemaphore of its wake timeline, on every submission. On NVIDIA a host signal per submission measured 103-117 us of CPU a command buffer on an RTX 3090 (the waits probe's rt arm, job 47928), against 2.9-3.5 us for every single wait form, rt's own steady-state WAIT_ANY included. Now the submit thread, which already marks a command buffer scheduled as it joins a submission, runs its scheduled handlers itself once it has dropped its lock, in queue order, before that submission goes to the driver and before any of those command buffers is handed on as ended. So the status reads Scheduled and the kernel times are set in the handler, a command buffer that ends before it joins a submission runs none, as before, and the scheduled handlers run before the completed ones by construction. Done::scheduled, its list and the completion thread's branch for it are deleted. A handler on the submit thread may not call what waits for that thread to submit. The four internal sites that do (Work::room, Work::capture, Work::stage and the readback's flush and Done::wait) give the public entries that reach them; each is now Refusal::InScheduledHandler in a scheduled handler, on every device and whatever the runtime holds: commit; wait_until_scheduled, wait_until_completed and SharedEvent::wait_until_signaled_value; replace_region, upload_region, get_bytes and zero_block_range; new_managed_buffer, and new_buffer zeroing a buffer in a Private block. The one consumer's scheduled handler makes none of these calls, and a guest's addScheduledHandler block runs in the guest. Quiesce in a scheduled handler answers false at once (neither the submit thread nor the completion thread, which the submit thread stops as it ends, is waited for), and a device whose last handle drops there tears down on the reaper, as from a completed handler. For a consumer: CommandBuffer::wait_until_scheduled and wait_until_completed now return Result<(), Error>, and SharedEvent::wait_until_signaled_value returns Result<bool, Error> (api_signatures.tsv blessed); docs/REFUSALS.md regenerated; the README's contract says where each kind of handler runs, what a scheduled handler may do, and that it holds its queue's later submissions while it runs. Tests: every_device_tears_down_from_a_scheduled_handler, every_device_answers_false_to_a_quiesce_in_a_scheduled_handler, and every_device_refuses_each_call_that_waits_for_the_submit_thread_in_a_scheduled_handler (each refused entry by name, the allowed calls, the status and kernel times in the handler, and the same calls answering once it has returned). Verified by the next jobs. |
||
|
|
99ec109264 |
harness: each creation row's first is a fresh object's on a device that has made one of its kind
A creation row's first sample was the first of its kind in a fresh process, so it held the device's own first use (its first recorder, submission, upload, staging region, stamp pool) together with the object's. A guest keeps one device for the machine's life, so what a device pays once never reaches it. The planner ruled that every first row is judged on a new object's first use on a warm device. Each creation row now makes a warm-up of its kind first, made and used as the first is and kept until the first is done, then the timed first on a fresh object: - Shared and Private buffers: a buffer of the same length, kept, so the first takes memory the warm-up did not give back (a new 16 MiB Private block on rt's harness placement); the next take still follows the first's release. - compute states: a state of another authored kernel (lcg_step, bound as signed_zero_products is), created and dispatched once, its word checked; - render states: a state of another fragment function (sampled_fragment) with the row's vertex function and attachment. The warm-up's time is its own record, `<row>/device_first`. The matrix shows it with the ratio of its medians and never judges it (results.SHOWN_FIRST now names each shown sample with its reason). time_states takes the first as its caller timed it; its other form had no caller left. Tests: a host-buffer device shows the buffer row's order (the warm-up alone, the first and the next beside it, the timed ones alone); the matrix shows a warm-up and judges the first it comes before; the device test checks every row records its warm-up. |
||
|
|
4da77d8518 | FAST-PATHS: what an NVIDIA host whose type 0 reads right loses to the Shared dma-buf refusal | ||
|
|
1d5226bef7 |
runtime: a Shared dma-buf import takes host-coherent types only, and none where its first is not
The old runtime imported a Shared no-copy buffer's dma-buf on NVIDIA as type 0 (system memory,
no property flag): its udmabuf order (system-memory types the host maps last) puts type 0
before type 4. A type without HOST_COHERENT promises nothing of what the caller's own mapping
of the pages and the device see of each other's writes, and Shared memory's bytes are exactly
that; the consumer's probe showed wrong bytes there.
The form, decided by the memory types' flags alone (no fact row, device check or switch):
today's order is computed unchanged (memory::dma_buf_order, the former dma_buf_candidates);
for MemoryClass::Shared, dma_buf_candidates then keeps only its host-coherent types, in its
order, where its first type is host-coherent, and none where it is not. An empty order tries no
import and refuses as ImportFailure::NoMemoryType, which callers already map to not_importable()
("host memory this device cannot import exactly"), so what it would back takes the refused
dma-buf's path, a copy of its pages. Type 4 is never tried: a refused import there breaks every
later exportable device-local allocation for the device's life (tests::export_after_dma_buf).
Private and the other classes keep the order whole (type 0 on NVIDIA as before).
Tests:
- tests::memory::a_shared_dma_buf_import_takes_host_coherent_types_or_none: over NVIDIA's,
ANV's, RADV's (discrete) and lavapipe's types and udmabuf bits, the first type before and
after is the same but NVIDIA's (0 before, refused after, no attempt), and every other class's
order is unchanged. The order tests name dma_buf_order.
- tests::export_after_dma_buf::a_shared_dma_buf_import_is_host_coherent_or_refused_untried
(device test): where the order is empty the import is refused and exportable Private buffers
made after it still lie in device-local memory with no overflow; elsewhere it imports as a
host-coherent type and a Shared buffer over it shares bytes both ways (the GPU's fill read
through the caller's mapping; the CPU's writes there read by the GPU's copy).
docs/FAST-PATHS.md's known gap on NVIDIA's dma-buf imports says so. docs/REFUSALS.md
regenerates unchanged (the refusal is the existing one).
|
||
|
|
0228641d79 |
rt: the encoders and a segment's begin borrow the core; the lock budget's bound is 0.25, and a node naming the event must measure it
The planner's rulings on the lock budget and the alternations: - The bound is one value on every device, 0.25 locked instructions per added command, for draws, bound draws and dispatches: a site of rt's that runs per command adds 1 or more, and the drivers' own growth stays far below it (measured: Iris Xe 0.0195 / 0.1425 / 0.0285 at most, RX 7900 XTX 0.0000 / 0.0015 / 0.0050, RTX 2080 0.0005 / 0.0000 / 0.0175). - Each budget test prints its measurement as a matrix record, `locks lock_budget/<kind>`, per million added commands (none below 0), beside its LOCKS line. The matrix fails a GPU leg missing any of the three where the node's setup names M2V_LOCK_EVENT (results.LOCK_BUDGET, names_lock_event, lock_budget_missing; keyed on the setup, not on a card), for a commit that has the budget; elsewhere the budget prints LOCKS-UNMEASURED and passes. The note carries the three values per leg. docs/VALIDATION.md's records table has the kind. - Building::begin borrows the device's core where it took an Arc<Core> it dropped after the start timestamp; the compute and render encoders hold an uncounted borrow of the recording's core (kept::Uncounted, the kept handle's pattern for an Arc), valid while the encoder holds the recording, which it does until it ends. Two locked instructions fewer per encoder and one pair fewer per segment. Verified: scripts/matrix's unittest suite (47 tests, a new one for the event and the missing records). |
||
|
|
0afc54c573 |
rt tests: every instance runs under the validation layer, its log checked
Every instance rt's device tests open goes through one helper, crate::tests::validation. It enables VK_LAYER_KHRONOS_validation for its own test process through the loader's and the layer's own variables (VK_INSTANCE_LAYERS; report flags error,warn, debug action log, one log file per process). It checks that every device of the cfg's kind lists an active validation tool (vkGetPhysicalDeviceToolProperties), so a run whose loader found no layer fails. Once the instance is gone, it reads the log, prints each line with the test's name and fails on any message. The 41 sites that called Instance::new go through it; the exit-handler test reads its child's log, since the child's instance never drops. One test makes a deliberately invalid call (a buffer of size 0, refused by the layer) and checks that its log holds exactly VUID-VkBufferCreateInfo-size-00912. The product keeps no layer code and no variable read. Its one change is a visibility: Instance's shared state is pub(crate), so the helper waits, bounded, on a weak handle of it until the instance is gone, and only then reads the log. scripts/validation-layer makes the layer's directory, one version (1.4.363.0) on every leg, as a carry: Linux's copied from a node whose pacman package is that version and unaltered, Windows's from MSYS2's clang64 packages checked against the package database's SHA-256, and macOS's from a Homebrew install at that version. scripts/matrix carries it to every job that runs rt's device tests (GPU legs, lavapipe, the Windows host), points VK_LAYER_PATH at it, and puts the layer's version in the leg's note. A job without the layer says so and points the loader at none. The harness's timing jobs run without it. Verified: the matrix's unit tests (48, two new ones run the layer's shell for real) and the layer carry made. Builds and legs follow. |
||
|
|
4b781a949c |
translator: a grid tile tests its edge only inside a branch on its region's ragged flag
On Device::from_queries' profile a kernel that runs its grid in tiles compared every invocation's position with the grid's last thread before its body, on every dispatch. The test now sits inside one uniform branch on the region's NONUNIFORM flag, which rt (and the binder) already set for every region of a grid its workgroups do not divide: a ragged dispatch runs today's test, and every other dispatch (a grid the workgroups divide, an indirect dispatch) branches past it, its body deriving its position only where it reads it. One pipeline serves both, so there is no added compile or first-use wait. Device::new's profile has no grid tiles, so its modules are unchanged. The branch is also what keeps a driver's scheduler from spreading a kernel's pushed-word loads through its body: a form that dropped the branch lost 17-55% on a many-binding row on RADV and the UHD 630. SEMANTICS_VERSION 2180 -> 2181. The grid tile tests now run each grid flagged and unflagged: flagged, no invocation past the grid stores; unflagged, a ragged grid's do, so the flag alone guards the test. Verified at the same change on |
||
|
|
a914d524ea |
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. |
||
|
|
1e8e5974fc |
REPLAY-STREAM: section 6 names the writes at a completion
The comparison point takes the GPU's bytes at a completion only for 4 KiB chunks wholly inside GPU-only ranges, and a recorder may record what a command buffer's GPU work stored in memory the CPU shares as writes after its commit: which chunks are compared, the Managed rule, why the player's waits make them change nothing, and the restore they let a stream carry. The planner's text, verbatim, for the recorder change that lands with it. Doc only; no test reads this section. |
||
|
|
990328afe1 |
translator: from_queries' profile contains no threadgroup access, and an arena of whole float words is a float array
What: a new profile fact, device::profile::ThreadgroupMemory, says whether an access of
threadgroup memory is contained. Device::new's profile keeps Contained, byte for byte: a load past
an arena reads zero, a store past it is dropped, and a typed threadgroup object's dynamic index is
clamped to its level. Device::from_queries' profile takes Native: no threadgroup access is
contained, and an access past a kernel's threadgroup memory is undefined, as in Metal. One
predicate, lower::access::local's contained(), decides it at the six sites that contained one:
an arena's loads and stores, its atomics, memory intrinsics, pointer cells and imageblock, and a
typed threadgroup object's index. Device memory's containment is unchanged.
On the Native profile, a kernel's arena whose every access is a whole, aligned float word (a float
or a vector of 2 to 4, at an offset its alignment makes a multiple of 4, with no atomic, no memory
intrinsic and no access of another type: memory::Leaf::float_words) is a float array of its own
whole words, at least four (memory::arena::FLOAT_LEAST). Each access is one typed load or store per
lane at its word index, with no bounds compare, no select and no bitcast. Every other arena stays
the u32 array of composed words, unchecked on this profile. The census names the float form's
accesses access.threadgroup.load.floats and access.threadgroup.store.floats.
SpecOp::ISub, which only the contained arena's bound used, is deleted.
docs/API.md's threadgroup memory bullet says so. The runtime README's contract states that an
access past threadgroup memory is undefined, as in Metal, and that the runtime does not confine
it. SEMANTICS_VERSION 2180; the old render key's pin moves with it.
Why: Metal leaves an access past threadgroup memory undefined, so containing it changes nothing a
correct program observes. Containment cost GPU time on every card measured: each access paid a
bounds compare and a select, and each composed word paid its bitcasts.
Verified (A = before this change, D = this change, both on from_queries):
- GPU p50 of the harness rows whose kernels use threadgroup memory or SIMD-group operations,
D over A, the median over 6 rounds of each. threadgroup_floats is a float scan that the probe
harness adds. No other row's kernel declares threadgroup memory (workloads.metal).
- UHD 630 (job 47289): threadgroup_scan 0.972, threadgroup_floats 0.892, simd_reduce 1.000,
vote_loop 1.000.
- Iris Xe (47290): threadgroup_scan 0.965, threadgroup_floats 0.919, simd_reduce 1.000,
vote_loop 1.000.
- Each arm's spread (its largest run over its smallest) is at most 1.013 on both cards.
- Driver compile per kernel on the UHD 630, the median of 5 cold processes per arm, each with a
fresh store and driver cache and the module bytes salted (47319). Every process exited 0. D over
A: the float scan 0.716, the typed scan 0.945, the SIMD reduce 0.951; the two kernels whose
modules are the same in both arms 0.998 and 1.062.
- The same on the Iris Xe (47349): the float scan 0.678. The typed scan (1.108) and the SIMD
reduce (1.19) are inside the run-to-run spread of 1.164 that a module equal in both arms shows.
- Cold plays of a replay stream up to frame 216, 4 per arm, with the arms alternated. Every
threadgroup kernel matched by function identity, 16 of 16 in each arm.
- RTX 2080 (47294): GPU 378.1 ms in A, 307.9 ms in D; driver 1154.8 ms against 1158.8 ms.
The 128-wide kernels: 0.634 (18 dispatches) and 0.793 (65). The 64-wide kernels: 0.808 to
0.959. The 1024-wide kernel: 0.933. The 395-dispatch kernel: p50 1.010, its total 0.996.
- Radeon 780M (47295): GPU 127.8 ms in A, 116.8 ms in D; driver 234.7 ms against 202.6 ms.
Every kernel's p50 is at or under A's: the 128-wide kernels 0.826 (18 dispatches), 0.799 (65)
and 0.966 (5); the 64-wide kernels 0.815 to 0.938; the 1024-wide kernels 0.981 and 0.978;
the 395-dispatch kernel p50 0.981, its total 1.006.
- Rebased on
|
||
|
|
f811e7cc2d |
replay: delete the unbound-buffer-read counter, whose reflection decoded each pipeline state's AIR again inside the play's pipeline time
The counter ( |