Skip to main content

emit_tiled_dp4a

Function emit_tiled_dp4a 

Source
pub fn emit_tiled_dp4a(tile: &CudaTile) -> String
Expand description

Emit a shared-memory + register-blocked tiled DP4A GEMM kernel for tile. Each block stages a bm×bk slice of A and a bk×bn slice of B into shared memory (every byte reused across the block — the reuse the naive one-thread-per-output kernel throws away), and each thread accumulates a tm×tn register tile with __dp4a (4 signed-int8 MACs/instruction) over the K-stage. Computes C(M×N) = A(M×K)·B(K×N) in int8 with int32 accumulation. The blocking constexprs are baked from tile, so a different lattice point yields a different kernel — genuine compiler output, not a fixed template.