mirror of
https://github.com/MacosPorters/betterxen.git
synced 2026-11-26 20:50:44 +00:00
12 lines
3.4 KiB
Markdown
12 lines
3.4 KiB
Markdown
# Native Metal evidence
|
|
|
|
Apple's [Metal Feature Set Tables](https://developer.apple.com/metal/Metal-Feature-Set-Tables.pdf), dated October 23, 2026, list nonuniform threadgroups starting with Apple4, SIMD permutes starting with Apple6 and SIMD reductions starting with Apple7. The GPU families table maps the M1 series to Apple7. These are class B API capability claims (CLAIM-METAL-APPLE-FAMILIES). Xenora checks for Apple7 capabilities at device creation. Earlier native command submission interfaces allow the baseline to run on systems supporting those capabilities without requiring a Metal 4 queue.
|
|
|
|
Apple's [grid sizing guide](https://developer.apple.com/documentation/metal/calculating-threadgroup-and-grid-sizes) describes exact grid sizing through `dispatchThreads` and kernel-specific threadgroup limits. The backend checks the device and compiled pipeline limits before a single 1D dispatch and caps execution at 64 groups of up to 64 threads. The input and output each hold at most 16 KiB. Metal copies the initialized host data into shared storage for each binding. The first CPU readback occurs after command completion and a successful status check. The platform contracts are class B and apply to the native Apple GPU path (CLAIM-METAL-NATIVE-CONTRACTS). [Shared storage](https://developer.apple.com/documentation/metal/choosing-a-resource-storage-mode-for-apple-gpus), [buffer upload](https://developer.apple.com/documentation/metal/mtldevice/makebuffer(bytes:length:options:)), [command completion](https://developer.apple.com/documentation/metal/mtlcommandbuffer/waituntilcompleted()).
|
|
|
|
The locally supplied V1 Swift source, artifact `gpu-lab.2gOe22wp/lab.swift`, matched manifest SHA-256 `c9340fc84c080912f5d4919eb7f5adb6dd8b5e5e34146958b7c3f8fb16f81105`. Its compute helper checks the pipeline width, binds shared buffers, submits, waits and checks the command status. Review covered the relevant atomic, reduction, threadgroup, finite FP and offscreen cases. The laboratory's SIMD and numerical outputs have historical scope. The Rust fixtures are original. They use a new test pattern for offscreen rendering, a threadgroup-scoped counter and an integer SIMD reduction with 32 active lanes per group in the tested host configurations.
|
|
|
|
On 2026-11-22, `CARGO_BUILD_JOBS=2 scripts/test-gpu.sh` passed 12 native cases on the Apple M5 (class A, CLAIM-METAL-M5-NATIVE-SUITE). The runtime reported both API and shader validation enabled. The harness checks the shader validation state on each compiled pipeline and reads the CPU-observable result after completion. It checked 131 integer multiplication outputs including a partial final group and all 48 RGBA8 pixels in an offscreen draw. The FP case uses exactly representable finite inputs and expected results and requires bit equality. The render case uses original vertex and fragment MSL and a fixed shared texture. [Metal API validation](https://developer.apple.com/documentation/xcode/validating-your-apps-metal-api-usage), [Metal shader validation](https://developer.apple.com/documentation/xcode/validating-your-apps-metal-shader-usage), [load and store actions](https://developer.apple.com/documentation/metal/setting-load-and-store-actions).
|
|
|
|
Sources are official Apple references retrieved 2026-11-22 and cited for API semantics. No Apple source code is reproduced. See [host lab intake](host-lab.md) for historical results and outstanding numerical probes.
|