Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
881ccca
cuda: a process-wide cap on DeviceBuffer and pinned HostBuffer bytes
plotarmordev Oct 16, 2026
b00dd4e
drama: the temporal codebook tower
plotarmordev Oct 16, 2026
c8af505
drama: the speech codec, with codec.pth read without Python
plotarmordev Oct 16, 2026
e192c0f
engine_api: speech requests, speech info and a submit_speech hook
plotarmordev Oct 16, 2026
ab45904
native: Drama 3 (fish_omni) on CUDA
plotarmordev Oct 16, 2026
7553d00
server: POST /v1/audio/speech
plotarmordev Oct 16, 2026
8ba4307
tests: Drama 3 backbone and tower oracles, replays and stage traces
plotarmordev Oct 16, 2026
20249e9
drama: incremental codec decode, bit-identical to the whole decode
plotarmordev Oct 16, 2026
93fcaab
tests: Drama 3 codec oracle, replays and stage trace
plotarmordev Oct 16, 2026
d84284d
engine_api: audio events, so a speech engine can publish PCM while it…
plotarmordev Oct 16, 2026
71c31a9
build: Drama 3 backbone and tower kernels, the drama module, the nati…
plotarmordev Oct 16, 2026
588f1f1
server: stream: true on /v1/audio/speech sends raw PCM chunks as they…
plotarmordev Oct 16, 2026
d8c6a47
drama: the backbone's one-row GEMM stages its weights through shared …
plotarmordev Oct 16, 2026
10796d4
build: the Drama 3 codec kernels and the codec tool steps
plotarmordev Oct 16, 2026
8bc6814
tests: tf-drama-codec-stream-oracle, whole against chunked codec decodes
plotarmordev Oct 16, 2026
40c7c87
core: a direct read the file system refuses goes through the page cache
plotarmordev Oct 16, 2026
23a7fcc
cuda: Module.holds, whether a loaded image defines a device global
plotarmordev Oct 16, 2026
6f85731
drama: the Drama 3 text backbone on CUDA
plotarmordev Oct 16, 2026
05a715f
drama: one-row backbone GEMVs stream weights through a swizzled cp.as…
plotarmordev Oct 16, 2026
9dc8202
drama: add-norm fused with the routed experts' FP8 activation quantiz…
plotarmordev Oct 16, 2026
705541c
drama: one SwiGLU launch for the routed and shared experts
plotarmordev Oct 16, 2026
08291b5
drama: MoE combine on 8-wide vectors
plotarmordev Oct 16, 2026
641b18b
drama: decode attention keeps the next keys' loads in flight
plotarmordev Oct 16, 2026
01b7f3b
drama: the tower's one decode row attends as a thread-block cluster
plotarmordev Oct 16, 2026
b89dc67
drama: checkpoint weights stream onto the GPU with direct I/O in file…
plotarmordev Oct 16, 2026
0f9345e
speech: a Drama 3 reply that reaches max_frames returns its clipped a…
plotarmordev Oct 16, 2026
9b3934c
drama: one-row attention runs its Q/K norm and RoPE prologue in the s…
plotarmordev Oct 16, 2026
ea06b8b
drama: the tower samples with a stable radix sort
plotarmordev Oct 16, 2026
68aeb3e
drama: the codec builds its weights on its own thread while the backb…
plotarmordev Oct 16, 2026
2757724
drama: the tower's one-row projections on drama_tower_gemv, in cuBLAS…
plotarmordev Oct 16, 2026
fdee05c
Merge upstream main (6ee828c2) into feat/drama3-cuda
plotarmordev Oct 17, 2026
0f81a2b
Merge align/920-merge-main (upstream main 6ee828c2) into feat/drama3-…
plotarmordev Oct 17, 2026
15bceca
Merge align/921-merge-main (upstream main 6ee828c2) into fix/drama3-c…
plotarmordev Oct 17, 2026
64e8ff8
Merge align/922-merge-main (upstream main 6ee828c2) into perf/drama3-…
plotarmordev Oct 17, 2026
2d9232a
Merge align/923-merge-main (upstream main 6ee828c2) into perf/drama3-…
plotarmordev Oct 17, 2026
42c548c
Merge align/924-merge-main (upstream main 6ee828c2) into perf/drama3-…
plotarmordev Oct 17, 2026
96f2b38
Merge align/925-merge-main (upstream main 6ee828c2) into perf/drama3-…
plotarmordev Oct 17, 2026
b56fc8c
drama: below sm_90 the tower's decode row runs drama_attention, and i…
plotarmordev Oct 17, 2026
996637c
Merge align/924-merge-main into perf/drama3-load: the tower's sm_90 c…
plotarmordev Oct 17, 2026
4d3c4f5
Merge align/925-merge-main into perf/drama3-tower-gemv: the tower's s…
plotarmordev Oct 17, 2026
65cd256
engine_api and native/cuda.zig back under 600 lines: speech and visio…
plotarmordev Oct 17, 2026
f5aa7a5
Merge align/920-merge-main into feat/drama3-streaming: speech and vis…
plotarmordev Oct 17, 2026
fd87532
Merge align/921-merge-main into fix/drama3-clipped-replies: speech an…
plotarmordev Oct 17, 2026
572afe3
Merge align/922-merge-main into perf/drama3-backbone-one-row: speech …
plotarmordev Oct 17, 2026
1ecf53b
Merge align/923-merge-main into perf/drama3-tower-decode: speech and …
plotarmordev Oct 17, 2026
bd11ba4
Merge align/924-merge-main into perf/drama3-load: speech and vision t…
plotarmordev Oct 17, 2026
f495030
Merge align/925-merge-main into perf/drama3-tower-gemv: speech and vi…
plotarmordev Oct 17, 2026
118086a
core: lane tests ignore the speech audio event
plotarmordev Oct 17, 2026
4d41f5a
Merge align/921-merge-main into fix/drama3-clipped-replies: lane test…
plotarmordev Oct 17, 2026
2b27b19
Merge align/922-merge-main into perf/drama3-backbone-one-row: lane te…
plotarmordev Oct 17, 2026
e45d71b
Merge align/923-merge-main into perf/drama3-tower-decode: lane tests …
plotarmordev Oct 17, 2026
809e103
Merge align/924-merge-main into perf/drama3-load: lane tests ignore t…
plotarmordev Oct 17, 2026
0ed8946
Merge align/925-merge-main into perf/drama3-tower-gemv: lane tests ig…
plotarmordev Oct 17, 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
Prev Previous commit
Next Next commit
build: the Drama 3 codec kernels and the codec tool steps
Embeds the codec fatbin and adds a build step per codec oracle, replay and trace driver. With this the series
builds.
  • Loading branch information
