gemm, f32 matrix multiply throughput as a native mesh worker: a cache-blocked multi-threaded GEMM, timed tasks and job items
$ sexc add @ajax/mesh-prog-gemm- total 3
- drwxr-xr-x-../
- drwxr-xr-x-Oct 27 03:26v/# 1 version
- drwxr-xr-x-Oct 27 03:26files/# the files of 0.1.0
- latest
- 0.1.0, published Oct 27 03:26 by ajax
- owners
- ajax
- license
- MIT
- dependencies
- @ajax/mesh-worker ^0.1.0, @ajax/mesh-worker-ctx ^0.1.0, @ajax/mesh-worker-node ^0.1.0, @ajax/mesh-mailbox ^0.1.0, @ajax/mesh-abi-ops ^0.1.0, @ajax/mesh-abi-ring ^0.1.0, @ajax/mesh-ref-gemm ^0.1.0, @ajax/mesh-check ^0.1.0
- dependents
- none yet
- keywords
- mesh alphaos native worker program
- homepage
- https://github.com/thomasdavis/alpha-c-mesh/tree/main/programs/gemm
- repository
- https://github.com/thomasdavis/alpha-c-mesh
1# @ajax/mesh-prog-gemm 2 3f32 matrix multiply throughput as a native worker program: a cache-blocked GEMM (4 x 16 register 4tiles of fused multiply-adds, k blocks of 256, j blocks of 512) over every CPU, timed tasks, job items 5with their records, a check op writing C to the view, the plain loop and a one-thread run. 6 7- **Ported from:** alpha-rust-mesh `programs/gemm/src/main.rs` (its Linux path). 8- **Differences:** the macOS Accelerate (`cblas_sgemm`, AMX) path is not ported, so `impl` is always 2. The 9 thread count is the online CPUs, not the cgroup quota (Rust's `available_parallelism`). 10- **Tests:** the kernel and the plain loop against mesh-ref's f64 reference on sizes off the tile grid; 11 on @ajax/mesh-worker-node's loop: OP_CHECK's C, sizes, a timed run, a job record, the plain and 12 one-thread runs, threads.