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

+1
View File
@@ -860,6 +860,7 @@ int r4d_rmsnorm_bf16(long x, long w, long y, int M, int n, float eps, float wadd
int r4d_binary_bf16(long a, long b, long y, int M, int n, int op,
int a_ld, int b_ld, int y_ld, long stream);
int r4d_sigmoid_bf16(long x, long y, int M, int n, int x_ld, int y_ld, long stream);
int r4d_fill_bf16(long y, int M, int n, int y_ld, float value, long stream);
// y[.., i] = silu(gu[.., i]) * gu[.., n + i]. The GATE IS THE FIRST HALF -- the order rad-convert
// fuses gate_proj and up_proj in.
int r4d_silu_mul_bf16(long gu, long y, int M, int n, int gu_ld, int y_ld, long stream);