Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
cfeca4f
cuda: reconcile the BF16 prompt port with the landed tile
ashhart Nov 3, 2026
3e728c9
cuda: use the BF16 prompt tile for Dory projections
ashhart Nov 3, 2026
4129b7a
cuda: normalize Qwen prompt rows on the GDN chain warps
ashhart Nov 2, 2026
0769258
cuda: schedule Qwen router expert blocks first
ashhart Nov 2, 2026
369c01a
cuda: retain BF16 prompt contract callbacks beyond registration
akol1 Nov 3, 2026
65dd208
contract: record Qwen prompt glue launches for nvcc 13.0
ashhart Nov 4, 2026
473fa7a
contract: the glue receipts' test line moves out of the full registry…
ashhart Nov 5, 2026
427516b
tests: the GDN chain launch has records now; the numbers are pinned b…
ashhart Nov 5, 2026
2a52076
cuda: isolate Qwen prompt glue in ModelOpt-only images
ashhart Nov 11, 2026
40dacfc
contract: record the ModelOpt prompt glue launches' GB10 resources
ashhart Nov 12, 2026
af74c5d
cuda contract: record nvcc 13.0's launch limits for the BF16 prompt t…
ashhart Nov 12, 2026
fb362ad
tests: re-pin the four CUDA serving sources #2008 changes, on today's…
ashhart Nov 13, 2026
ac42c1c
tests: the BF16 prompt mocks set main's lean_swiglu, on today's main
ashhart Nov 18, 2026
cc5568a
tests: refresh serving pins for the BF16 prompt rebase
ashhart Nov 21, 2026
4ef8dc2
adapt CUDA prompt port tests to current main
ashhart Nov 28, 2026
90a39aa
contract: remove restored historical registry imports
ashhart Nov 28, 2026
6672e2f
rebase CUDA prompt port onto current main
ashhart Nov 28, 2026
d77091d
cuda: keep MLX prompts on their original paths
ashhart Nov 29, 2026
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
6 changes: 6 additions & 0 deletions docs/recipes/cuda.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,12 @@ format ([prompt precision](#prompt-precision)):

## Native prompt controls

Qwen dense/MoE, Nemotron ModelOpt and Dory BF16 projections use the shared BF16 prompt tile from 1,024 rows.
`TF_CUDA_PROMPT_BF16=0` restores their lane projections; unset or 1 selects the tile; malformed values are refused by name.
The threshold is fixed. The prompt module always binds its required BF16 symbols, including with the switch off.
Flash Next keeps its own prompt selection and controls.
Qwen ModelOpt alone loads the fused GDN norm and expert-first router; MLX keeps the standard images and launches.

For Nemotron, the native `tensorfold run` command on a CUDA build accepts `--device N` to choose a CUDA ordinal. If
the flag is absent, it uses `TF_CUDA_DEVICE`, then device 0. `--segments N` enables
staggered prompt work for 1 through 4 whole 2,048-row chunks; without the flag it
Expand Down
2 changes: 2 additions & 0 deletions zig/build/cuda.zig
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,8 @@ pub fn hostTests(b: *std.Build, draft_ids: *std.Build.Module, build_options: *st
const many_stress = b.createModule(.{ .root_source_file = b.path("zig/tests/cuda/contract_qmmf_many.zig"), .target = host, .optimize = .debug, .link_libc = true, .imports = &.{ .{ .name = "cuda", .module = cuda }, .{ .name = "core", .module = mods.core } } });
const many_stress_run = b.addRunArtifact(b.addTest(.{ .root_module = many_stress, .filters = &.{"qmmf many stress:"} }));
many.step.dependOn(&many_stress_run.step);
inline for (.{ @import("prompt_bf16_host.zig"), @import("gdn_chain_host.zig"), @import("moe_router_host.zig") }) |suite|
suite.tests(b, step, cuda, runtime(b, host, .fast, &.{}), mods.core);
@import("cuda_checkpoint_cache_host.zig").steps(b, step);
b.step("test-lfm2-load-host", "LFM2 decision model metadata and load ownership without a GPU").dependOn(&b.addRunArtifact(b.addTest(.{ .root_module = lfm2Module(b, host, .debug, cuda, mods.core) })).step);
engines_build.qwen3HostTest(b, engines_build.qwen3Module(b, host, .debug, cuda, mods.core, mods.lanes, mods.api), step);
Expand Down
3 changes: 3 additions & 0 deletions zig/build/cuda_family_host.zig
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
const std = @import("std");

pub fn steps(b: *std.Build, cuda: *std.Build.Module, mods: anytype, step: *std.Build.Step) void {
const mlx_prompt = b.addRunArtifact(b.addTest(.{ .root_module = mods.qwen35, .filters = &.{"MLX prompt isolation:"} }));
b.step("test-qwen35-mlx-prompt-host", "MLX recurrence/router launch equality and ModelOpt-only prompt glue").dependOn(&mlx_prompt.step);
step.dependOn(&mlx_prompt.step);
const host = b.graph.host;
@import("prefill_ledger_host.zig").steps(b, cuda, mods.qwen35, step);
const sm110 = b.addRunArtifact(b.addTest(.{ .root_module = mods.qwen35, .filters = &.{"SM110"} }));
Expand Down
2 changes: 2 additions & 0 deletions zig/build/cuda_kernels.zig
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@ pub const kernels = [_]Kernel{
.{ .name = "qwen35_keep", .flags = &.{"-O3"} }, // ours: a verified window's kept path applied to its stream's state
.{ .name = "qwen_vision", .flags = &.{ "-O3", "--fmad=false" } }, // ours: the Qwen3.5 vision tower's glue and attention
.{ .name = "gdn_prefill", .flags = &.{ "-O3", "--fmad=false" } }, // ours: a prompt chunk's gated delta rule (v0.6.6's chain)
.{ .name = "qwen_gdn_bf16", .flags = &.{ "-O3", "--fmad=false" } },
.{ .name = "qwen_router_bf16", .flags = &.{"-O3"} },
.{ .name = "qwen35_kv8", .flags = &.{"-O3"} }, // ours: --kv-cache fp8's e4m3 attention rows for the Qwen3.5 hybrids
.{ .name = "qwen35_bf16_rows", .flags = &.{"-O3"} }, // ours: bf16 token rows and small bf16 dense projections (qwen3_5/cuda_bf16_rows.zig)
.{ .name = "joint_schema", .flags = glue }, // HIP's joint_schema.hip ported: Clef's joint schema head (cuda/joint_schema/)
Expand Down
20 changes: 20 additions & 0 deletions zig/build/gdn_chain_host.zig
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
//! Focused prompt recurrence dispatch and contract checks without loading an image.
const std = @import("std");
pub fn tests(b: *std.Build, all: *std.Build.Step, debug: *std.Build.Module, fast: *std.Build.Module, core: *std.Build.Module) void {
const step = b.step("test-gdn-chain-host", "Qwen chain norm ABI, off switch and replacement registrations without devices");
for ([_]*std.Build.Module{ debug, fast }, [_]std.builtin.OptimizeMode{ .debug, .fast }) |cuda, mode| {
const run = b.addRunArtifact(b.addTest(.{ .root_module = cuda, .filters = &.{"GDN chain port:"} }));
run.has_side_effects = true;
step.dependOn(&run.step);
const fixture = b.addRunArtifact(b.addTest(.{ .root_module = b.createModule(.{
.root_source_file = b.path("zig/tests/cuda/contract_gdn_chain_host_test.zig"),
.target = b.graph.host,
.optimize = mode,
.link_libc = true,
.imports = &.{ .{ .name = "cuda", .module = cuda }, .{ .name = "core", .module = core } },
}) }));
fixture.has_side_effects = true;
step.dependOn(&fixture.step);
}
all.dependOn(step);
}
20 changes: 20 additions & 0 deletions zig/build/moe_router_host.zig
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
//! Qwen router grid dispatch and FP64 cancellation witnesses without a CUDA device.
const std = @import("std");
pub fn tests(b: *std.Build, all: *std.Build.Step, debug: *std.Build.Module, fast: *std.Build.Module, core: *std.Build.Module) void {
const step = b.step("test-moe-router-host", "Expert-first router ABI, old-path switch and independent reference fixtures");
for ([_]*std.Build.Module{ debug, fast }, [_]std.builtin.OptimizeMode{ .debug, .fast }) |cuda, mode| {
const run = b.addRunArtifact(b.addTest(.{ .root_module = cuda, .filters = &.{"MoE router port:"} }));
run.has_side_effects = true;
step.dependOn(&run.step);
const fixture = b.addRunArtifact(b.addTest(.{ .root_module = b.createModule(.{
.root_source_file = b.path("zig/tests/cuda/contract_moe_router_host_test.zig"),
.target = b.graph.host,
.optimize = mode,
.link_libc = true,
.imports = &.{ .{ .name = "cuda", .module = cuda }, .{ .name = "core", .module = core } },
}) }));
fixture.has_side_effects = true;
step.dependOn(&fixture.step);
}
all.dependOn(step);
}
21 changes: 21 additions & 0 deletions zig/build/prompt_bf16_host.zig
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
//! CPU-only dispatch and contract registration checks for opt-in BF16 prompt dispatch.
const std = @import("std");

pub fn tests(b: *std.Build, all: *std.Build.Step, debug_cuda: *std.Build.Module, fast_cuda: *std.Build.Module, core: *std.Build.Module) void {
const step = b.step("test-prompt-bf16-host", "BF16 prompt tile dispatch and old-path controls without devices");
for ([_]*std.Build.Module{ debug_cuda, fast_cuda }, [_]std.builtin.OptimizeMode{ .debug, .fast }) |cuda, mode| {
const dispatch = b.addRunArtifact(b.addTest(.{ .root_module = cuda, .filters = &.{"BF16 prompt"} }));
dispatch.has_side_effects = true;
step.dependOn(&dispatch.step);
const fixture = b.addRunArtifact(b.addTest(.{ .root_module = b.createModule(.{
.root_source_file = b.path("zig/tests/cuda/contract_prompt_bf16_host_test.zig"),
.target = b.graph.host,
.optimize = mode,
.link_libc = true,
.imports = &.{ .{ .name = "cuda", .module = cuda }, .{ .name = "core", .module = core } },
}) }));
fixture.has_side_effects = true;
step.dependOn(&fixture.step);
}
all.dependOn(step);
}
132 changes: 132 additions & 0 deletions zig/kernels/cuda/gdn_prefill_norm.cuh
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
// Qwen whole-head prompt chain: the recurrence's eight warps also normalize its staged BF16 rows.
#pragma once
#include "common/reduce.cuh"

namespace tf_gdn_prefill {

template <int Fault>
__device__ __forceinline__ void chain_norm(
const __nv_bfloat16* __restrict__ q, const __nv_bfloat16* __restrict__ k, const __nv_bfloat16* __restrict__ v,
const float* __restrict__ g, const __nv_bfloat16* __restrict__ beta, const float* state,
float* last, __nv_bfloat16* __restrict__ y, int W, int hk, int hv,
const __nv_bfloat16* __restrict__ z, const __nv_bfloat16* __restrict__ nw,
__nv_bfloat16* __restrict__ mix, float* __restrict__ xs, float eps) {
using QK = __nv_bfloat16;
using B = __nv_bfloat16;
constexpr int ROWS = 128, STEPS = 16;
__shared__ __align__(16) __nv_bfloat16 ys[STEPS][DV];
__shared__ float4 ks[STEPS][DK / 4], qs[STEPS][DK / 4];
__shared__ float gs[STEPS], bs[STEPS];
__shared__ __align__(16) __nv_bfloat16 vs[STEPS][ROWS];
const int head = blockIdx.x, row = threadIdx.x >> 1, half = threadIdx.x & 1;
const int key_head = head / (hv / hk);
float s[64];
const float* s0 = state + (static_cast<size_t>(head) * DV + row) * DK;
#pragma unroll
for (int j = 0; j < 16; ++j) {
const float4 t = *reinterpret_cast<const float4*>(s0 + 8 * j + 4 * half);
s[4 * j] = t.x; s[4 * j + 1] = t.y; s[4 * j + 2] = t.z; s[4 * j + 3] = t.w;
}
Prefetch<QK, B, 2 * ROWS, ROWS, STEPS> pf; // each stage's loads in flight during the one before
pf.fetch(q, k, v, g, beta, 0, W, hk, hv, head, key_head, 0);
for (int t0 = 0; t0 < W; t0 += STEPS) {
const int n = min(STEPS, W - t0);
__syncthreads();
pf.store(ks, qs, gs, bs, vs);
__syncthreads();
if (t0 + STEPS < W) pf.fetch(q, k, v, g, beta, t0 + STEPS, W, hk, hv, head, key_head, 0);
for (int tt = 0; tt < n; ++tt) {
const float gt = gs[tt], bt = bs[tt];
const size_t vat = (static_cast<size_t>(t0 + tt) * hv + head) * DV + row;
const float vt = __bfloat162float(vs[tt][threadIdx.x >> 1]);
float m[4] = {0.0f, 0.0f, 0.0f, 0.0f};
#pragma unroll
for (int j = 0; j < 16; ++j) {
const float4 kk = ks[tt][2 * j + half];
s[4 * j] = s[4 * j] * gt;
s[4 * j + 1] = s[4 * j + 1] * gt;
s[4 * j + 2] = s[4 * j + 2] * gt;
s[4 * j + 3] = s[4 * j + 3] * gt;
m[0] = __fmaf_rn(s[4 * j], kk.x, m[0]);
m[1] = __fmaf_rn(s[4 * j + 1], kk.y, m[1]);
m[2] = __fmaf_rn(s[4 * j + 2], kk.z, m[2]);
m[3] = __fmaf_rn(s[4 * j + 3], kk.w, m[3]);
}
float mem = (m[0] + m[1]) + (m[2] + m[3]);
mem = mem + __shfl_xor_sync(0xffffffffu, mem, 1);
const float delta = (vt - mem) * bt;
float o[4] = {0.0f, 0.0f, 0.0f, 0.0f};
#pragma unroll
for (int j = 0; j < 16; ++j) {
const float4 kk = ks[tt][2 * j + half], qq = qs[tt][2 * j + half];
s[4 * j] = __fmaf_rn(kk.x, delta, s[4 * j]);
s[4 * j + 1] = __fmaf_rn(kk.y, delta, s[4 * j + 1]);
s[4 * j + 2] = __fmaf_rn(kk.z, delta, s[4 * j + 2]);
s[4 * j + 3] = __fmaf_rn(kk.w, delta, s[4 * j + 3]);
o[0] = __fmaf_rn(s[4 * j], qq.x, o[0]);
o[1] = __fmaf_rn(s[4 * j + 1], qq.y, o[1]);
o[2] = __fmaf_rn(s[4 * j + 2], qq.z, o[2]);
o[3] = __fmaf_rn(s[4 * j + 3], qq.w, o[3]);
}
float out = (o[0] + o[1]) + (o[2] + o[3]);
out = out + __shfl_xor_sync(0xffffffffu, out, 1);
if (half == 0) {
const __nv_bfloat16 rounded = __float2bfloat16_rn(out);
y[vat] = rounded;
ys[tt][row] = rounded;
}
}
__syncthreads();
const int warp = threadIdx.x >> 5, lane = threadIdx.x & 31;
for (int tt = warp; tt < n; tt += 8) {
const size_t at = (static_cast<size_t>(t0 + tt) * hv + head) * DV;
float yv[4], ss = 0.0f;
#pragma unroll
for (int j = 0; j < 4; ++j) {
yv[j] = __bfloat162float(ys[tt][lane * 4 + j]);
ss += yv[j] * yv[j];
}
ss = tf_common::warp_sum(ss);
const float inv = rsqrtf(ss / static_cast<float>(DV) + eps);
#pragma unroll
for (int j = 0; j < 4; ++j) {
const int d = lane * 4 + j;
const float x = __bfloat162float(__float2bfloat16_rn(__bfloat162float(nw[d]) * (yv[j] * inv)));
const float zf = __bfloat162float(z[at + d]);
const __nv_bfloat16 o = __float2bfloat16_rn((Fault == 1 ? 1.0f : zf / (1.0f + expf(-zf))) * x);
mix[at + d] = o;
ys[tt][d] = o;
}
if (xs != nullptr) {
__syncwarp();
if (lane < DV / 64) {
float sum = 0.0f;
#pragma unroll
for (int j = 0; j < 64; ++j) sum += __bfloat162float(ys[tt][lane * 64 + j]);
xs[at / 64 + lane] = sum;
}
}
}
}
float* s1 = last + (static_cast<size_t>(head) * DV + (Fault == 2 ? (row + 1) % DV : row)) * DK;
#pragma unroll
for (int j = 0; j < 16; ++j)
*reinterpret_cast<float4*>(s1 + 8 * j + 4 * half) = make_float4(s[4 * j], s[4 * j + 1], s[4 * j + 2],
s[4 * j + 3]);
}

} // namespace tf_gdn_prefill

#define TF_GDN_NORM_ENTRY(NAME, FAULT) \
extern "C" __global__ void __launch_bounds__(256) NAME( \
const __nv_bfloat16* q, const __nv_bfloat16* k, const __nv_bfloat16* v, const float* g, \
const __nv_bfloat16* beta, const float* state, float* last, __nv_bfloat16* y, int W, int hk, int hv, \
const __nv_bfloat16* z, const __nv_bfloat16* nw, __nv_bfloat16* mix, float* xs, float eps) { \
tf_gdn_prefill::chain_norm<FAULT>(q, k, v, g, beta, state, last, y, W, hk, hv, z, nw, mix, xs, eps); \
}
TF_GDN_NORM_ENTRY(tf_gdn_chain_norm, 0)
#ifdef TF_GDN_CHAIN_CONTROLS
TF_GDN_NORM_ENTRY(tf_gdn_chain_norm_bad_gate, 1)
TF_GDN_NORM_ENTRY(tf_gdn_chain_norm_bad_state, 2)
#endif
#undef TF_GDN_NORM_ENTRY
43 changes: 43 additions & 0 deletions zig/kernels/cuda/moe_router_expert.cuh
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
// Expert blocks first for Qwen's 16-row router; each dot retains the original FMA chain.
#pragma once
#include <cuda_bf16.h>
#include <stdint.h>
namespace tf_moe_expert_first {
constexpr int TILE = 16, KC = 256;
template <bool BadRows>
__device__ __forceinline__ void router(const __nv_bfloat16* __restrict__ X, int x_stride,
const __nv_bfloat16* __restrict__ W, float* __restrict__ OUT,
int R, int D, int E, const int* __restrict__ P) {
if (P != nullptr) R = min(R, P[2]);
if (static_cast<int>(blockIdx.y) * TILE >= R) return;
__shared__ __nv_bfloat16 xs[TILE][KC + 2];
__shared__ __nv_bfloat16 ws[TILE][KC + 2];
const int row0 = blockIdx.y * TILE, e0 = blockIdx.x * TILE;
const int rr = threadIdx.x / TILE, ee = threadIdx.x % TILE;
float acc = 0.0f;
for (int k0 = 0; k0 < D; k0 += KC) {
__syncthreads();
for (int c = threadIdx.x; c < TILE * KC; c += 256) {
const int r = c / KC, k = c % KC;
const bool kin = k0 + k < D;
xs[r][k] = kin && row0 + r < R ? X[static_cast<int64_t>(row0 + (BadRows ? 0 : r)) * x_stride + k0 + k] : __float2bfloat16_rn(0.0f);
ws[r][k] = kin && e0 + r < E ? W[static_cast<int64_t>(e0 + r) * D + k0 + k] : __float2bfloat16_rn(0.0f);
}
__syncthreads();
const int kn = min(KC, D - k0);
for (int k = 0; k < kn; ++k) acc = __fmaf_rn(__bfloat162float(xs[rr][k]), __bfloat162float(ws[ee][k]), acc);
}
if (row0 + rr < R && e0 + ee < E) OUT[static_cast<int64_t>(row0 + rr) * E + e0 + ee] = acc;
}

} // namespace tf_moe_expert_first
#define TF_MOE_EXPERT_ENTRY(NAME, BAD) \
extern "C" __global__ void __launch_bounds__(256) NAME( \
const __nv_bfloat16* x, int stride, const __nv_bfloat16* w, float* out, int rows, int dims, int experts, const int* p) { \
tf_moe_expert_first::router<BAD>(x, stride, w, out, rows, dims, experts, p); \
}
TF_MOE_EXPERT_ENTRY(tf_moe_router_expert_first, false)
#ifdef TF_MOE_ROUTER_CONTROLS
TF_MOE_EXPERT_ENTRY(tf_moe_router_expert_bad_rows, true)
#endif
#undef TF_MOE_EXPERT_ENTRY
4 changes: 4 additions & 0 deletions zig/kernels/cuda/qwen_gdn_bf16.cu
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// ModelOpt-only prompt recurrence; the standard GDN translation unit stays unchanged.
#include "gdn_prefill.cu"
#define TF_GDN_CHAIN_CONTROLS
#include "gdn_prefill_norm.cuh"
4 changes: 4 additions & 0 deletions zig/kernels/cuda/qwen_router_bf16.cu
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// ModelOpt-only expert-first router; the standard MoE translation unit stays unchanged.
#include "moe.cu"
#define TF_MOE_ROUTER_CONTROLS
#include "moe_router_expert.cuh"
3 changes: 2 additions & 1 deletion zig/qwen35_modelopt_host.zig
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ fn fullKernels(d: *cuda.Driver) modelopt.Kernels {
d.api.cuLaunchKernelEx = Recorded.launchEx;
d.api.cuMemcpyHtoD_v2 = Recorded.copy;
d.api.cuStreamSynchronize = Recorded.sync;
var out: modelopt.Kernels = .{ .lane = undefined, .prompt = undefined, .pack = undefined, .embed = undefined };
var out: modelopt.Kernels = .{ .lane = undefined, .prompt = undefined, .pack = undefined, .embed = undefined, .glue = undefined };
out.lane.clusters = false;
for (&out.lane.fns) |*set| for (set) |*f| {
f.* = function(d, 2);
Expand All @@ -133,6 +133,7 @@ fn fullKernels(d: *cuda.Driver) modelopt.Kernels {
out.prompt.lean = function(d, 3);
out.prompt.lean_f32 = function(d, 3);
out.prompt.sms = 48;
out.prompt.bf16_serving = false;
out.pack.fp8_lane = function(d, 1);
return out;
}
Expand Down
8 changes: 8 additions & 0 deletions zig/src/core/contract/gdn_chain_records.zig
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
//! Whole-head chain and baseline launch resource records.
const registry = @import("registry.zig");
pub const records = [_]registry.CudaRecord{
.{ .launch = .{ .name = "qwen_gdn_bf16 tf_gdn_chain_norm", .symbol = "tf_gdn_chain_norm", .image = "qwen_gdn_bf16", .threads = 256 }, .usage = .{ .{ .regs = 176, .static = 24704, .bound = 256 }, .{ .regs = 184, .static = 24704, .bound = 256 }, .{ .regs = 184, .static = 24704, .bound = 256 }, .{ .regs = 183, .static = 24704, .bound = 256 }, .{ .regs = 183, .static = 24704, .bound = 256 } }, .later_pending = true },
.{ .launch = .{ .name = "gdn_prefill chain_kernel", .symbol = "_ZN14tf_gdn_prefill12chain_kernelI13__nv_bfloat16S1_Li64ELi32EEEvPKT_S4_PKS1_PKfPKT0_S8_PfPS1_iii", .image = "gdn_prefill", .threads = 128 }, .usage = .{ .{ .regs = 229, .static = 37120, .bound = 128 }, .{ .regs = 231, .static = 37120, .bound = 128 }, .{ .regs = 231, .static = 37120, .bound = 128 }, .{ .regs = 193, .static = 37120, .bound = 128 }, .{ .regs = 193, .static = 37120, .bound = 128 } }, .later_pending = true },
.{ .launch = .{ .name = "qwen_gdn_bf16 chain_kernel", .symbol = "_ZN14tf_gdn_prefill12chain_kernelI13__nv_bfloat16S1_Li64ELi32EEEvPKT_S4_PKS1_PKfPKT0_S8_PfPS1_iii", .image = "qwen_gdn_bf16", .threads = 128 }, .usage = .{ .{ .regs = 229, .static = 37120, .bound = 128 }, .{ .regs = 231, .static = 37120, .bound = 128 }, .{ .regs = 231, .static = 37120, .bound = 128 }, .{ .regs = 193, .static = 37120, .bound = 128 }, .{ .regs = 193, .static = 37120, .bound = 128 } }, .later_pending = true },
.{ .launch = .{ .name = "qwen35 tf_q35_gdn_post", .symbol = "tf_q35_gdn_post", .image = "qwen35", .threads = 32 }, .usage = .{ .{ .regs = 28, .static = 256, .bound = 32 }, .{ .regs = 29, .static = 256, .bound = 32 }, .{ .regs = 29, .static = 256, .bound = 32 }, .{ .regs = 31, .static = 256, .bound = 32 }, .{ .regs = 31, .static = 256, .bound = 32 } }, .later_pending = true },
};
9 changes: 9 additions & 0 deletions zig/src/core/contract/moe_router_records.zig
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
//! Expert-first router launch resource records.
const registry = @import("registry.zig");
pub const records = [_]registry.CudaRecord{
.{ .launch = .{ .name = "qwen_router_bf16 tf_moe_router_expert_first", .symbol = "tf_moe_router_expert_first", .image = "qwen_router_bf16", .threads = 256 }, .usage = .{ .{ .regs = 32, .static = 16512, .bound = 256 }, .{ .regs = 48, .static = 16512, .bound = 256 }, .{ .regs = 48, .static = 16512, .bound = 256 }, .{ .regs = 63, .static = 16512, .bound = 256 }, .{ .regs = 63, .static = 16512, .bound = 256 } }, .later_pending = true },
};

test {
_ = @import("qwen_glue_receipts_test.zig");
}
Loading
Loading