Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ Each release's page on GitHub has its notes and measurements. See [the 1.0.0 rel

## Unreleased

- GLM-5.3-Flash on Metal: routed experts stored in the official FP8 checkpoint's format (E4M3 codes, 128 x 128 f32 block scales) load as stored, and a combined checkpoint can point at whole FP8 shards, since a shard's tensors are read only where the index maps them. On an M5 Ultra, FP8 experts beside the 8-bit backbone decode prose at 60.8 tok/s against 55.7 with MLX 8-bit experts, with the same per-token loss (#3682).

- Qwen3.8-27B on Metal before M5: a drafted window's rows run the decode attention in pairs over the keys below the window, so at a 32K prompt on an M3 Ultra drafted decode is 24% faster at one stream and 29% at eight with every reply unchanged; `TF_QWEN27_JOIN=0` keeps the unpaired pipelines (#3661).

- App: opening an Approvals task whose conversation is archived, deleted or not loaded yet shows a clear "Conversation unavailable" view instead of a blank Thread window (#3393, fixes #3387). Thanks to @sx4im.
Expand Down
105 changes: 79 additions & 26 deletions zig/kernels/metal/glm_rows.metal
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,56 @@ inline void glm_rows_pass(const device uint8_t* w, const device bfloat* s, const
for (int j = 0; j < cols; j++) o0[size_t(m + r) * d.ldo + j] = bfloat(acc[r][j]);
}

// Two E4M3 codes of a word (bytes 0 and 2) as a half2 of value / 256, exact: the magnitude bits as a half's, the sign.
inline half2 glm_f8_h2(uint word) { return as_type<half2>(((word & 0x007F007Fu) << 7) | ((word & 0x00800080u) << 8)); }

// RPS rows of E4M3 codes at w (K a row) with sc their 128-row block's f32 scales: tf_rp_rows_at's lanes and sums.
template <int RPS>
inline void glm_f8_rows(const device uint8_t* w, const device float* sc, const device bfloat* x, int K, uint lane,
thread float (*acc)[RPS]) {
const int FULL = K / 512 * 512;
w += lane * 16;
sc += lane / 8;
const int xl = int(lane) * 16;
for (int j = 0; j < RPS; j++) acc[0][j] = 0.0f;
for (int k0 = 0; k0 <= FULL; k0 += 512) {
if (k0 == FULL && !(FULL < K && int(lane) < (K - FULL) / 16)) break;
float xt[16];
for (int i = 0; i < 16; i++) xt[i] = float(x[xl + k0 + i]);
const float s = sc[0] * 256.0f;
for (int j = 0; j < RPS; j++) {
const uint4 raw = *(const device uint4*)(w + j * K);
float q[16];
for (int i = 0; i < 4; i++) {
const half2 a = glm_f8_h2(raw[i]), b = glm_f8_h2(raw[i] >> 8);
q[4 * i] = float(a.x); q[4 * i + 1] = float(b.x); q[4 * i + 2] = float(a.y); q[4 * i + 3] = float(b.y);
}
float accum = 0.0f;
for (int i = 0; i < 4; i++)
accum += (xt[4 * i] * q[4 * i] + xt[4 * i + 1] * q[4 * i + 1] + xt[4 * i + 2] * q[4 * i + 2] +
xt[4 * i + 3] * q[4 * i + 3]);
acc[0][j] += s * accum;
}
w += 512;
sc += 4;
}
for (int j = 0; j < RPS; j++) acc[0][j] = simd_sum(acc[0][j]);
}

// Expert e's rows [row0, row0 + RPS) of a stack [experts, n, K]: affine (S, B bf16 at `group`), or F8 (S f32 blocks).
template <int RPS, int BITS, bool F8>
inline void glm_expert_rows(const device uint32_t* W, const device bfloat* S, const device bfloat* B, int e, int n,
int row0, const device bfloat* x, int K, int group, uint lane, thread float (*acc)[RPS]) {
const size_t at = size_t(e) * n + row0;
if (F8) {
const device float* sc = (const device float*)S + (size_t(e) * (n / 128) + row0 / 128) * (K / 128);
glm_f8_rows<RPS>((const device uint8_t*)W + at * K, sc, x, K, lane, acc);
} else {
const size_t kb = size_t(K) * BITS / 8, kg = size_t(K / group);
tf_rp_rows<RPS, 1, BITS, false>((const device uint8_t*)W + at * kb, S + at * kg, B + at * kg, x, K, group, lane, acc);
}
}

// The three-row passes before a window's pairs and last row: four rows take two pairs, not a three and a one.
inline int glm_threes(int rows) { return rows / 3 - (rows % 3 == 1 && rows > 3 ? 1 : 0); }

Expand Down Expand Up @@ -71,7 +121,7 @@ template <int BITS, bool WIDE>
}

// Slot y through expert ids[y] on x row y / repeat (GLU: gate W and up W2, SwiGLU'd); grid (n / 8, slots).
template <int BITS, bool GLU>
template <int BITS, bool GLU, bool F8 = false>
[[kernel]] void glm_rows_ids(const device bfloat* X [[buffer(0)]], const device uint32_t* W [[buffer(1)]],
const device bfloat* S [[buffer(2)]], const device bfloat* B [[buffer(3)]],
constant GlmPickDims& d [[buffer(4)]], device bfloat* OUT [[buffer(5)]],
Expand All @@ -89,23 +139,21 @@ template <int BITS, bool GLU>
if (int(lane) < cols) out[lane] = bfloat(0.0f);
return;
}
const size_t at = size_t(expert) * d.n + row0;
const size_t kb = size_t(d.k) * BITS / 8, kg = size_t(d.k / d.group);
const device bfloat* x = X + size_t(slot / d.repeat) * d.k;
float acc[1][4];
tf_rp_rows<4, 1, BITS, false>((const device uint8_t*)W + at * kb, S + at * kg, B + at * kg, x, d.k, d.group, lane, acc);
glm_expert_rows<4, BITS, F8>(W, S, B, expert, d.n, row0, x, d.k, d.group, lane, acc);
if (GLU) {
float up[1][4];
tf_rp_rows<4, 1, BITS, false>((const device uint8_t*)W2 + at * kb, S2 + at * kg, B2 + at * kg, x, d.k, d.group, lane, up);
glm_expert_rows<4, BITS, F8>(W2, S2, B2, expert, d.n, row0, x, d.k, d.group, lane, up);
if (lane == 0)
for (int j = 0; j < cols; j++) out[j] = glm_rows_glu(acc[0][j], up[0][j], d.lim);
} else if (lane == 0) {
for (int j = 0; j < cols; j++) out[j] = bfloat(acc[0][j]);
}
}

