diff --git a/.config/nextest.toml b/.config/nextest.toml index 7bf7c3b9f..dff3d9985 100644 --- a/.config/nextest.toml +++ b/.config/nextest.toml @@ -13,7 +13,7 @@ slow-timeout = { period = "60s", terminate-after = 20 } filter = 'test(/::soak_/)' slow-timeout = { period = "300s", terminate-after = 24 } -# The new runtime's device test of accesses up to 2 GiB runs alone. Its buffer is one Shared block +# The runtime's device test of accesses up to 2 GiB runs alone. Its buffer is one Shared block # of `MAX_BUFFER_LENGTH` (2 GiB), host memory where the Shared memory type is the host's (an RTX # 2080, NVIDIA 620.70.06). Beside the runtime's compute encoder tests and three other translate # tests there, the run's host memory peaked at 4.7 GiB; in a job holding 4 GiB it reached the 4 GiB diff --git a/crates/metal2vulkan-devtools/src/lib.rs b/crates/metal2vulkan-devtools/src/lib.rs index ab34b1277..0d42a45ab 100644 --- a/crates/metal2vulkan-devtools/src/lib.rs +++ b/crates/metal2vulkan-devtools/src/lib.rs @@ -7,9 +7,9 @@ //! tests and validation's device tests both run, the extended-range bicubic table both check //! ([`xr_bicubic`]), the store-buffering litmus kernel both compile //! ([`litmus`]), the inputs and answer of the vector word-phase fixture the product's -//! interpreter test, the new runtime's device test and the conformance suite all hold +//! interpreter test, the runtime's device test and the conformance suite all hold //! ([`vector_word_phases`]), the dispatches and answer of the threadgroup-memory fixture the -//! new runtime's device test and the conformance suite both hold ([`threadgroup_start`]), and the +//! runtime's device test and the conformance suite both hold ([`threadgroup_start`]), and the //! counter of a thread's user-space instructions the matrix's //! instructions-per-draw records are measured with ([`instructions`]). //! diff --git a/crates/metal2vulkan-devtools/src/threadgroup_start.rs b/crates/metal2vulkan-devtools/src/threadgroup_start.rs index 2c2bacf1a..a4af2501f 100644 --- a/crates/metal2vulkan-devtools/src/threadgroup_start.rs +++ b/crates/metal2vulkan-devtools/src/threadgroup_start.rs @@ -5,7 +5,7 @@ //! threads, [`DISPATCHES`] times each, the region [`REGION_BYTES`] long), and what each dispatch //! answers where threadgroup memory reads zero until the program writes it ([`answer`]): the //! conformance case `compute-threadgroup-memory-reads-zero` records Metal's answer and holds it -//! equal to [`answer`], and the new runtime's device test holds its own equal to it. +//! equal to [`answer`], and the runtime's device test holds its own equal to it. /// The fixture, and its kernel. pub const FIXTURE: &str = "tgz_reads"; diff --git a/crates/metal2vulkan-devtools/src/vector_word_phases.rs b/crates/metal2vulkan-devtools/src/vector_word_phases.rs index 2b9ea4897..9b8fadf7a 100644 --- a/crates/metal2vulkan-devtools/src/vector_word_phases.rs +++ b/crates/metal2vulkan-devtools/src/vector_word_phases.rs @@ -4,7 +4,7 @@ //! takes ([`OFFSETS`], [`vec16_offsets`]), and the four buffers' bytes afterwards where every //! access lands at its own address ([`answer`]), which is where Metal places it: the //! conformance crate's `vector-word-phases-*` cases record Metal's answer on an Apple M3 Max and -//! hold it equal to [`answer`], the product's CPU-interpreter test and the new runtime's device +//! hold it equal to [`answer`], the product's CPU-interpreter test and the runtime's device //! test hold theirs equal to it too. /// The fixture. diff --git a/crates/metal2vulkan-harness/Cargo.toml b/crates/metal2vulkan-harness/Cargo.toml index 5942dc9d9..c79d8160d 100644 --- a/crates/metal2vulkan-harness/Cargo.toml +++ b/crates/metal2vulkan-harness/Cargo.toml @@ -23,7 +23,7 @@ path = "src/bin/harness.rs" [dependencies] # The translator: the function constant values the runtime takes (`plan.rs`). metal2vulkan = { path = "../metal2vulkan" } -# The new runtime, behind the harness's traits in `rt.rs` alone, and the Vulkan types it chooses +# The runtime, behind the harness's traits in `rt.rs` alone, and the Vulkan types it chooses # a physical device by. metal2vulkan-runtime = { path = "../metal2vulkan-runtime" } ash.workspace = true diff --git a/crates/metal2vulkan-harness/src/description.rs b/crates/metal2vulkan-harness/src/description.rs index 597331c98..f245070af 100644 --- a/crates/metal2vulkan-harness/src/description.rs +++ b/crates/metal2vulkan-harness/src/description.rs @@ -77,8 +77,8 @@ //! others are written by `replaceRegion:` slice by slice, rows tightly packed, which the CPU does //! for a shared or managed texture alone: a private texture takes `undefined` alone. A texture //! Metal made over an IOSurface is described as a plain shared or managed one; the harness makes -//! none over an IOSurface. The new runtime refuses a heap's texture and one over a buffer: it -//! makes neither yet. +//! none over an IOSurface. On the runtime the harness refuses a heap's texture and one over a +//! buffer: it makes neither there. use crate::plan::{ seeded_words, Binding, BufferPlan, Comparison, Constant, Dispatch, Filter, Grid, Output, Plan, diff --git a/crates/metal2vulkan-harness/src/lib.rs b/crates/metal2vulkan-harness/src/lib.rs index 6518f8a8f..2071610c4 100644 --- a/crates/metal2vulkan-harness/src/lib.rs +++ b/crates/metal2vulkan-harness/src/lib.rs @@ -225,8 +225,9 @@ pub enum Storage { /// `MTLStorageModePrivate`: the GPU's alone. Private, /// `MTLStorageModeManaged`: the CPU writes it through `contents` and calls - /// `didModifyRange:`, which brings the GPU's copy up to date. The new runtime has no such - /// mode; its harness keeps the GPU's copy in a `Private` buffer (`rt`). + /// `didModifyRange:`, which brings the GPU's copy up to date. On the runtime it is + /// `Device::new_managed_buffer`, whose device copy, where it keeps one, the harness places in + /// a `Private` block (`rt`). Managed, } diff --git a/crates/metal2vulkan-harness/src/rt.rs b/crates/metal2vulkan-harness/src/rt.rs index 9e034a20e..be349c0c0 100644 --- a/crates/metal2vulkan-harness/src/rt.rs +++ b/crates/metal2vulkan-harness/src/rt.rs @@ -1,6 +1,6 @@ -//! The new runtime (`metal2vulkan-runtime`) behind the harness's traits. +//! The runtime (`metal2vulkan-runtime`) behind the harness's traits. //! -//! The new runtime places a buffer where its consumer says, in a block the consumer took +//! The runtime places a buffer where its consumer says, in a block the consumer took //! (`Device::take_block`, `Device::new_buffer`); the harness is that consumer here. It places each //! buffer at the lowest free range of a block of its storage mode that holds it, at a multiple of //! 256 bytes, taking a block of `MemoryClass::block_len` (16 MiB) when none does, as a guest's @@ -27,8 +27,8 @@ //! state that numbered its state words took, as Metal gives an equal one the same ID; a sampler //! state passes over a constexpr sampler's index. A texture read's or write's numbered sampler takes nothing at its index: 0. //! -//! The new runtime makes no heap and no texture over a buffer yet: a plan with such a texture is -//! refused ([`Refused`]). +//! The harness makes no heap and no texture over a buffer on the runtime: a plan with such a +//! texture is refused ([`Refused`]). mod own; @@ -71,7 +71,7 @@ pub(crate) fn size(size: Size) -> Result<[u32; 3]> { } } -/// The new runtime's `MTLCreateSystemDefaultDevice`: the first physical device of the most +/// The runtime's `MTLCreateSystemDefaultDevice`: the first physical device of the most /// preferred type (discrete, integrated, virtual, CPU, other) that opens, in the loader's order /// within a type, with its cache directory `store` where one is given /// (else none). @@ -126,7 +126,7 @@ pub fn system_default(store: Option<&Path>) -> Result { Err(format!("no physical device opens: {}", refused.join("; ")).into()) } -/// The new runtime's device, with the harness's placements in its blocks. +/// The runtime's device, with the harness's placements in its blocks. pub struct Device { device: rt::Device, /// Its physical device, which each row of the runtime's own opens a device of its own on. @@ -561,12 +561,12 @@ impl crate::ComputeDevice for Device { fn new_texture(&self, texture: &plan::TexturePlan) -> Result { let refused = match texture.source { TextureSource::Plain => None, - TextureSource::Heap => { - Some("newTextureWithDescriptor: of a heap: the new runtime makes no heap yet") - } + TextureSource::Heap => Some( + "newTextureWithDescriptor: of a heap: the harness makes no heap on the runtime", + ), TextureSource::OverBuffer => Some( - "newTextureWithDescriptor:offset:bytesPerRow: of a buffer: the new runtime makes \ - no texture over a buffer yet", + "newTextureWithDescriptor:offset:bytesPerRow: of a buffer: the harness makes no \ + texture over a buffer on the runtime", ), TextureSource::View { .. } => return Err("a view is made from its parent".into()), }; diff --git a/crates/metal2vulkan-harness/src/rt/own.rs b/crates/metal2vulkan-harness/src/rt/own.rs index 050d80d1a..90577c40e 100644 --- a/crates/metal2vulkan-harness/src/rt/own.rs +++ b/crates/metal2vulkan-harness/src/rt/own.rs @@ -1,4 +1,4 @@ -//! The new runtime's rows of its own ([`OwnRow`]), each on a device of its own on the session's +//! The runtime's rows of its own ([`OwnRow`]), each on a device of its own on the session's //! GPU, so that nothing an earlier workload left in the session's device runs beside it. //! //! The idle rows read the runtime's count of each idle free by the allocation's idle time when diff --git a/crates/metal2vulkan-harness/src/tests.rs b/crates/metal2vulkan-harness/src/tests.rs index cd4a6257a..6ccddc688 100644 --- a/crates/metal2vulkan-harness/src/tests.rs +++ b/crates/metal2vulkan-harness/src/tests.rs @@ -1165,7 +1165,7 @@ fn a_row_is_judged_by_host_time_never_its_gpu_time() { assert_eq!(matrix_time(&report), None, "no host time, no matrix time"); } -/// The new runtime's known gaps and the device's limits are typed refusals; its other errors are +/// The runtime's known gaps and the device's limits are typed refusals; its other errors are /// failures. #[test] fn the_new_runtime_refuses_by_its_gaps_and_limits_alone() { @@ -1410,7 +1410,7 @@ fn the_copy_moves_every_byte_in_whole_threadgroups() { /// one-row variant (`LoweringInputs::one_row`) of `row_cells`, whose `int` cell arithmetic /// compiles to `nsw` steps, does not observe it, so a runtime may run its grids in tiles; that of /// `row_cells_uint`, the control, whose `uint` steps carry no flags, still does. Under the -/// identity domains (the new runtime's), whose kernels take no lockstep order, neither observes +/// identity domains (the runtime's), whose kernels take no lockstep order, neither observes /// it, plain or with partial threadgroups. #[test] fn the_int_cells_kernel_is_apart_in_rows_and_its_uint_control_is_not() { diff --git a/crates/metal2vulkan-harness/tests/described.rs b/crates/metal2vulkan-harness/tests/described.rs index fe4da3d16..1a91ae55b 100644 --- a/crates/metal2vulkan-harness/tests/described.rs +++ b/crates/metal2vulkan-harness/tests/described.rs @@ -194,7 +194,7 @@ fn described_workloads_match_their_references() { let plan = workload.plan().unwrap(); let each = (run_each(&plan, &mut sessions, runs, None)) .unwrap_or_else(|why| panic!("{}: {why}", plan.name)); - // The runtime makes no heap and no texture over a buffer yet. + // The harness makes no heap and no texture over a buffer on the runtime. let missing = match plan.name.as_str() { "heaped" => Some("makes no heap"), "over" => Some("makes no texture over a buffer"), diff --git a/crates/metal2vulkan-harness/tests/rt.rs b/crates/metal2vulkan-harness/tests/rt.rs index 5a148eacc..2a921e335 100644 --- a/crates/metal2vulkan-harness/tests/rt.rs +++ b/crates/metal2vulkan-harness/tests/rt.rs @@ -1,4 +1,4 @@ -//! The new runtime's buffers through the harness, on the device the cfg names +//! The runtime's buffers through the harness, on the device the cfg names //! (docs/VALIDATION.md): a range given back is the next one taken, buffers alive at once lie //! apart, and a buffer longer than a pooled block takes a block of its own. #![cfg(any(m2v_gpu, m2v_cpu_icd))] diff --git a/crates/metal2vulkan-validation/README.md b/crates/metal2vulkan-validation/README.md index c19c89985..8b2fc5a43 100644 --- a/crates/metal2vulkan-validation/README.md +++ b/crates/metal2vulkan-validation/README.md @@ -27,7 +27,7 @@ as tightly packed selected regions, not backend-specific row-pitched storage. | `corpus-metal` | Qualify cases on Metal (`--device-type gpu`) | | `corpus-vulkan` | Run cases on a Vulkan device against their Metal observations (`--device-type cpu\|gpu`) | | `corpus-moltenvk` | The same through MoltenVK (macOS) | -| `command-replay` | Play a replay stream on a Vulkan device through the new runtime, or print its calls | +| `command-replay` | Play a replay stream on a Vulkan device through the runtime, or print its calls | Each command's `--help` lists its options. diff --git a/crates/metal2vulkan-validation/src/bin/command-replay.rs b/crates/metal2vulkan-validation/src/bin/command-replay.rs index aa8c2a53a..91ad53c75 100644 --- a/crates/metal2vulkan-validation/src/bin/command-replay.rs +++ b/crates/metal2vulkan-validation/src/bin/command-replay.rs @@ -1,11 +1,11 @@ -//! Replay streams (`docs/REPLAY-STREAM.md`): play one on a Vulkan device through the new runtime, +//! Replay streams (`docs/REPLAY-STREAM.md`): play one on a Vulkan device through the runtime, //! or print its records. //! //! `command-replay play --stream FILE --out DIR --device-type cpu|gpu --shader-cache DIR //! [--blobs DIR] [--managed one-copy|two-copy] //! [--until-frame F] [--past-range yes|no] [--gpu-wait-timeout SECONDS] //! [--video-handle dma-buf|opaque-fd] [--check-presents F,...]` plays the stream whose -//! first segment is `FILE` through the new runtime, with +//! first segment is `FILE` through the runtime, with //! `--video-handle dma-buf|opaque-fd` telling the runtime the consumer's decoder route, the //! handle its video surfaces are made with (a dma-buf unless it says otherwise), and //! `--gpu-wait-timeout` bounding each device wait (10 s unless it says otherwise; a CPU device's @@ -34,7 +34,7 @@ //! the last //! segment ends in a record cut //! short, `skipped ...` where the backend skipped what its runtime does not build (such a play is -//! no gate result), `gaps ...` where it met a typed gap, on the new runtime where the play +//! no gate result), `gaps ...` where it met a typed gap, on the runtime where the play //! finished its range and skipped nothing the matrix's judged metrics (`M2V-MATRIX metric //! replay-rt/STEM/RANGE/NAME N`, `docs/REPLAY-STREAM.md`, section 10), then `ok`, `ids: ...` or //! `error WHAT`, the skipped line and this one ending `; not a verdict past frame F, call C` where @@ -55,7 +55,7 @@ //! device that keeps a device copy of each Managed buffer, the report's `managed digests` line //! after its `device` line says which. //! -//! The new runtime's play stands in for a consumer's pre-pass: `--prepass-width N` threads of the +//! The runtime's play stands in for a consumer's pre-pass: `--prepass-width N` threads of the //! player's own (4 where the command line names none, 0 for none) prepare each compute dispatch //! ahead of its encoding (`ComputePipelineState::prepare_dispatch`) once its command buffer and its //! state are made, while the play goes on. The report's `prepass width` line says how many ran. @@ -454,7 +454,7 @@ fn play(options: &BTreeMap) -> i32 { return 2; } }; - // The consumer's pre-pass the new runtime's play stands in for: its threads, 4 where the + // The consumer's pre-pass the runtime's play stands in for: its threads, 4 where the // command line names none, 0 for none. let prepass = match options .get("prepass-width") @@ -592,7 +592,7 @@ fn play(options: &BTreeMap) -> i32 { } } -/// The new runtime's backend on the first physical device of `device_type` that opens (a GPU: +/// The runtime's backend on the first physical device of `device_type` that opens (a GPU: /// discrete, then integrated, then virtual), its compiled kernels kept in `cache`, and its name. /// A GPU opens only while the hang tripwire is absent. fn open_rt(device_type: DeviceType, cache: PathBuf) -> Result<(NewRuntime, String), String> { @@ -649,7 +649,8 @@ type Dumped = Option<(RangeInclusive, PathBuf)>; type Presents = (Vec, PathBuf); /// Play `reader` through `backend` into `report`, to the last frame where one is given, dumping -/// the command buffers where asked, checking the shown texture at the listed frames' presents and keeping its bytes in the directory given, and on the new runtime, +/// the command buffers where asked, checking the shown texture at the listed frames' presents and +/// keeping its bytes in the directory given, and on the runtime, /// where `judged` /// names the stream's first segment, writing the matrix's judged metrics of a play that finished /// its range (`judged_records`): the exit status. diff --git a/crates/metal2vulkan-validation/src/gpu.rs b/crates/metal2vulkan-validation/src/gpu.rs index 04ed679d7..033e83b52 100644 --- a/crates/metal2vulkan-validation/src/gpu.rs +++ b/crates/metal2vulkan-validation/src/gpu.rs @@ -46,9 +46,9 @@ mod tests { } /// Every device open goes through one of the functions that check the hang tripwire first: - /// validation's Vulkan context, the Metal platform, and the new runtime's device in the player + /// validation's Vulkan context, the Metal platform, and the runtime's device in the player /// and in the replay tests, each after the tripwire check in its own file. A new raw open - /// anywhere else in the crate fails here, before it can run, and so does a new-runtime open + /// anywhere else in the crate fails here, before it can run, and so does a runtime open /// ahead of its check. #[test] fn device_opens_exist_only_behind_the_tripwire_check() { @@ -63,7 +63,7 @@ mod tests { concat!(".create_", "instance("), concat!(".enumerate_", "physical_devices("), concat!(".create_", "device("), - // The new runtime's device creation (`metal2vulkan_runtime`). + // The runtime's device creation (`metal2vulkan_runtime`). concat!("metal2vulkan_runtime::Device", "::new("), ]; let allowed: &[(&str, &str, usize)] = &[ @@ -71,7 +71,7 @@ mod tests { ("src/candidate/platform/device.rs", opens[3], 1), ("src/candidate/platform/device.rs", opens[4], 1), ("src/metal/platform.rs", opens[0], 1), - // The new runtime's device: the player's and the replay tests'. + // The runtime's device: the player's and the replay tests'. ("src/bin/command-replay.rs", opens[5], 1), ("src/replay/rt_replay.rs", opens[5], 1), ]; @@ -81,7 +81,7 @@ mod tests { let check = text.find(checked); assert!( check.is_some_and(|at| text.find(open).is_some_and(|open| at < open)), - "{file} opens the new runtime's device without the hang tripwire check before it" + "{file} opens the runtime's device without the hang tripwire check before it" ); } let mut found = Vec::new(); diff --git a/crates/metal2vulkan-validation/src/gpu/wait.rs b/crates/metal2vulkan-validation/src/gpu/wait.rs index f38fde3c4..fe8030fea 100644 --- a/crates/metal2vulkan-validation/src/gpu/wait.rs +++ b/crates/metal2vulkan-validation/src/gpu/wait.rs @@ -19,7 +19,7 @@ //! A submission that completes with a device-fault status (Vulkan `VK_ERROR_DEVICE_LOST`; Metal //! `MTLCommandBufferError` timeout, page fault, access revoked, or device removed) is a suspected //! GPU fault: it writes the tripwire too, then fails the operation normally, because nothing is -//! in flight any more; a wait on the new runtime's command buffers (`new_runtime`) leaves how +//! in flight any more; a wait on the runtime's command buffers (`new_runtime`) leaves how //! the command buffer ended to its caller instead. A CPU implementation (lavapipe, SwiftShader) //! is an ordinary killable process: its timeouts and faults follow the same exit rules but never //! write the host GPU tripwire. @@ -321,7 +321,7 @@ pub(crate) mod vulkan { } } -/// Bounded waits on the new runtime's command buffers (`metal2vulkan_runtime`): the replay player's +/// Bounded waits on the runtime's command buffers (`metal2vulkan_runtime`): the replay player's /// backend over it. The runtime's own wait has no bound, so the wait is on the command buffer's /// completed handler, after the queue's wait hint has sent it. How the command buffer ended is the /// caller's to read (the player reads its error into the play's verdict): a wait here says only diff --git a/crates/metal2vulkan-validation/src/replay/mod.rs b/crates/metal2vulkan-validation/src/replay/mod.rs index 2276fdf58..fb88e13bb 100644 --- a/crates/metal2vulkan-validation/src/replay/mod.rs +++ b/crates/metal2vulkan-validation/src/replay/mod.rs @@ -1,5 +1,5 @@ //! Replay streams (`docs/REPLAY-STREAM.md`): their reader and writer, the address map the player -//! moves address arguments by, the player, and its backend over the new runtime. +//! moves address arguments by, the player, and its backend over the runtime. mod addresses; mod args; diff --git a/crates/metal2vulkan-validation/src/replay/new_runtime/guest_ram.rs b/crates/metal2vulkan-validation/src/replay/new_runtime/guest_ram.rs index f56fed071..5f6a71a83 100644 --- a/crates/metal2vulkan-validation/src/replay/new_runtime/guest_ram.rs +++ b/crates/metal2vulkan-validation/src/replay/new_runtime/guest_ram.rs @@ -1,6 +1,6 @@ //! The host's copies between buffers and the guest's RAM (`m2v.copyToGuestRam`, //! `m2v.copyFromGuestRam`, `docs/REPLAY-STREAM.md` sections 7 and 10), played in the host's form -//! on the new runtime, the one-copy form: one buffer copy a call, in a command buffer of the +//! on the runtime, the one-copy form: one buffer copy a call, in a command buffer of the //! play's own on the queue of the call's command buffer, through a Shared scratch of the play's //! own that the CPU fills or empties. A copy back is one copy of the whole words its runs span //! into the scratch, committed just after its command buffer; a wait for that command buffer diff --git a/crates/metal2vulkan-validation/src/replay/new_runtime/indices.rs b/crates/metal2vulkan-validation/src/replay/new_runtime/indices.rs index c39fbeb93..288617d1b 100644 --- a/crates/metal2vulkan-validation/src/replay/new_runtime/indices.rs +++ b/crates/metal2vulkan-validation/src/replay/new_runtime/indices.rs @@ -1,4 +1,4 @@ -//! The indices the new runtime's backend gives textures and sampler states, which the runtime +//! The indices the runtime's backend gives textures and sampler states, which the runtime //! leaves to its consumer: the index the stream names for the object where the runtime takes it //! (a descriptor's or a view's resource index, else the ID the program saw of the object), else //! the lowest index of the object's class that no object holds and the program did not reserve, diff --git a/crates/metal2vulkan-validation/src/replay/new_runtime/judged.rs b/crates/metal2vulkan-validation/src/replay/new_runtime/judged.rs index 989cd8c3f..81bba38ca 100644 --- a/crates/metal2vulkan-validation/src/replay/new_runtime/judged.rs +++ b/crates/metal2vulkan-validation/src/replay/new_runtime/judged.rs @@ -1,4 +1,4 @@ -//! The matrix's judged metrics of a play on the new runtime (`docs/REPLAY-STREAM.md`, section 10): +//! The matrix's judged metrics of a play on the runtime (`docs/REPLAY-STREAM.md`, section 10): //! counts two plays of one stream at one commit on one card give alike, summed over the whole //! play as the runtime executed it, each an `M2V-MATRIX metric` record that the matrix holds equal //! to its base's (`docs/VALIDATION.md`, "Records and rules"). A play that did not finish its range diff --git a/crates/metal2vulkan-validation/src/replay/new_runtime/mod.rs b/crates/metal2vulkan-validation/src/replay/new_runtime/mod.rs index c73646885..1d0593243 100644 --- a/crates/metal2vulkan-validation/src/replay/new_runtime/mod.rs +++ b/crates/metal2vulkan-validation/src/replay/new_runtime/mod.rs @@ -1,4 +1,4 @@ -//! The player's backend over the new runtime (`metal2vulkan-runtime`), through its public API on one +//! The player's backend over the runtime (`metal2vulkan-runtime`), through its public API on one //! device. The backend is the runtime's consumer: it takes the blocks the stream's own buffers lie //! in (`places`) and every texture and sampler index, granted at the start. A block of the stream //! is a block of the runtime, and a heap is a block of its own. What the runtime does not build @@ -333,7 +333,7 @@ impl InFlight { } } -/// The new runtime on one device. +/// The runtime on one device. pub struct NewRuntime { /// The consumer's pre-pass the player stands in for, where it runs (`with_prepass`): its /// threads end before the device does. diff --git a/crates/metal2vulkan-validation/src/replay/new_runtime/render.rs b/crates/metal2vulkan-validation/src/replay/new_runtime/render.rs index ef2ccb2ce..5fdd864d2 100644 --- a/crates/metal2vulkan-validation/src/replay/new_runtime/render.rs +++ b/crates/metal2vulkan-validation/src/replay/new_runtime/render.rs @@ -1,4 +1,4 @@ -//! Render pipeline states, render pass descriptors and render encoders on the new runtime. +//! Render pipeline states, render pass descriptors and render encoders on the runtime. //! //! What the runtime does not build yet is skipped and counted: a render pipeline state it answers //! with a typed gap or the translator refuses (`render_states`, by the gap, with the first state diff --git a/crates/metal2vulkan-validation/src/replay/rt_replay.rs b/crates/metal2vulkan-validation/src/replay/rt_replay.rs index ef750046e..1e823600e 100644 --- a/crates/metal2vulkan-validation/src/replay/rt_replay.rs +++ b/crates/metal2vulkan-validation/src/replay/rt_replay.rs @@ -1,4 +1,4 @@ -//! Device tests of the replay player on the new runtime (`replay::NewRuntime`), on the device the +//! Device tests of the replay player on the runtime (`replay::NewRuntime`), on the device the //! cfg selects: streams the tests write (`docs/REPLAY-STREAM.md`), each played and its report //! printed as `REPLAY `. //! @@ -85,7 +85,7 @@ //! level and makes its second from them at its first use: blits of both levels read the //! expected texels, and the take is counted once. //! -//! The new runtime's device is opened behind the hang tripwire, as every device open in this crate +//! The runtime's device is opened behind the hang tripwire, as every device open in this crate //! is (`gpu.rs`), its kernels kept in a cache the test owns ([`ScratchCache`]). use crate::gpu::{self, DeviceType}; @@ -116,7 +116,7 @@ impl ScratchCache { } } -/// The new runtime's first device of the cfg's kind (a GPU: discrete, then integrated, then +/// The runtime's first device of the cfg's kind (a GPU: discrete, then integrated, then /// virtual; else the CPU), its kernels kept in `cache`. fn rt_device(cache: &Path) -> metal2vulkan_runtime::Device { use ash::vk::PhysicalDeviceType as Kind; @@ -165,7 +165,7 @@ fn flagged( path } -/// `path` played on the new runtime's device, its report and the backend's lines printed; the +/// `path` played on the runtime's device, its report and the backend's lines printed; the /// play's end unwrapped. fn play(test: &str, path: &Path) -> (Report, Vec) { let (report, lines, ()) = play_then(test, path, |_| ()); @@ -1276,7 +1276,7 @@ fn a_private_shown_texture_is_checked_through_a_copy() { /// descriptor object #9, 128 by 2 RGBA8Unorm texels of two levels, 512 bytes a row: the buffer's texels come in 2 by 2 /// squares of one colour each, so the second level made from the first by a filter of each square /// is that square's colour exactly. A blit encoder copies the first level into #5 and the second -/// into #6, each shown at a present. On the new runtime the use takes the buffer's bytes into the +/// into #6, each shown at a present. On the runtime the use takes the buffer's bytes into the /// first level and makes the second from it, once. #[test] fn a_tiled_texture_takes_its_buffer_s_bytes_and_levels_at_first_use() { @@ -2455,7 +2455,7 @@ fn census(report: &Report) -> [u64; 3] { .map(|key| stream[key]) } -/// On the new runtime, which makes the block elsewhere, the word that looks like an address +/// On the runtime, which makes the block elsewhere, the word that looks like an address /// plays as written: the buffer reads back the recorded bytes, the word is counted, and nothing /// moved. #[test] diff --git a/crates/metal2vulkan-validation/src/replay/tests.rs b/crates/metal2vulkan-validation/src/replay/tests.rs index de77fc2c7..ba3cb15f1 100644 --- a/crates/metal2vulkan-validation/src/replay/tests.rs +++ b/crates/metal2vulkan-validation/src/replay/tests.rs @@ -718,7 +718,7 @@ fn judged_counts() -> Counters { ]) } -/// The matrix's judged metrics of a play on the new runtime are the play's executed totals, one +/// The matrix's judged metrics of a play on the runtime are the play's executed totals, one /// record each under the stream's first segment's stem (whitespace made `_`) and its range: the /// barriers less the one after each upload's clears, the clears and their bytes, a counter the /// backend does not report as 0, and no other @@ -804,7 +804,7 @@ fn a_short_play_gives_no_judged_metric() { assert_eq!(judged_records(first, &report, &ended, None), none); } -/// The gauges the new runtime's backend reads once its device dropped go out as the matrix's +/// The gauges the runtime's backend reads once its device dropped go out as the matrix's /// lines, `M2V-MATRIX gauge replay-rt/device/GAUGE@drop N`: three fields after the marker, the /// key ending in `@drop`, as `scripts/matrix/results.py` reads a record, whose rule fails a gauge /// not at zero there. The end's error names such a gauge. @@ -1590,7 +1590,7 @@ fn a_texture_marked_outside_whose_id_the_program_saw_stops_the_play() { assert_eq!(report.ids, []); } -/// The new runtime's backend places a texture marked `outside` at the highest free index of its +/// The runtime's backend places a texture marked `outside` at the highest free index of its /// class and leaves its sequence where it was: the plain texture made after it takes the index /// it takes where the stream makes no marked one, and a second marked texture the next free /// index down. @@ -1618,7 +1618,7 @@ fn a_texture_marked_outside_takes_no_index_of_the_sequence() { assert_eq!((marked, marked_again), (end - 1, end - 2)); } -/// The new runtime's backend gives a constexpr sampler, which the stream names no index for, the +/// The runtime's backend gives a constexpr sampler, which the stream names no index for, the /// highest free sampler index, past those the same call took, and leaves the sequence the /// program's sampler states take where it was: a sampler state at its index would take it. #[test] @@ -1892,7 +1892,7 @@ fn a_frame_end_reports_the_gauges_as_they_stand() { assert!(ends[1].ends_with(" live calls=3"), "{lines:?}"); } -/// The new runtime's `unwritten` line counts, once, a Shared buffer a committed dispatch read +/// The runtime's `unwritten` line counts, once, a Shared buffer a committed dispatch read /// before anything recorded reached its bytes: not one written through its block, one a blit /// names, one written before the commit, one an earlier commit's dispatch bound or one released /// before the commit. diff --git a/crates/metal2vulkan/src/lower/simd/lockstep.rs b/crates/metal2vulkan/src/lower/simd/lockstep.rs index 52dda357e..aaffe8650 100644 --- a/crates/metal2vulkan/src/lower/simd/lockstep.rs +++ b/crates/metal2vulkan/src/lower/simd/lockstep.rs @@ -2,7 +2,7 @@ //! device-memory accesses a kernel leaves to the lockstep of Apple's simdgroups. //! //! **Where it runs.** Under the resident-table domains, the old runtime's, until the cutover -//! deletes it. Under the identity domains (`lower::access::identity`, the new runtime's) no kernel +//! deletes it. Under the identity domains (`lower::access::identity`, the runtime's) no kernel //! is ordered ([`OrderKey::of`] is `None`): documented Metal orders the threads of a simdgroup //! only through barriers and atomics, and calls their conflicting accesses between barriers a data //! race (docs/API.md, accepted differences). diff --git a/docs/CONFORMANCE-COVERAGE.md b/docs/CONFORMANCE-COVERAGE.md index 2201a83e5..63614d41e 100644 --- a/docs/CONFORMANCE-COVERAGE.md +++ b/docs/CONFORMANCE-COVERAGE.md @@ -2024,9 +2024,9 @@ The Metal leg sends these selectors to a receiver this typed, and `scripts/metal ## Facts answered field by field -A facts call answers many getters at once, and a side answers or refuses each of them on its own (`Field` in the suite's `case.rs`): a field it cannot answer is a refusal at its own leaf, held to the ledger as a call's refusal is, and the fields beside it still compare. So the call running says nothing of which fields were compared, and these types are counted by field: each one's fields, the ones a side may refuse, and the new runtime's ledger rows (`known-gaps-rt.tsv`) that refuse each at its leaf. +A facts call answers many getters at once, and a side answers or refuses each of them on its own (`Field` in the suite's `case.rs`): a field it cannot answer is a refusal at its own leaf, held to the ledger as a call's refusal is, and the fields beside it still compare. So the call running says nothing of which fields were compared, and these types are counted by field: each one's fields, the ones a side may refuse, and the runtime's ledger rows (`known-gaps-rt.tsv`) that refuse each at its leaf. -| type | fields | refusable | refusable field: its leaf, the new runtime's refusal rows (every venue), cases | +| type | fields | refusable | refusable field: its leaf, the runtime's refusal rows (every venue), cases | |---|---|---|---| | `ComputeDescriptorFacts` | 11 | 2 | `label`: `label`, 3 (3), 3; `binary_archives`: `binary_archives`, 3 (3), 3 | | `FunctionFacts` | 9 | 2 | `options`: `options`, 22 (22), 22; `device_is_the_cases`: `device`, 24 (24), 24 | diff --git a/docs/REFUSALS.md b/docs/REFUSALS.md index c127b35d1..a2a4be53a 100644 --- a/docs/REFUSALS.md +++ b/docs/REFUSALS.md @@ -1,6 +1,6 @@ # The refusal surface -Every refusal of something Metal accepts, read from the code: the construction sites of the typed refusals outside tests (`scripts/refusal-surface/refusal_surface.py`, which writes this file; edit its `reach.tsv` and the refusals' own doc comments, never the tables). Section 6 is the new runtime's floor: a device below it is refused when the device is made, with every item it lacks named. The sections after it are the new runtime's own typed refusals, one for each enum its `Error` carries, every row with its declared basis. Malformed input of no Metal call at all is misuse and is not listed. [`METAL-COVERAGE.md`](METAL-COVERAGE.md) lists the Metal API the runtime has no counterpart for at all. +Every refusal of something Metal accepts, read from the code: the construction sites of the typed refusals outside tests (`scripts/refusal-surface/refusal_surface.py`, which writes this file; edit its `reach.tsv` and the refusals' own doc comments, never the tables). Section 6 is the runtime's floor: a device below it is refused when the device is made, with every item it lacks named. The sections after it are the runtime's own typed refusals, one for each enum its `Error` carries, every row with its declared basis. Malformed input of no Metal call at all is misuse and is not listed. [`METAL-COVERAGE.md`](METAL-COVERAGE.md) lists the Metal API the runtime has no counterpart for at all. Columns: @@ -20,7 +20,7 @@ Columns: - `rare`: public API, but specialized: few apps reach it; - `none`: no public API path: malformed or non-Metal input, Apple-private calls, or a cap no valid program of ordinary size meets; - `?`: not assessed yet. - The floor (section 6) carries no reach mark, as it turns on the device whatever the program, and nor do the new runtime's refusals after it, each an argument of a public call. + The floor (section 6) carries no reach mark, as it turns on the device whatever the program, and nor do the runtime's refusals after it, each an argument of a public call. ## Totals @@ -31,10 +31,10 @@ Columns: | Translation caps | 14 | 14 | 0 | 0 | 7 | 7 | 0 | | Rate maps the compile layer does not compile | 5 | 5 | 0 | 0 | 4 | 1 | 0 | | The translation deadline | 1 | 1 | 0 | 0 | 0 | 1 | 0 | -| Devices below the new runtime's floor | 8 | 8 | 0 | 0 | 0 | 0 | 0 | -| The new runtime's `Refusal` | 75 | 75 | 0 | 0 | 0 | 0 | 0 | -| The new runtime's `Limit` | 17 | 17 | 0 | 0 | 0 | 0 | 0 | -| The new runtime's `Gap` | 30 | 30 | 0 | 0 | 0 | 0 | 0 | +| Devices below the runtime's floor | 8 | 8 | 0 | 0 | 0 | 0 | 0 | +| The runtime's `Refusal` | 75 | 75 | 0 | 0 | 0 | 0 | 0 | +| The runtime's `Limit` | 17 | 17 | 0 | 0 | 0 | 0 | 0 | +| The runtime's `Gap` | 30 | 30 | 0 | 0 | 0 | 0 | 0 | ## Totals by basis @@ -45,10 +45,10 @@ Columns: | Translation caps | 0 | 0 | 0 | 0 | 14 | 0 | 0 | 0 | | Rate maps the compile layer does not compile | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5 | | The translation deadline | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | -| Devices below the new runtime's floor | 0 | 0 | 0 | 8 | 0 | 0 | 0 | 0 | -| The new runtime's `Refusal` | 20 | 20 | 0 | 0 | 35 | 0 | 0 | 0 | -| The new runtime's `Limit` | 0 | 0 | 0 | 13 | 4 | 0 | 0 | 0 | -| The new runtime's `Gap` | 0 | 0 | 0 | 2 | 28 | 0 | 0 | 0 | +| Devices below the runtime's floor | 0 | 0 | 0 | 8 | 0 | 0 | 0 | 0 | +| The runtime's `Refusal` | 20 | 20 | 0 | 0 | 35 | 0 | 0 | 0 | +| The runtime's `Limit` | 0 | 0 | 0 | 13 | 4 | 0 | 0 | 0 | +| The runtime's `Gap` | 0 | 0 | 0 | 2 | 28 | 0 | 0 | 0 | ## 1. Translator and front-end refusals (`Unsupported`: a `Feature` and its `Needs`) @@ -139,7 +139,7 @@ Columns: | `RasterizationRateMap` | | devices without VkFeature::MultiViewport; devices without VkFeature::ShaderDrawParameters; devices without VkFeature::ShaderOutputViewportIndex; devices without VkLimit::MaxGeometryTotalOutputComponents; devices without a capability the site computes; devices without a capability the site computes (`vec![Capability::Feature(lacks)]`); every device (not implemented) | `ours` | 10: `crates/metal2vulkan/src/lower/stage_io/plan.rs (region_copy, 3 sites)`, `crates/metal2vulkan/src/lower/stage_io/plan.rs (region_viewport, 2 sites)` (+3) | `rare`: rasterization rate maps | | `GpuEncodedIndirectCommands` | | devices short of a Vulkan feature the site names; devices without buffer device addresses (`addressed_needs`); every device (no Vulkan mechanism); every device (not implemented) | `ours` | 21: `crates/metal2vulkan/src/bind/replay.rs (preprocess)`, `crates/metal2vulkan/src/bind/replay.rs (replay_preprocess_module)` (+13) | `rare`: indirect command buffers encoded by a kernel | | `VulkanVersion` | The device's Vulkan version is below the 1.2 floor | devices without ApiVersion::V1_2 | `device` | 2: `crates/metal2vulkan/src/ash_interop/query.rs (query)`, `crates/metal2vulkan/src/device/derive.rs (from_queries)` | `none`: a device below Vulkan 1.2 | -| `IdentityDomains` | The identity pointer and handle domains (`PointerDomain::Identity`, `HandleDomain::Identity`) | devices without a capability the site computes (`all`); every device (not implemented) | `ours` | 6: `crates/metal2vulkan/src/device/derive.rs (identity_domains)`, `crates/metal2vulkan/src/lower/sampler/anisotropic.rs (select)` (+4) | `none`: the identity domains, which the new runtime alone takes and which lower only kernels over buffer slots, textures in slots or argument buffers, and runtime samplers, so far | +| `IdentityDomains` | The identity pointer and handle domains (`PointerDomain::Identity`, `HandleDomain::Identity`) | devices without a capability the site computes (`all`); every device (not implemented) | `ours` | 6: `crates/metal2vulkan/src/device/derive.rs (identity_domains)`, `crates/metal2vulkan/src/lower/sampler/anisotropic.rs (select)` (+4) | `none`: the identity domains, which the runtime alone takes and which lower only kernels over buffer slots, textures in slots or argument buffers, and runtime samplers, so far | | `Constant` | A constants-block record LLVM defines that the typed model has no form for (a block address, a `select` and the other constant expressions of... | - | `-` | via a helper: 3: `crates/metal2vulkan-air/src/bitcode/constants.rs (record, 2 sites)`, `crates/metal2vulkan/src/error/mod.rs (from)` | `none`: LLVM constant forms AIR does not emit | | `Attribute` | An LLVM attribute kind that changes the calling ABI and that AIR does not use (`inalloca`, `preallocated`, `byref`, `nest`, the `swift*` kinds) | - | `-` | via a helper: 2: `crates/metal2vulkan-air/src/bitcode/attrs.rs (known)`, `crates/metal2vulkan/src/error/mod.rs (from)` | `none`: LLVM ABI attributes AIR does not use | | `BitcodeRecord` | A bitcode record LLVM defines in `block` that the typed model does not cover and that has no more specific variant (legacy spellings predating... | - | `-` | via a helper: 8: `crates/metal2vulkan-air/src/bitcode/attrs.rs (decode_lists)`, `crates/metal2vulkan-air/src/bitcode/function.rs (symtab)` (+5) | `none`: bitcode records AIR does not emit | @@ -242,7 +242,7 @@ Columns: |---|---|---|---|---|---| | `Time` | The attempt's deadline passed | every device (the attempt's deadline, 20 seconds by default) | `ours` | 1: `crates/metal2vulkan-air/src/budget/mod.rs (counted)` | `none`: a translation past its deadline: a defect of ours to fix on any supported input (AGENTS.md: 20 seconds) | -## 6. Devices below the new runtime's floor (`floor::BelowFloor`: each `floor::Missing`) +## 6. Devices below the runtime's floor (`floor::BelowFloor`: each `floor::Missing`) | Variant | What it blocks | Where | Basis | Sites | Reach | |---|---|---|---|---|---| @@ -255,7 +255,7 @@ Columns: | `TimeDomain` | A time domain of [`TIME_DOMAINS`] the device does not calibrate (`vkGetPhysicalDeviceCalibrateableTimeDomainsEXT`), as Vulkan names it | devices below the floor, at device creation | `device` | 1: `crates/metal2vulkan-runtime/src/floor.rs (decide)` | `-` | | `SetLayout` | The layout of one of the runtime's descriptor sets, `set` 0 (empty) or 1 (the texture and sampler arrays), which `vkGetDescriptorSetLayoutSupport`... | devices below the floor, at device creation | `device` | 1: `crates/metal2vulkan-runtime/src/arrays.rs (supported)` | `-` | -## 7. The new runtime's `Refusal` (`Error::Refused(Refusal)`) +## 7. The runtime's `Refusal` (`Error::Refused(Refusal)`) | Variant | What it blocks | Where | Basis | Sites | Reach | |---|---|---|---|---|---| @@ -335,7 +335,7 @@ Columns: | `ViewportNotFinite` | A viewport with a field that is NaN or infinite (but its origin's x, which draws nothing) | every device (a public call's own check of its arguments) | `metal-measured`: an Apple M4, macOS 27.0.1: Metal's validation stops a NaN or infinite origin; the other fields are taken by the same rule | 1: `crates/metal2vulkan-runtime/src/render_encoder.rs (set_viewport)` | `-` | | `StencilAttachment` | A draw under a depth-stencil state that tests the stencil, in a pass without a stencil attachment | every device (a public call's own check of its arguments) | `metal-measured`: an Apple M4, macOS 27.0.1: Metal's validation stops the draw; plain Metal tests it against a hidden stencil of 0 that the runtime does not keep | 1: `crates/metal2vulkan-runtime/src/render_encoder.rs (draw)` | `-` | -## 8. The new runtime's `Limit` (`Error::Limit(Limit)`) +## 8. The runtime's `Limit` (`Error::Limit(Limit)`) | Variant | What it blocks | Where | Basis | Sites | Reach | |---|---|---|---|---|---| @@ -357,7 +357,7 @@ Columns: | `ExportType` | An export of a handle the device gives, but not in the one form an export takes (`Device::new_exported_block`) | at the device's limit | `device`: its extensions and the buffer's memory requirements | 6: `crates/metal2vulkan-runtime/src/export.rs (new_exported_block)`, `crates/metal2vulkan-runtime/src/import.rs (surface_import)` (+4) | `-` | | `TextureSamples` | A multisample texture of a sample count the device does not make for its format, type and usage | at the device's limit | `device`: the image format query's `sampleCounts` | 1: `crates/metal2vulkan-runtime/src/texture.rs (plan)` | `-` | -## 9. The new runtime's `Gap` (`Error::Unsupported(Gap)`) +## 9. The runtime's `Gap` (`Error::Unsupported(Gap)`) | Variant | What it blocks | Where | Basis | Sites | Reach | |---|---|---|---|---|---| diff --git a/scripts/conformance-coverage/coverage.py b/scripts/conformance-coverage/coverage.py index 43afc0e5c..1f77f0609 100644 --- a/scripts/conformance-coverage/coverage.py +++ b/scripts/conformance-coverage/coverage.py @@ -568,12 +568,12 @@ FIELD_SITE = re.compile(r'Node::leaf\(\s*"([^"]+)",\s*field\(\s*&self\.(\w+)') def field_facts(families: dict[str, dict]) -> list[dict]: """The facts types a side answers field by field: each one's fields, and of them the ones a - side may refuse on their own (`crate::case::Field`), with the leaf each records at and the new + side may refuse on their own (`crate::case::Field`), with the leaf each records at and the runtime's ledger rows that refuse it, of the cases whose module calls a `Side` method answering the type. A facts call answers many getters at once, so its call running says nothing of which of its - fields were compared: a field the new runtime's side refuses is a refusal at its own leaf, and + fields were compared: a field the runtime's side refuses is a refusal at its own leaf, and is counted here as a field, not covered by the call beside it.""" rows = [] path = SUITE / "known-gaps-rt.tsv" @@ -1825,12 +1825,12 @@ def write(data) -> str: "its own (`Field` in the suite's `case.rs`): a field it cannot answer is a refusal at its " "own leaf, held to the ledger as a call's refusal is, and the fields beside it still " "compare. So the call running says nothing of which fields were compared, and these " - "types are counted by field: each one's fields, the ones a side may refuse, and the new " + "types are counted by field: each one's fields, the ones a side may refuse, and the " "runtime's ledger rows (`known-gaps-rt.tsv`) that refuse each at its leaf." ) w("") if data["field_facts"]: - w("| type | fields | refusable | refusable field: its leaf, the new runtime's refusal rows (every venue), cases |") + w("| type | fields | refusable | refusable field: its leaf, the runtime's refusal rows (every venue), cases |") w("|---|---|---|---|") for facts in data["field_facts"]: each = "; ".join( diff --git a/scripts/refusal-surface/reach.tsv b/scripts/refusal-surface/reach.tsv index 17541d9e0..1d7f57f6d 100644 --- a/scripts/refusal-surface/reach.tsv +++ b/scripts/refusal-surface/reach.tsv @@ -87,7 +87,7 @@ feature Tensors rare shader tensors feature RasterizationRateMap rare rasterization rate maps feature GpuEncodedIndirectCommands rare indirect command buffers encoded by a kernel feature VulkanVersion none a device below Vulkan 1.2 -feature IdentityDomains none the identity domains, which the new runtime alone takes and which lower only kernels over buffer slots, textures in slots or argument buffers, and runtime samplers, so far +feature IdentityDomains none the identity domains, which the runtime alone takes and which lower only kernels over buffer slots, textures in slots or argument buffers, and runtime samplers, so far feature Constant none LLVM constant forms AIR does not emit feature Attribute none LLVM ABI attributes AIR does not use feature BitcodeRecord none bitcode records AIR does not emit diff --git a/scripts/refusal-surface/refusal_surface.py b/scripts/refusal-surface/refusal_surface.py index 362b35f67..43eab1682 100755 --- a/scripts/refusal-surface/refusal_surface.py +++ b/scripts/refusal-surface/refusal_surface.py @@ -13,9 +13,9 @@ The refusal surface is read from the construction sites of the typed refusals, o - the translation caps (`Limit`, `Error::LimitExceeded`); - the rasterization-rate maps the compile layer does not compile (`UnpinnedCompile`); - the translation deadline (`BudgetExceeded`, `Error::Budget`); -- the new runtime's floor (`floor::BelowFloor`, in crates/metal2vulkan-runtime): each `floor::Missing` +- the runtime's floor (`floor::BelowFloor`, in crates/metal2vulkan-runtime): each `floor::Missing` item a device below the floor lacks; -- the new runtime's own refusal enums: each variant of its `Error` whose payload is one enum it +- the runtime's own refusal enums: each variant of its `Error` whose payload is one enum it declares (`Refused(Refusal)`, `Limit(Limit)`, and any added later), found from that payload, one section each, every variant with a declared basis. @@ -27,7 +27,7 @@ its sites name), its sites, its basis, and a reach mark, which is the one hand-k The basis says where the belief that this input must be refused comes from. It is derived from the construction site wherever the site states it, and declared in the refusal's own doc comment, as a last line `Basis: (the evidence)`, wherever the claim is about Metal itself, which no site -can state. `--check` requires one of every variant of the new runtime's refusal enums: a refusal +can state. `--check` requires one of every variant of the runtime's refusal enums: a refusal that asserts Metal stops an input cannot be added with nothing behind it, and one whose basis is not settled says `Basis: unknown (why)` rather than nothing. @@ -60,10 +60,10 @@ TREES = [ ("rt", CRATES / "metal2vulkan-runtime" / "src"), ] -# The new runtime's floor: the file that declares `Missing`, the items of `BelowFloor`. +# The runtime's floor: the file that declares `Missing`, the items of `BelowFloor`. FLOOR_RS = CRATES / "metal2vulkan-runtime" / "src" / "floor.rs" -# The new runtime's error: each variant whose payload is one enum the runtime declares is a family +# The runtime's error: each variant whose payload is one enum the runtime declares is a family # of typed refusals (`Refused(Refusal)`, `Limit(Limit)`, `Unsupported(Gap)`, and any added later). RT_ERROR_RS = CRATES / "metal2vulkan-runtime" / "src" / "error.rs" @@ -417,7 +417,7 @@ def is_pattern(text, start, end): def scan(rt_enums=()): """Rows keyed by (section, variant): conditions, sites. - `rt_enums` are the new runtime's refusal enums ([`rt_refusal_enums`]), each its own section. + `rt_enums` are the runtime's refusal enums ([`rt_refusal_enums`]), each its own section. """ rows = defaultdict(lambda: {"conds": set(), "kinds": set(), "sites": [], "indirect": []}) feature_refs = defaultdict(list) @@ -565,12 +565,12 @@ def enum_variants(path, enum): def rt_section(enum): - """The section key of one of the new runtime's refusal enums.""" + """The section key of one of the runtime's refusal enums.""" return f"rt:{enum}" def rt_refusal_enums(): - """(variant, enum, file) for each variant of the new runtime's `Error` whose whole payload is + """(variant, enum, file) for each variant of the runtime's `Error` whose whole payload is one enum the runtime declares: `Refused(Refusal)`, `Limit(Limit)`, and any family added later. Structural: no list of names is kept here. @@ -688,14 +688,14 @@ def build(): "Rate maps the compile layer does not compile (`UnpinnedCompile`)", ), ("budget", tdocs, "The translation deadline (`Error::Budget`)"), - ("floor", mdocs, "Devices below the new runtime's floor (`floor::BelowFloor`: each `floor::Missing`)"), + ("floor", mdocs, "Devices below the runtime's floor (`floor::BelowFloor`: each `floor::Missing`)"), ] for variant, enum, file in rt_enums: sections.append( ( rt_section(enum), OrderedDict((n, d) for n, d, _ in enum_arms(file, enum)), - f"The new runtime's `{enum}` (`Error::{variant}({enum})`)", + f"The runtime's `{enum}` (`Error::{variant}({enum})`)", ) ) for section, docs, title in sections: @@ -781,9 +781,9 @@ def render(tables): "Every refusal of something Metal accepts, read from the code: the construction sites of the " "typed refusals outside tests (`scripts/refusal-surface/refusal_surface.py`, which writes this " "file; edit its `reach.tsv` and the refusals' own doc comments, never the tables). " - "Section 6 is the new runtime's floor: a " + "Section 6 is the runtime's floor: a " "device below it is refused when the device is made, with every item it lacks named. " - "The sections after it are the new runtime's own typed refusals, one for each enum its " + "The sections after it are the runtime's own typed refusals, one for each enum its " "`Error` carries, every row with its declared basis. " "Malformed input of no Metal call at all is misuse and is not listed. " "[`METAL-COVERAGE.md`](METAL-COVERAGE.md) lists the Metal API the runtime has no " @@ -822,7 +822,7 @@ def render(tables): lines.append(" - `?`: not assessed yet.") lines.append( " The floor (section 6) carries no reach mark, as it turns on the device whatever the " - "program, and nor do the new runtime's refusals after it, each an argument of a public " + "program, and nor do the runtime's refusals after it, each an argument of a public " "call." ) lines.append("") @@ -1023,7 +1023,7 @@ def main(): print(f"{s}::{n}: its `Basis:` {why}", file=sys.stderr) print( f"{len(faults)} refusals whose basis is absent or malformed (--missing-basis). Every " - "variant of the new runtime's refusal enums carries a last doc-comment line `Basis: (the " + "variant of the runtime's refusal enums carries a last doc-comment line `Basis: (the " "evidence)`; a refusal whose basis is not settled says `Basis: unknown (why)` rather " "than nothing.", file=sys.stderr,