b12543
The update introduces a new tensor API conv_2d kernel for Metal, enabling split-K optimizations across all chips, including M5. It improves efficiency by utilizing tensor cores, reducing idle GPU time during long reductions. The kernel now splits reductions into partial sums stored in buffers, with a follow-up kernel summing them deterministically. Address math is optimized using 32-bit byte offsets, reducing computational overhead. A fallback to the generic kernel is implemented for images exceeding 4 GiB. Performance benchmarks show significant speed improvements on M5 Max devices, with reduced execution times across various convolution configurations.


