SEMANTICS_VERSION 2049: MSL 4.1 generic pointers (AIR addrspace(8)) take the one space they come from
The commits before this one. The AIR that MSL 4.1 emits for unqualified pointers uses address space 8, the generic space. It reaches generic pointers through addrspacecast from the device, thread and threadgroup spaces, and answers air.is_device_pointer, air.is_thread_pointer and air.is_threadgroup_pointer. We refused all of it at decode, and so refused macOS 27's system convolution kernels on every device.
- AIR decode:
- addrspace(8) decodes as AddrSpace::Generic;
- the three queries decode as AirIntrinsic::PointerSpace.
- canon::generic: gives each generic pointer the one space every source of it shares.
- A space query is answered from that space.
- Where the pointer decides the answer structurally, the query takes that answer:
- a variable's or global's address is not null;
- a null constant is null;
- `select c, var, null` makes the query `c`;
- otherwise the query becomes `icmp ne p, null`.
- Pointers that only the queries read are deleted.
- What we cannot give one space is refused as Feature::GenericPointer: TwoSpaces (the mixed case), Memory, Aggregate, Call or Integer. The refusal is located where the pointer takes that form. It is recorded in docs/FAST-PATHS.md's known gaps and docs/REFUSALS.md.
- A generic pointer that survives canonicalization is an invariant breach in the memory planner and in lower::select.
Verified:
- The owned fixture generic_pointers.metal, with its spaces, null and mixed cases and the Metal probe of the same kernels:
- it compiles on lavapipe, RDNA3 and MoltenVK-M3, and the mixed case is refused as TwoSpaces (engine_generic_pointers, m3-max-21238);
- runtime_lane::generic_pointers on lavapipe gives all 64 of the M3's words for spaces and its 32 for null (m3-max-21260, matching the M3's m3-max-20340 and 21124).
- canon generic_pointers, 4 tests (m3-max-21172).
- Clippy across the workspace with all features, rustdoc, api_signatures, api_surface, fast_paths and refusal_surface pass (m3-max-21238).
- macOS 27's AMD convolution kernels translate and pass spirv-val within 0.02 s and 10 MB, under the 26.x constants and under zeros (m3-max-21218).
- A census of macOS 27's 590 system functions that name addrspace(8): 115 translate, 124 are refused as Aggregate and 16 as Memory, and 0 hit TwoSpaces, Call or Integer.
This commit is contained in:
1 parent
4ae5db434f
commit
8557a75390
1 file changed
+1
-1
Vendored
+1
-1
@@ -60,7 +60,7 @@ mod tests;
|
||||
/// unchanged version, and its bless records the version. Independent of the crate's version and of
|
||||
/// [`ARTIFACT_FORMAT_VERSION`]. The commit that bumps it says what changed; this comment keeps no
|
||||
/// history.
|
||||
pub const SEMANTICS_VERSION: u32 = 2048;
|
||||
pub const SEMANTICS_VERSION: u32 = 2049;
|
||||
|
||||
/// The byte-layout version of encoded artifacts (`CompiledFunction::to_bytes` and the
|
||||
/// [`PipelineArtifact`] encodings). Every encoded artifact carries it, and a decode under another
|
||||
|
||||
Reference in new issue
Block a user