libr4d: a fill op

y = value over an [M, n] extent at a row pitch, bf16, default 0. The op a rank
issues where it has nothing to compute and a reader downstream -- an all-reduce,
a residual -- still expects a defined buffer: a wire shared across layers cannot
be zeroed once a step, and a memset knows neither the pitch nor the dtype.
Smoke-tested for the exact zero, the pitch, and the RNE of a value.
This commit is contained in:
baKon authored and StillDeadcode committed 2026-10-06 11:23:06 +02:00
1 parent fd54038b8c
commit cd48c61daf
6 files changed
+115

No files matched your search

+2
View File
@@ -396,6 +396,7 @@ int r4d_rad_rmsnorm (const RadArgs*, RadStream);
int r4d_rad_add (const RadArgs*, RadStream);
int r4d_rad_mul (const RadArgs*, RadStream);
int r4d_rad_sigmoid (const RadArgs*, RadStream);
int r4d_rad_fill (const RadArgs*, RadStream);
int r4d_rad_silu_mul (const RadArgs*, RadStream);
int r4d_rad_rope (const RadArgs*, RadStream);
/* -- the vision tower's ops (r4d_vit_bf16.hip) -- */
@@ -456,6 +457,7 @@ int r4d_shape_layernorm (const RadParam*, int, int operand, RadOpdDesc*);
int r4d_shape_grid_embed (const RadParam*, int, int operand, RadOpdDesc*);
int r4d_shape_gemm_nt_bias (const RadParam*, int, int operand, RadOpdDesc*);
int r4d_shape_unary (const RadParam*, int, int operand, RadOpdDesc*);
int r4d_shape_fill (const RadParam*, int, int operand, RadOpdDesc*);
int r4d_shape_silu_mul (const RadParam*, int, int operand, RadOpdDesc*);
int r4d_shape_rope (const RadParam*, int, int operand, RadOpdDesc*);
int r4d_shape_kv_store (const RadParam*, int, int operand, RadOpdDesc*);