SEMANTICS_VERSION 2069: a 16-byte vector access is placed at its address unless its offset is proven a multiple of 16
The seven commits before this one. A 16-byte leaf whose AIR says align 16 was one uvec4 unit at off / 16 of its slot's view, and a memcpy whose call sites say align 16 moved such units; Metal places such an access at its address (a float4 cast from a float pointer 84 p bytes in is only 4-byte aligned), so the unit put it k floats low (Geekbench 302's softmax rows: 728,687 of 774,144 outputs wrong). Provenance's PtrFact gains an alignment lattice (the base-2 log of a power of two dividing every offset a pointer value may take; it only falls), MemoryPlan::proven_align combines it with the roots' bases (a buffer's bind offset is a multiple of its air.arg_type_align_size by Metal's bind contract), and Path::Vec4 and memcpy's 16-byte units need proven 16. Every other path is unchanged. Metal's placement measured on the M3 Max (probe vector_access_placement.m, m3-max-23317) and, for the device float4 row, the Radeon Pro 5300M; the table lives in memory/leaf.rs. Verified (on the branch): the device test tests/vector_placement.rs reproduces reims's guest rows before the fix (lavapipe 23503/23504, stale 0xEEEEEEEE where the guest read -1) and matches Metal after on lavapipe (23503, 23504), the 780M RADV (23531) and the XTX RADV (23376, stores); the interpreter test a_float4_aligned_only_to_its_lanes_is_placed_at_its_address (4 profiles x 2 encodings, residuals 0 and 4) fails on the base and passes (23373); translator suite 3503/3505 then the written-slot test fixed (engine_access, engine_copy, memory 167/167, 23431); 19 golden cells moved, all engine/kernel_read_through_constant.ll (a char buffer's float4 struct loads become 4 words), every other plain-.ll cell byte-identical; release translation of the plain-.ll golden batch x 19 profiles 1.85 s / 155 MiB base, 1.19 s / 167 MiB tip (one run each, msi 23461). Clippy workspace all features, m2v_gpu runtime, rustdoc clean. The golden table and the .air.ll cells are re-blessed on development.
This commit is contained in:
1 parent
8ad62e38a7
commit
aacde9f2ad
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 = 2068;
|
||||
pub const SEMANTICS_VERSION: u32 = 2069;
|
||||
|
||||
/// 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