53f3e522e942bfa2d74a1ed05ea12e6cf0a9d7ad
12
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
5d725aeec7 |
Delete metal2vulkan-runtime, with every test and script that read it
The cutover deletes the old runtime: crates/metal2vulkan-runtime and its workspace member go. Nothing in the workspace depends on it any more: the harness and conformance lost their old arms, and validation dropped its dependency in its own commit. Adapted in this commit, so no gate reads the deleted tree: - CI and scripts/linux-gate-ci: the crate's per-feature clippy group, its `-p` in the Windows clippy and the test step, and its private-doc-links row go. Packaging needs no edit: the workspace's published crates are now metal2vulkan and metal2vulkan-air. - The published-crates test lists those two; devtools' carried trees and the five nextest groups of the old crate's tests go. - scripts/api-signatures: the crate leaves CRATES, FLOORS and the header, its self-test trees name rt (read by the same rules), and the table is re-blessed (the old crate's 4555 rows go); api_signatures.rs pins the three crates left. - scripts/refusal-surface: the old crate's tree and its sections go (RuntimeGap, AppleOnly, Problem and the problem enums it forwards to), with their 87 reach rows, the `--delegations` verb and the test that counted the old Problem's delegations; docs/REFUSALS.md is regenerated. The basis check now holds rt's refusal enums alone, which it already required. - scripts/api-cost-coverage goes: it measured only the old crate's surface. - feature_vocabulary.rs: the old crate's two enable tables go; the Khronos and validation tables stay held to the vocabulary. - The conformance coverage generator's by-hand roots read rt instead of the old crate, and docs/CONFORMANCE-COVERAGE.md is regenerated (MTLResourceOptions' row, which only the old crate modelled, gives way to rt's MTLCommandBufferError). - scripts/matrix: the harness times the new runtime alone (`--runtime new`), so the rules that judged it against the old one go: the new-over-old budget with its floors (floors.tsv, gpu-floors.tsv), ceilings, card variance and status table (status.tsv), the frozen arm, the base spread and the timing once more it set off, the re-timed pairs, the five creation rounds and the old runtime's parked tests and records. A harness row's time is judged as a cross-GPU outlier, with its alone runs as before, and the frame and burst rows by their stored instruction counts; the creation rows run once, in their own process. docs/VALIDATION.md's matrix section says these rules. Checked locally (python, no build): signatures.py --check and --selftest, refusal_surface.py --check, --selftest and --missing-basis, coverage.py --check and --selftest, and scripts/matrix's 49 tests pass. The compile gate (fmt, clippy plain, --cfg m2v_gpu and --cfg m2v_cpu_icd, Windows clippy for gnullvm and msvc, workspace Rustdoc, packaging, the touched crates' suites on the host and on lavapipe) runs on this sha as potluck jobs that the landing note names. |
||
|
|
576a7348bc |
translator: one stage bound on every device; the two stage-size workarounds go
A module whose entry weighs more than COMPILED_STAGE_WEIGHT (99,109, the heaviest stage measured to compile within host-sized memory, on ANV) is now handed to no driver, whatever its identity. A kernel that emulated its simdgroups only in place of the widest mode's pin (the subgroup size range decides it) is planned again keeping the pin, as before; every other module past the bound is refused with Feature::StageSize and a new Needs::StageBound, its symbol naming the weight and the bound. The refusal is permanent for the input on the device (its plan decides the weight), so it is not NotImplemented; validation reads it as the translator's own gap. DriverWorkaround::SerializedStageWrapsLargeModules and CompilerMemoryGrowsWithStageSize go, with ANV's identity entries for them and the serialized bound (786,432), which the single bound sits far below. Why: the workaround ladder takes one form for every device, the slowest compiler's; a device whose compiler would take a heavier stage is refused it, recorded in FAST-PATHS' known gaps. Measured before this change, with a scratch build that applied the bounds and the re-plan to every profile: the corpus on the Iris Xe's description without its identity refused nothing (largest planned module 91,399, job m3-max-41496), and RADV and NVIDIA nothing either; without maximal reconvergence 12 rows were refused, 6 distinct simdgroup-matrix modules of 198 to 285 products whose lockstep pairs force emulated simdgroups (jobs m3-max-41474, m3-max-41523). The owned fixture stage_bound/stage_bound_matrix (512 simdgroup matrix products beside a lockstep pair in divergent flow, our own MSL) has their structure: on the Iris Xe its emulated module weighs 123,307 and its pinned one 37,646; without maximal reconvergence it is refused at 123,308 (scratch weighing, job m3-max-41602). The new test the_stage_bound_fixture_keeps_the_pin_or_is_refused asserts both paths and that the re-planned kernel is under the bound. The old runtime's heap-trim test loses its long chain, now refused on every device; it asks for a trim where the making left more than the floor free (NVIDIA's compile never does under the bound, 189 MB at most measured). SEMANTICS_VERSION 2150; REFUSALS.md regenerated; the API table loses the two variants and gains Needs::StageBound. |
||
|
|
4e8784ad14 |
refusal surface: the new runtime's own refusal enums, one section each
What: refusal_surface.py reads the new runtime's Error and makes a section of docs/REFUSALS.md for each variant whose payload is one enum the runtime declares: today Refused(Refusal) and Limit(Limit), and any family added later (a Gap included) without a list of names to keep. Each of their variants declares its basis, as Problem's do, and --check fails on one that does not. The translator's Limit section no longer counts rt's Limit sites. A rustdoc link [text](path) in a summary reads as its text; three existing rows lose a link the file could not follow. Why: AGENTS.md wants every new refusal in REFUSALS.md, and the scan of rt read the floor's Missing only, so EmptyBuffer, BufferPastBlock, BlockLen and BlockIds were missing. Their basis lines cite the M3 Max measurements the old runtime records for the same answers (newBufferWithLength:0 and a placement past the heap's end answer nil), the device's limits, and our 32-bit numbers. How verified: the script regenerates, --check and --selftest pass locally; the refusal_surface test runs in the compile job. |
||
|
|
374e29a988 |
metal2vulkan-rt: the floor's shader features, queue family, timestamps and memory types
The floor now also requires what the translator's shaders and the runtime's core need of every device: - shaderInt16, shaderInt8, storageBuffer16BitAccess (Vulkan 1.1 features, now read and enabled through Features::vulkan11), storageBuffer8BitAccess, scalarBlockLayout, vulkanMemoryModel and vulkanMemoryModelDeviceScope. The translator emits 8- and 16-bit access only in storage and physical storage buffers in practice (uniform views are u32 or uvec4, push fields are 32- or 64-bit), so the uniform and push-constant 8/16-bit features stay out; it does use device scope. - timestampComputeAndGraphics, and timestampValidBits of at least 36 on the first queue family with graphics and compute, which Capabilities names (queue_family). A device with no such family is Missing::QueueFamily. - a host-visible, host-coherent, host-cached memory type (Shared storage) and a device-local, host-visible, host-coherent one (the parameter ring), each usable by a buffer of BUFFER_USAGE: every Vulkan 1.3 buffer usage plus device addresses. Vulkan answers buffer memory types only for a created device, so check() finds a type with each set of flags and carries the memory properties, and memory_types(device, &capabilities) chooses the first usable type of each with vkGetDeviceBufferMemoryRequirements. Missing::MemoryType names the flags. Each shortfall is named in BelowFloor, with a unit case; the README's Floor section states every item and tests::floor holds it to the code. The device test now also creates each device with the floor's features and extensions and chooses its memory types on it. CI's lavapipe step (ci.yml and scripts/linux-gate-ci) runs the rt crate's device tests too. refusal_surface.py reads metal2vulkan-rt and writes the floor's Missing as section 10 of docs/REFUSALS.md; signatures.py pins metal2vulkan-rt's public surface in api_signatures.tsv. Verified: see the lane report (compile job, device legs on every lab GPU, lavapipe and the Windows UHD 630). |
||
|
|
ec9706e6e3 |
Survive the loss of the VkDevice: the device is a line of generations
Metal's MTLDevice survives a GPU recovery; the runtime's device refused every call with DeviceLost from the first loss on, and the consumer ends its VM at the first refusal. Now a device the runtime made is a line of generations (device/line.rs), each a DeviceShared over its own VkDevice, and the first call that needs the device after a loss makes a new VkDevice of the same physical device, options, queue families and extensions. - Two kinds of handle. The program's device (and its clones) is a root handle: it holds the line, pins no generation, and every public Device call goes to the generation that serves (each public method forwards to its *_now body). Objects hold generation handles, so their Vulkan calls, drops included, reach their own VkDevice alone. A generation handle's check is one relaxed load of the line's generation (Device::generation_serves). - A draw pays nothing for it. A command buffer takes its generation once, as it is made (CommandBuffer::generation); its encoders' per-draw reaches (work counts, fresh-unwritten and alias records, sampler-slot changes, attachment read notices) read it there, not through a device handle's kind. A bind's device check is one compare of the cells the two handles hold, inlined, its refusal (Device::foreign) out of line. - The state machine (Live, Lost, Failed): the claiming call recovers, every other call waits (a notice past 10 s, waiting on); threads command buffers' completion depends on never wait. Recovery: the lost generation's command buffers in flight fail through its completion path, its queues drain under their locks, create_on makes the next VkDevice, the queues are retired. - Command-buffer answers, as a real loss is one more hang: the oldest incomplete batch's command buffer fails GpuHang (exact on one VkQueue; on two or more the queue whose oldest incomplete batch was submitted first, said so in the notice), counted against its queue so the second revokes it (AccessRevoked); the others GpuRecoveryVictim; one committed on the hang's queue before the recovery runs nothing and completes with no error; one made before and committed after fails GpuRecoveryVictim. One loss names one hang: a batch that went to the driver just before the loss and reached the lost device's completion after the loss took the pending batches fails with it, as a victim (its own wait need not fail: the test hook's VkDevice runs it), and no later failure of the lost device names a second hang. - Command queues survive: a queue is a root handle and a cell of its place on one generation (VkQueue, slots, pools, hangs), which a recovery retires and the next command buffer re-makes; label and GPU-error count go on. - Objects made before a recovery are refused where they meet the new VkDevice or need their lost one: RuntimeGap::MadeBeforeRecovery, at the 38 lost-device checks (Device::lost_refusal) and at every foreign-object check of one line (Device::foreign). DeviceLost stays for a device the consumer made. - Carried across generations: the address space, resource IDs and the passing holds a making waits out before it takes one, unique identifiers, counters and the announced notice kinds. - A device handle is an enum of the two kinds (24 bytes, was 16): the shadow merge's copy-back dispatch, which holds handles, is boxed (clippy's large_enum_variant). - Device::recover_for_test (public, documented) runs the whole path with no GPU fault; RuntimeGap::AdoptedDeviceRecovery on an adopted device. - Degradation::DeviceRecovered (device-recovered), announced at each recovery with the culprit and its time. WorkCounts::vk_devices_live, vk_devices_made, device_recoveries: two VkDevices while objects of the lost one live, one after. Docs: docs/API.md catalogue entry, the runtime README's device-loss section, FAST-PATHS known gap (a make whose own submission first meets the loss is refused DeviceLost), docs/REFUSALS.md regenerated (refusal_surface.py names a forwarded body's sites by its public method), api_signatures blessed. Tests: runtime_lane::device_recovery (hang and victims, command buffers on their way to the driver at a recovery, MadeBeforeRecovery and the VkDevice bound, revocation at the second hang, a command buffer made before fails as victim, all under the validation layer; a recovery that finds nothing of the queue scheduled names no hang, its command buffers victims), tests::device_recovery (the hold of the hang's queue between a loss and the recovery), detach_lost and the MoltenVK lost-device lanes updated to the recovery's answers. Verified: - lavapipe: runtime suite and touched validation tests 1850/1850, surface 19/19 (m3-max-5695, gem10, before the rebase onto |
||
|
|
1366be1718 |
Read the problems a Problem forwards to, and hold each to a basis
The steps this packet landed as, in order: - Keep the quoted Metal messages out of rustdoc's link syntax - Record the runtime sources' hash after the sub-problem basis lines Content: the tree of `development` at 3ade9d9999, unchanged. |
||
|
|
cee7431132 |
Record, per refusal, why Metal is believed to refuse the input
The steps this packet landed as, in order: - Record the runtime sources' hash after the refusals' basis lines Content: the tree of `development` at 75f847189a, unchanged. |
||
|
|
eab25ced7d |
Cite a refusal's sites by file and function, with no generation stamp
The steps this packet landed as, in order: - Say so when a conformance-coverage module is run as a command - Order the TOOLCHAIN fixture lines by byte value, not by the host's locale Content: the tree of `development` at b5a0b1378b, unchanged. |
||
|
|
3d9d7c5885 |
Make the ledger hold a divergence and a venue, not refusals alone
The steps this packet landed as, in order: - Adopt the fragment quad's lavapipe divergence, scoped to that venue - Name the device's own gap where the vocabulary could not, and the notice in a notice-only difference - Pin the sparse sample-count chain as the device's gap, with lavapipe's measurement - Recompute the runtime-sources pin after the rebase Content: the tree of `development` at fb88ec8599, unchanged. |
||
|
|
0d9e71903b |
Read VK_EXT_provoking_vertex: provokingVertexLast and provokingVertexModePerPipeline
The steps this packet landed as, in order: - Write the index rewrite pass's primitives in either provoking vertex order - Draw Apple's last provoking vertex: a last-vertex pipeline, else lists led by it - Test Apple's provoking vertex modes against Metal's on the device - Describe the provoking third way as pipeline-dependent; fix the table test - Check the last provoking vertex through a geometry stage; key its slice notice on stages - Test that executions keep the first vertex; scale the weights check by the values - Register rt6_provoking in the engine inventory and golden printouts - Add host_ab's provoking workload: flat-shaded draws at provoking vertex modes 0 and 1 - Add the index gather pass: one dispatch for a run of direct draws' lists - Gather direct indexed draws' lists in runs: one dispatch per run, not three per draw - Add the rotated-weights variant: Metal's barycentric weights from a rotated triangle - Count private lists' gathers under a last-vertex pipeline; take the open runs whole - Draw listed triangles' barycentric weights through the rotated-weights variant - Draw every provoking vertex mode past 1 the third way, its top bit set or not - Announce nothing for a provoking-mode draw that makes no primitive Content: the tree of `development` at 91b1df7b21, unchanged. |
||
|
|
0175289314 |
Batch the development-fast round: tessellation without tessellationShader, primitive ids, mesh tooling, color groups, the vk12 floor, runtime timing and teardown fixes
One commit of the 247 on development-fast (720ef1ce9a..9f46fdf80d), squashed at the user's request. Translator: - Tessellation on a device without tessellationShader: Metal's tessellator emitted as SPIR-V, a one-workgroup scan placing each patch's triangles in Metal's order, and the post-tessellation function as a plain vertex stage (EmulatedTessellationDraws; SEMANTICS 1739, ARTIFACT_FORMAT 419). - [[primitive_id]] on a device without geometry or tessellation shaders, as a flat varying the vertex function writes; indexed lists, lines and points drawn de-indexed (RuntimeGap::PrimitiveIdIndices). - Fragment functions of more colors than the device draws at once, compiled in color groups (PrecisionNote::ColorAttachmentGroups). - Object functions' threadgroup memory from the render encoder; a kernel's mesh draws from an indirect command buffer; mesh payload sizing. - The Vulkan 1.2 floor profile (vk12-floor) and the gates it needs; Metal 27.0.1 answers as the M3 Max. - Overflow tests in the runtime-built modules by the product's high word (NVIDIA's compiler fails the division form), guarded crate-wide by tests::owned_divisions. Runtime: - Color-group passes replayed per group over twin depth/stencil; snapshot and copy-back cost cuts. - Command buffers finish on the queue waiter that saw them; the waiter holds no device handle, so a program's drop after its wait is the device's last. - Every object an encoder was handed held until its command buffer completes; deallocator order and announcements. - Driver defects recorded and announced: ANV counts a visibility sample once per color output (visibility-count-per-color); MoltenVK fails pending work when memory that held a device-address buffer is freed, so freed memory waits for the work in flight (host-deallocator-delayed). - RenderCommandEncoder::set_object_threadgroup_memory_length; Visibility::counting(). Validation: mesh tooling (object, mesh and ICB-mesh cases on both executors), the authoring census closed, the queue storm judged in Metal's unit, load-robust exits and indirect-census bounds, and the golden hashes, printouts, fixture inventory and authored compile census blessed. Docs: FAST-PATHS.md trimmed to a ledger of what is true now; API.md's catalogue and accepted differences, REFUSALS.md and METAL-COVERAGE.md current. Verified on development-fast before the squash: the full suites on the RTX 5080, RTX 3090, RX 7900 XTX, Radeon 780M, Iris Xe, lavapipe and the M3 (MoltenVK and the Metal oracle), lint in every configuration, rustdoc, doc tests, packaging and public case qualification; the timing and teardown lanes x5 on every venue; the authoring-capability census 16656/16656 with 0 unresolved, the vk12-floor translation census at 6139 translated with the slowest row 794 ms and peak 126 MiB. The tree is development-fast's at 9f46fdf80d. |
||
|
|
13b279df1b |
Squash 11203 commits of translator, runtime, and validation work
Rolls up everything since
|