// Slots as glm_rows_ids (BITS), then X2's rows through the shared expert (SBITS; GLU: gate then up rows) into OUT2.
template <int BITS, int SBITS, bool GLU, int RPS = 4, int KC = 0> // RPS columns a simdgroup; KC: k compiled in
// Slots as glm_rows_ids (BITS, or F8), then X2's rows through the shared expert (SBITS; GLU: gate then up) into OUT2.
template <int BITS, int SBITS, bool GLU, int RPS = 4, int KC = 0, bool F8 = false> // RPS columns a simdgroup; KC: k
[[kernel]] void glm_moe_rows(const device bfloat* X [[buffer(0)]], const device uint32_t* W [[buffer(1)]],
const device bfloat* S [[buffer(2)]], const device bfloat* B [[buffer(3)]],
constant GlmPickDims& d [[buffer(4)]], device bfloat* OUT [[buffer(5)]],
Expand Down Expand Up @@ -133,16 +181,12 @@ template <int BITS, int SBITS, bool GLU, int RPS = 4, int KC = 0> // RPS columns
if (int(lane) < cols) out[lane] = bfloat(0.0f);
return;
}
const size_t at = size_t(expert) * d.n + row0;
const size_t kb = size_t(K) * BITS / 8;
x = X + size_t(y / d.repeat) * K;
float acc[1][RPS];
tf_rp_rows<RPS, 1, BITS, false>((const device uint8_t*)W + at * kb, S + at * kg, B + at * kg, x, K, d.group, lane,
acc);
glm_expert_rows<RPS, BITS, F8>(W, S, B, expert, d.n, row0, x, K, d.group, lane, acc);
if (GLU) {
float up[1][RPS];
tf_rp_rows<RPS, 1, BITS, false>((const device uint8_t*)W2 + at * kb, S2 + at * kg, B2 + at * kg, x, K, d.group,
lane, up);
glm_expert_rows<RPS, BITS, F8>(W2, S2, B2, expert, d.n, row0, x, K, d.group, lane, up);
if (lane == 0)
for (int j = 0; j < cols; j++) out[j] = glm_rows_glu(acc[0][j], up[0][j], d.lim);
} else if (lane == 0) {
Expand Down Expand Up @@ -172,7 +216,7 @@ template <int BITS, int SBITS, bool GLU, int RPS = 4, int KC = 0> // RPS columns

// glm_moe_rows by unique expert (uids, umem, ucount): a simdgroup a pick, z = slots the shared; glm_moe_rows's sums.
#define GLM_MAXR 16
template <int BITS, int SBITS, bool GLU, int RPS = 4>
template <int BITS, int SBITS, bool GLU, int RPS = 4, bool F8 = false>
[[max_total_threads_per_threadgroup(32 * GLM_MAXR)]]
[[kernel]] void glm_moe_rows_u(const device bfloat* X [[buffer(0)]], const device uint32_t* W [[buffer(1)]],
const device bfloat* S [[buffer(2)]], const device bfloat* B [[buffer(3)]],
Expand All @@ -197,16 +241,12 @@ template <int BITS, int SBITS, bool GLU, int RPS = 4>
const int pick = umem[z * GLM_MAXR + m];
if (pick < 0) return;
device bfloat* out = OUT + size_t(pick) * d.ldo + row0;
const size_t at = size_t(uids[z]) * d.n + row0;
const size_t kb = size_t(K) * BITS / 8;
const device bfloat* x = X + size_t(pick / d.repeat) * K;
float acc[1][RPS];
tf_rp_rows<RPS, 1, BITS, false>((const device uint8_t*)W + at * kb, S + at * kg, B + at * kg, x, K, d.group, lane,
acc);
glm_expert_rows<RPS, BITS, F8>(W, S, B, uids[z], d.n, row0, x, K, d.group, lane, acc);
if (GLU) {
float up[1][RPS];
tf_rp_rows<RPS, 1, BITS, false>((const device uint8_t*)W2 + at * kb, S2 + at * kg, B2 + at * kg, x, K, d.group,
lane, up);
glm_expert_rows<RPS, BITS, F8>(W2, S2, B2, uids[z], d.n, row0, x, K, d.group, lane, up);
if (lane == 0)
for (int j = 0; j < cols; j++) out[j] = glm_rows_glu(acc[0][j], up[0][j], d.lim);
} else if (lane == 0) {
Expand Down Expand Up @@ -236,7 +276,7 @@ template <int BITS, int SBITS, bool GLU, int RPS = 4>
}

// Expert e's sorted pairs: GLU x row order[i] / repeat to out row i, else x row i to row order[i]; grid (n / 8, e).
template <int BITS, bool GLU>
template <int BITS, bool GLU, bool F8 = false>
[[kernel]] void glm_rows_sorted(const device bfloat* X [[buffer(0)]], const device uint32_t* W [[buffer(1)]],
const device bfloat* S [[buffer(2)]], const device bfloat* B [[buffer(3)]],
constant GlmPickDims& d [[buffer(4)]], device bfloat* OUT [[buffer(5)]],
Expand All @@ -249,20 +289,17 @@ template <int BITS, bool GLU>
if (row0 >= d.n) return;
const int e = int(tg.y);
const int lo = offsets[e], hi = e + 1 < d.experts ? offsets[e + 1] : d.slots;
const size_t at = size_t(e) * d.n + row0;
const size_t kb = size_t(d.k) * BITS / 8, kg = size_t(d.k / d.group);
const device uint8_t* w = (const device uint8_t*)W + at * kb;
const int cols = metal::min(4, d.n - row0);
#pragma clang loop unroll(disable)
for (int i = lo; i < hi; i++) {
const int src = GLU ? order[i] / d.repeat : i;
const int dst = GLU ? i : order[i];
float acc[1][4];
tf_rp_rows<4, 1, BITS, false>(w, S + at * kg, B + at * kg, X + size_t(src) * d.k, d.k, d.group, lane, acc);
glm_expert_rows<4, BITS, F8>(W, S, B, e, d.n, row0, X + size_t(src) * d.k, d.k, d.group, lane, acc);
device bfloat* out = OUT + size_t(dst) * d.ldo + row0;
if (GLU) {
float up[1][4];
tf_rp_rows<4, 1, BITS, false>((const device uint8_t*)W2 + at * kb, S2 + at * kg, B2 + at * kg, X + size_t(src) * d.k, d.k, d.group, lane, up);
glm_expert_rows<4, BITS, F8>(W2, S2, B2, e, d.n, row0, X + size_t(src) * d.k, d.k, d.group, lane, up);
if (lane == 0)
for (int j = 0; j < cols; j++) out[j] = glm_rows_glu(acc[0][j], up[0][j], d.lim);
} else if (lane == 0) {
Expand Down Expand Up @@ -402,3 +439,19 @@ GLM_MOE_AT(4)
GLM_MOE_AT(5)
GLM_MOE_AT(6)
GLM_MOE_AT(8)

// The FP8 checkpoint's routed experts (E4M3, 128 x 128 f32 scales) beside the 8-bit shared expert.
template [[host_name("glm_rows_ids_f8")]] [[kernel]] decltype(glm_rows_ids<8, false, true>) glm_rows_ids<8, false, true>;
template [[host_name("glm_rows_glu_ids_f8")]] [[kernel]] decltype(glm_rows_ids<8, true, true>) glm_rows_ids<8, true, true>;
template [[host_name("glm_rows_sorted_f8")]] [[kernel]]
decltype(glm_rows_sorted<8, false, true>) glm_rows_sorted<8, false, true>;
template [[host_name("glm_rows_glu_sorted_f8")]] [[kernel]]
decltype(glm_rows_sorted<8, true, true>) glm_rows_sorted<8, true, true>;
template [[host_name("glm_moe_rows_f8_s8")]] [[kernel]]
decltype(glm_moe_rows<8, 8, false, 4, 0, true>) glm_moe_rows<8, 8, false, 4, 0, true>;
template [[host_name("glm_moe_rows_glu_f8_s8")]] [[kernel]]
decltype(glm_moe_rows<8, 8, true, 4, 0, true>) glm_moe_rows<8, 8, true, 4, 0, true>;
template [[host_name("glm_moe_rows_u_f8_s8")]] [[kernel]]
decltype(glm_moe_rows_u<8, 8, false, 4, true>) glm_moe_rows_u<8, 8, false, 4, true>;
template [[host_name("glm_moe_rows_glu_u_f8_s8")]] [[kernel]]
decltype(glm_moe_rows_u<8, 8, true, 4, true>) glm_moe_rows_u<8, 8, true, 4, true>;
2 changes: 2 additions & 0 deletions zig/src/core/contract/glm_rows_records.zig
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ pub const records = [_]M{
.{ .name = "glm moe rows glu u q6 glm_moe_rows_glu_u_q6_s8", .threads = 512, .tg_memory = 0, .reserved = 512 },
.{ .name = "glm moe rows u q8 glm_moe_rows_u_q8_s8", .threads = 512, .tg_memory = 0, .reserved = 512 },
.{ .name = "glm moe rows glu u q8 glm_moe_rows_glu_u_q8_s8", .threads = 512, .tg_memory = 0, .reserved = 512 },
.{ .name = "glm moe rows u f8 glm_moe_rows_u_f8_s8", .threads = 512, .tg_memory = 0, .reserved = 512 },
.{ .name = "glm moe rows glu u f8 glm_moe_rows_glu_u_f8_s8", .threads = 512, .tg_memory = 0, .reserved = 512 },
};

test "the GLM row launches fit every Apple family" {
Expand Down
23 changes: 22 additions & 1 deletion zig/src/families/glm/affine.zig
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ pub const max_runs = 6;
/// A run of a split stack: one member (0.6.6 calls each apart), rows [row, row + n) of the fused output, bytes its own.
pub const Run = struct { w: Ref, s: Ref, b: Ref, row: u32, n: u32, bits: u8, group: u16 };

/// An MLX affine matrix: w [n, k bits / 32] u32, s and b [n, k / group] bf16 (stacked: [e, n, ...]).
/// An MLX affine matrix: w [n, k bits / 32] u32, s and b [n, k / group] bf16 (stacked: [e, n, ...]); or `fp8`.
pub const Affine = struct {
w: Ref,
s: Ref,
Expand All @@ -35,6 +35,7 @@ pub const Affine = struct {
group: u16,
more: u8 = 0, // runs past the first, whose bytes and width are the matrix's own: 0 for one width
runs: [max_runs - 1]Run = undefined,
fp8: bool = false, // the FP8 checkpoint's E4M3 codes [n, k], s its f32 scales [n / 128, k / 128], no b

pub fn width(q: Affine) Width {
return .{ .bits = q.bits, .group = q.group };
Expand Down Expand Up @@ -62,6 +63,20 @@ pub fn bytes(n: usize, k: usize, w: Width) usize {
return wBytes(n, k, w) + 2 * sBytes(n, k, w);
}

/// The FP8 checkpoint's square scale blocks: a scale for each 128 rows by 128 columns.
pub const fp8_block = 128;

/// Bytes of an FP8 [n, k]'s f32 scales, [n / 128, k / 128]; null unless n and k are whole blocks.
pub fn fp8Scales(n: usize, k: usize) ?usize {
if (n == 0 or k == 0 or n % fp8_block != 0 or k % fp8_block != 0) return null;
return (n / fp8_block) * (k / fp8_block) * 4;
}

/// Bytes of an FP8 [n, k]: a byte a code, then its scales.
pub fn fp8Bytes(n: usize, k: usize) usize {
return n * k + (fp8Scales(n, k) orelse 0);
}

/// [n, k]'s stored shapes at `w`: u32 words [n, k bits / 32], bf16 tables [n, k / group]; null when k does not pack.
pub fn shapes(n: usize, k: usize, w: Width) ?[2][2]usize {
if (k == 0 or k % w.group != 0 or k * w.bits % 32 != 0) return null;
Expand All @@ -77,10 +92,15 @@ pub fn cut(lo: usize, k: usize, w: Width) ?[2][2]usize {
/// Matrices (each run of a split stack) by width, for a plan's summary.
pub const Tally = struct {
count: [9][3]u32 = @splat(@splat(0)), // by bits, then group 32, 64, 128
fp8: u32 = 0,

pub fn add(t: *Tally, v: anytype) void {
const T = @TypeOf(v);
if (T == Affine) {
if (v.fp8) {
t.fp8 += 1;
return;
}
for (0..@as(usize, v.more) + 1) |i| {
const r = v.run(i);
if (r.n > 0 and r.bits > 0) t.count[r.bits][std.math.log2_int(u16, r.group) - 5] += 1;
Expand All @@ -105,6 +125,7 @@ pub const Tally = struct {
const sep = if (n == 0) "" else ", ";
n += (std.fmt.bufPrint(buf[n..], "{s}{d}-bit/{d} x{d}", .{ sep, bits, @as(u32, 32) << @intCast(gi), x }) catch return buf[0..n]).len;
};
if (t.fp8 > 0) n += (std.fmt.bufPrint(buf[n..], "{s}FP8 E4M3/128x128 x{d}", .{ if (n == 0) "" else ", ", t.fp8 }) catch return buf[0..n]).len;
return buf[0..n];
}
};
Expand Down
52 changes: 52 additions & 0 deletions zig/src/families/glm/fp8.zig
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
//! The FP8 checkpoint's routed experts as stored (E4M3 codes, f32 128 x 128 block scales): loading and kernels.
const std = @import("std");
const affine = @import("affine.zig");
const quant = @import("quant.zig");
const prefix = @import("weights.zig").prefix;

/// glm_rows.metal's FP8 routed-expert kernels, in `names` order.
pub const Kernel = enum { moe, moe_glu, moe_u, moe_glu_u, sorted, glu_sorted, ids, glu_ids };
pub const names = [_][:0]const u8{
"glm_moe_rows_f8_s8", "glm_moe_rows_glu_f8_s8", "glm_moe_rows_u_f8_s8", "glm_moe_rows_glu_u_f8_s8",
"glm_rows_sorted_f8", "glm_rows_glu_sorted_f8", "glm_rows_ids_f8", "glm_rows_glu_ids_f8",
};

/// Whether layer i's expert e's `proj` is stored as the FP8 checkpoint's codes and block scales.
pub fn isExpert(l: anytype, i: usize, e: usize, proj: []const u8) bool {
return l.has(prefix ++ "layers.{d}.mlp.experts.{d}.{s}.weight_scale_inv", .{ i, e, proj });
}

/// Experts [lo, lo + e) of layer i's `proj` [n, k]: codes stacked [e, n, k], then scales [e, n / 128, k / 128].
pub fn experts(l: anytype, i: usize, proj: []const u8, n: usize, k: usize, whole: bool, lo: usize, e: usize) !affine.Affine {
var first: [200]u8 = undefined;
const name0 = try std.fmt.bufPrint(&first, prefix ++ "layers.{d}.mlp.experts.{d}.{s}", .{ i, lo, proj });
if (!whole) {
quant.say("glm: {s} is FP8, which loads whole on one Mac", .{name0});
return error.UnsupportedWidth;
}
const sb = affine.fp8Scales(n, k) orelse {
quant.say("glm: {s} is [{d}, {d}], not whole 128 x 128 scale blocks", .{ name0, n, k });
return error.UnexpectedTensor;
};
const w = l.take(e * n * k);
const out: affine.Affine = .{ .w = w, .s = l.take(e * sb), .b = l.take(0), .n = @intCast(n), .k = @intCast(k), .bits = 8, .group = affine.fp8_block, .fp8 = true };
for (0..e) |x| {
var buf: [200]u8 = undefined;
const module = try std.fmt.bufPrint(&buf, prefix ++ "layers.{d}.mlp.experts.{d}.{s}", .{ i, lo + x, proj });
if (!isExpert(l, i, lo + x, proj)) {
quant.say("glm: {s} is FP8 and {s} is not; one stack holds both", .{ name0, module });
return error.MixedWidths;
}
var a: [240]u8 = undefined;
var b: [240]u8 = undefined;
const wn = try std.fmt.bufPrint(&a, "{s}.weight", .{module});
const sn = try std.fmt.bufPrint(&b, "{s}.weight_scale_inv", .{module});
const ws = l.names.get(wn) orelse return error.MissingTensor;
const ss = l.names.get(sn).?;
try @TypeOf(l.*).expect(ws, wn, .f8_e4m3, &.{ n, k });
try @TypeOf(l.*).expect(ss, sn, .f32, &.{ n / affine.fp8_block, k / affine.fp8_block });
try l.copyTo(ws, out.w.at(x * n * k));
try l.copyTo(ss, out.s.at(x * sb));
}
return out;
}
8 changes: 7 additions & 1 deletion zig/src/families/glm/load_plan.zig
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,16 @@ pub fn expertBytes(l: anytype, i: usize) !usize {
const every = i == c.layers;
const m: usize = if (every) c.moe_inter else c.inter[1] - c.inter[0];
const lo: usize = if (every) 0 else c.own[0];
const per = affine.bytes(m, D, try l.widths.expert(i, lo, "gate_proj")) + affine.bytes(m, D, try l.widths.expert(i, lo, "up_proj")) + affine.bytes(D, m, try l.widths.expert(i, lo, "down_proj"));
const per = try projBytes(l, i, lo, "gate_proj", m, D) + try projBytes(l, i, lo, "up_proj", m, D) + try projBytes(l, i, lo, "down_proj", D, m);
return (if (every) c.experts else c.own[1] - c.own[0]) * per + 9 * 256;
}

/// An expert's `proj` [n, k]: the FP8 checkpoint's codes and scales, else its affine width's.
fn projBytes(l: anytype, i: usize, e: usize, proj: []const u8, n: usize, k: usize) !usize {
if (@import("fp8.zig").isExpert(l, i, e, proj)) return affine.fp8Bytes(n, k);
return affine.bytes(n, k, try l.widths.expert(i, e, proj));
}

/// A stack's bytes: its rows, padded to `pad` a run (a part each once widths differ), at the costliest bytes a row.
fn stackBytes(l: anytype, comptime fmt: []const u8, args: anytype, parts: []const []const u8, rows: usize, k: usize, pad: usize) !usize {
var name: [200]u8 = undefined;
Expand Down
Loading
Loading