plotarmordev committed Oct 16, 2026
commit 10796d46f625b054aaa13fb6c9c41d9783d69e85
41 changes: 41 additions & 0 deletions zig/build/cuda.zig
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ const kernels = [_]Kernel{
.{ .name = "drama_backbone", .flags = glue },
.{ .name = "drama_backbone_gemm", .flags = &.{"-O3"} },
.{ .name = "drama_tower", .flags = glue },
.{ .name = "drama_codec", .flags = glue },
};

/// torch.utils.cpp_extension's own nvcc flags (torch 2.13): C++20 and which half/bf16 operators the headers define.
Expand Down Expand Up @@ -146,6 +147,36 @@ pub fn targets(b: *std.Build, target: std.Build.ResolvedTarget, optimize: std.bu
for (exlr8_build.denseModules(b, target, optimize, exlr8, exlr8_tests[0])) |m| runner.addImport(m.name, m.module);
b.installArtifact(b.addExecutable(.{ .name = "tf-cuda-test", .root_module = runner }));
nativeServer(b, target, optimize, cuda, mods.core, mods.lanes, mods.nemotron, mods.drama, mods.tokenizer, build_options, true).root_module.strip = strip;
const codec_oracle = b.addExecutable(.{ .name = "tf-drama-codec-oracle", .root_module = b.createModule(.{
.root_source_file = b.path("zig/tests/cuda/drama_codec_oracle.zig"),
.target = target,
.optimize = optimize,
.link_libc = true,
.strip = strip,
.imports = &.{ .{ .name = "cuda", .module = cuda }, .{ .name = "drama", .module = mods.drama } },
}) });
const install_oracle = b.addInstallArtifact(codec_oracle, .{ .dest_dir = .{ .override = .{ .custom = "oracle/bin" } } });
b.step("drama-codec-oracle", "Build the production-codec numerical oracle driver; does not run a GPU").dependOn(&install_oracle.step);
const codec_rvq_replay = b.addExecutable(.{ .name = "tf-drama-codec-rvq-replay", .root_module = b.createModule(.{
.root_source_file = b.path("zig/tests/cuda/drama_codec_rvq_replay.zig"),
.target = target,
.optimize = optimize,
.link_libc = true,
.strip = strip,
.imports = &.{ .{ .name = "cuda", .module = cuda }, .{ .name = "drama", .module = mods.drama } },
}) });
const install_codec_rvq_replay = b.addInstallArtifact(codec_rvq_replay, .{ .dest_dir = .{ .override = .{ .custom = "oracle/bin" } } });
b.step("drama-codec-rvq-replay", "Build the isolated codec RVQ counterfactual; does not run a GPU").dependOn(&install_codec_rvq_replay.step);
const codec_weight_replay = b.addExecutable(.{ .name = "tf-drama-codec-weight-replay", .root_module = b.createModule(.{
.root_source_file = b.path("zig/tests/cuda/drama_codec_weight_replay.zig"),
.target = target,
.optimize = optimize,
.link_libc = true,
.strip = strip,
.imports = &.{ .{ .name = "cuda", .module = cuda }, .{ .name = "drama", .module = mods.drama } },
}) });
const install_codec_weight_replay = b.addInstallArtifact(codec_weight_replay, .{ .dest_dir = .{ .override = .{ .custom = "oracle/bin" } } });
b.step("drama-codec-weight-replay", "Build the isolated codec weight counterfactual; does not run a GPU").dependOn(&install_codec_weight_replay.step);
const tower_oracle = b.addExecutable(.{ .name = "tf-drama-tower-oracle", .root_module = b.createModule(.{
.root_source_file = b.path("zig/tests/cuda/drama_tower_oracle.zig"),
.target = target,
Expand Down Expand Up @@ -186,6 +217,16 @@ pub fn targets(b: *std.Build, target: std.Build.ResolvedTarget, optimize: std.bu
}) });
const install_gdn_oracle = b.addInstallArtifact(gdn_oracle, .{ .dest_dir = .{ .override = .{ .custom = "oracle/bin" } } });
b.step("drama-gdn-canonical-oracle", "Build the GDN canonical controller verification driver; does not run a GPU").dependOn(&install_gdn_oracle.step);
const codec_trace = b.addExecutable(.{ .name = "tf-drama-codec-trace", .root_module = b.createModule(.{
.root_source_file = b.path("zig/tests/cuda/drama_codec_trace.zig"),
.target = target,
.optimize = optimize,
.link_libc = true,
.strip = strip,
.imports = &.{ .{ .name = "cuda", .module = cuda }, .{ .name = "drama", .module = mods.drama } },
}) });
const install_trace = b.addInstallArtifact(codec_trace, .{ .dest_dir = .{ .override = .{ .custom = "oracle/bin" } } });
b.step("drama-codec-trace", "Build the production-codec trace/replay diagnostic; does not run a GPU").dependOn(&install_trace.step);
const backbone_trace = b.addExecutable(.{ .name = "tf-drama-backbone-trace", .root_module = b.createModule(.{
.root_source_file = b.path("zig/tests/cuda/drama_backbone_trace.zig"),
.target = target,
Expand Down
1 change: 1 addition & 0 deletions zig/src/cuda/kernels.zig
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ pub const embed_rows: []const u8 = if (available) &Blob("fatbin_embed_rows").byt
pub const drama_backbone: []const u8 = if (available) &Blob("fatbin_drama_backbone").bytes else &.{};
pub const drama_backbone_gemm: []const u8 = if (available) &Blob("fatbin_drama_backbone_gemm").bytes else &.{};
pub const drama_tower: []const u8 = if (available) &Blob("fatbin_drama_tower").bytes else &.{};
pub const drama_codec: []const u8 = if (available) &Blob("fatbin_drama_codec").bytes else &.{};

/// Symbols in the gdn image as cuobjdump lists them for the built fatbin (named namespace tf_gdn).
pub const gdn_symbols = struct {
Expand Down
Loading