Skip to main content

Module metal_lane

Module metal_lane 

Source
Expand description

Shared-device and host-policy adapter for the canonical Metal lane.

Structs§

MetalPassLayerDims
Per-layer matmul dimensions (pre-computed by caller).
MetalPassLayerWeights
Per-layer weight references for the Metal mega-pass.

Enums§

MetalCapabilityState
Operational capability state for the Metal mega-pass lane.

Constants§

METAL_PREFETCH_STAGING_CAPACITY
Maximum capacity (64 MiB) for the reusable Metal prefetch staging buffer.
Q4_K_BLOCK_BYTES
Bytes per Q4_K block: 2-byte f16 scale + 2-byte f16 min + 16 nibble bytes.
Q8_0_BLOCK_BYTES
Bytes per Q8_0 block: 2-byte f16 scale + 32 i8 quants.
QUANT_BLOCK_ELEMS
Elements per quantized block (Q8_0 and Q4_K).

Functions§

clear_metal_kv_cache
execute_metal_mega_pass
metal_double_buffered_prefetch
metal_lane_capability
metal_lane_capability_state
metal_mega_pass_available
project_weight_bytes
try_metal_mega_pass
warm_metal_context