#[repr(C)]pub struct GemmArgs {
pub a: u64,
pub b: u64,
pub c: u64,
pub n_shires: u64,
pub m: u32,
pub n: u32,
pub k: u32,
pub lda: u32,
pub ldb: u32,
pub ldc: u32,
pub alpha: f32,
pub beta: f32,
}Expand description
Arguments for the single-precision general matrix multiplication (sGEMM)
kernel (sgemm-rs), implementing C = alphaAB + beta*C.
§Layout invariants (v0.1 restrictions)
alphamust be1.0andbetamust be0.0.nmay be any positive integer; partial last-column tiles are handled transparently via 64-byte-aligned row padding.a,b,cmust beTENSOR_ALIGN-byte aligned device addresses.lda,ldb,ldcmust be multiples ofTENSOR_ALIGN(64 bytes).
All dimensions are in elements; leading dimensions are in bytes.
§ABI layout
The four 8-byte fields (a, b, c, n_shires) are grouped first to
give the struct 8-byte alignment with no internal or trailing padding:
4*8 + 8*4 = 64 bytes total.
Fields§
§a: u64Device address of A [M x K], row-major, 64-byte aligned.
b: u64Device address of B [K x N], row-major, 64-byte aligned.
c: u64Device address of C [M x N], row-major, 64-byte aligned.
n_shires: u64Number of participating compute shires. Stored as u64 to keep
all 8-byte fields contiguous and the total struct size a multiple
of the struct’s 8-byte alignment. Effective range: 1..=34.
m: u32Number of rows of A and C (M dimension).
n: u32Number of columns of B and C (N dimension). May be any positive integer; the last output tile column is partial when N is not a multiple of 16.
k: u32Shared inner dimension (K): columns of A and rows of B.
lda: u32Row stride of A in bytes (multiple of 64).
ldb: u32Row stride of B in bytes (multiple of 64).
ldc: u32Row stride of C in bytes (multiple of 64).
alpha: f32A*B scaling factor. Must be 1.0 in v0.1.
beta: f32C scaling factor. Must be 0.0 in v0.1.