Module Sarek_gemm.Host

Host-side launch configuration for sgemm_tiled_kernel. Kept element-type- agnostic so an f64/df64 or L15b mma kernel reuses it by construction.

val tile : int

Tile edge. MUST equal the kernel's shared extent (tile*tile) and tile_size literal; 16 -> 256 threads/block, 2 KiB shared.

Block dimensions: one thread per output element of a tile.

val grid : m:int -> n:int -> Spoc_framework.Framework_sig.dims

Grid dimensions covering an MxN output (ceil-div, so partial edge blocks are launched and masked by the kernel's boundary guards).

val shared_mem_bytes : int

Shared-memory footprint of the kernel's two float32 tiles, for occupancy estimation only. The kernel declares its tiles with let%shared (STATIC shared memory), so launches do NOT need to pass ~shared_mem - passing it merely reserves the same bytes again as an unused dynamic region (audit finding L5).