Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
610d542
changelog: #1998 under Unreleased
ashhart Nov 21, 2026
0cfdb5c
moss image: the prompt encoder and image decoder on CUDA (#1573)
devopsfortunato Nov 5, 2026
2b2b640
moss image: serve pictures on CUDA, recognized by the checkpoint's mo…
devopsfortunato Nov 5, 2026
25bdade
moss image host: end the pass on the schedule's own length, and free …
devopsfortunato Nov 5, 2026
7f5fdf6
contract: the image decoder's unpack under gates 1-4 with its planted…
devopsfortunato Nov 6, 2026
ad9e242
contract: the image decoder's seven kernels under gates 1-4, controls…
devopsfortunato Nov 6, 2026
5da0acc
contract: the decoder's softmax sums gate runs at the row it serves, …
devopsfortunato Nov 6, 2026
11438c6
contract: the decoder's 3x3 convolution is gated at every picture a r…
devopsfortunato Nov 6, 2026
f3f8fdb
contract: the encoder's norm, head and gate under gates 1-4, and the …
devopsfortunato Nov 6, 2026
9e2ae85
contract: the encoder's silu_mul, conv and gated_norm under gates 1-4…
devopsfortunato Nov 6, 2026
a252cb6
docs: this pull request's changelog line under Unreleased, and the de…
devopsfortunato Nov 6, 2026
5d35aa8
contract: the encoder's attention, gdn_prep and gdn under gates 1-4, …
devopsfortunato Nov 6, 2026
5ac988a
serve: the engine API's request types and the tokenizer readers live …
devopsfortunato Nov 6, 2026
6e3590e
moss image: tf-moss-image encodes its own prompt and decodes its own …
devopsfortunato Nov 6, 2026
38babd2
contract: the encoder's attention and gdn_prep drop their unnecessary…
devopsfortunato Nov 6, 2026
af81236
docs: the encoder and decoder are served through the host even though…
devopsfortunato Nov 6, 2026
1c7943c
build: the tool module's comment fits one line, so the lean check rep…
devopsfortunato Nov 6, 2026
03272a4
contract: the controls file stays at 600 lines, and the moss includes…
devopsfortunato Nov 8, 2026
066c768
docs: the recipe's encoder run names the case folder's own prompt fil…
devopsfortunato Nov 8, 2026
130bbba
build: tf-moss-image-blocks gets the tokenizer its shared root file i…
devopsfortunato Nov 8, 2026
d7099a8
contract: the moss controls' comment says each drops one arithmetic s…
devopsfortunato Nov 8, 2026
d638838
moss image host: a device OOM fails one picture, not the engine (#2281)
devopsfortunato Nov 9, 2026
614c9b4
moss image: the host quantises through the family's own quantiser (#2…
devopsfortunato Nov 9, 2026
126d63c
server: the tokenizer/ fallback has its own test (#2281)
devopsfortunato Nov 9, 2026
8396184
moss image: the moved tests keep the cases their originals pinned (#2…
devopsfortunato Nov 9, 2026
505a260
contract: the moss controls live in their own file, and main's unpack…
devopsfortunato Nov 9, 2026
7f9d76e
moss image: an engine that stops serving logs at err, checked out of …
devopsfortunato Nov 9, 2026
0f08b3e
tests: the out-of-service check's comment fits 120 columns (#2281)
devopsfortunato Nov 9, 2026
d092020
moss image: the guidance-1 comment says what the step does (#2281)
devopsfortunato Nov 9, 2026
5c52dae
moss image: refresh source pins after the main rebase
ashhart Nov 19, 2026
e4196fe
moss image: the recipe names the RTX 5090's 24-kernel summary apart f…
devopsfortunato Nov 20, 2026
3dee02b
contract: admit the larger union with MOSS-Image's decoder and encode…
ashhart Nov 21, 2026
44019dc
changelog: #2281 under Unreleased
ashhart Nov 21, 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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,12 @@ Each release's page on GitHub has its notes and measurements. See [the 1.0.0 rel

## Unreleased

- MOSS-Image on CUDA: the checkpoint's Qwen3.5 prompt encoder and VAE decoder run beside the transformer, so the native server serves pictures through `POST /v1/images/generations`, the same request twice giving the same bytes (#2281, part of #1573). Thanks to @devopsfortunato.

- MOSS-Image and Step-5: the vision encoders take their RoPE frequencies from the shared exact helper; MOSS-Image's bf16 cos and sin tables change only from row 565, so shorter prompts read the same tables, Step-5's bf16 tables are unchanged, and `zig build test-moss-image-rotary-host` checks the MOSS-Image tables without a device (#1998, part of #1852).



- Drama 3 on CUDA and Metal: the codec's weight map, decoder stage plan and decode and encode schedules live once in `codec_net.zig`, and each backend binds only its own kernels; a new `check-drama-codec-bindings` build step, run by `zig build test`, compiles both bindings on any host, and the waveform and codes are byte-identical to before on the author's CUDA and Metal runs (#2893, refs #2118). Thanks to @jschmied.

- Nemotron and LFM2 MoE on CUDA: the prompt cache keeps a state at each message start by default, so an agent's next request resumes from where its last message began instead of reading the conversation again, within the existing prompt-cache budget and slots (#3696, part of #3617).
Expand Down
138 changes: 118 additions & 20 deletions docs/recipes/moss-image-cuda.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,26 @@ same `tf-moss-image` tool and checked against the same publisher pipeline.
over both.
- The card's guidance: two passes a step, the prompt and the empty negative prompt with block 22 skipped.

The prompt encoder and the image decoder are not ported; `tools/zig/moss_image_case.py` runs them in torch, as on
Metal. It is a denoiser, not a token family: it does not register with the lane engine, the server or
`families.detect`.
The prompt encoder is ported (`cuda_encoder.zig`, `moss_image_encoder.cu`): the checkpoint's Qwen3.5-9B text model,
the chat-formatted prompt to the final-norm rows `[tokens, 4096]` the refiner takes, driven by
`tf-moss-image-encoder`. It is a denoiser's front end, not a token family: neither it nor the decoder appears in
`families.detect`, and neither answers a text route. The checkpoint is served all the same: `moss_image_host.zig`
opens the checkpoint whose `model_index.json` names `MOSSImagePipeline` ahead of the family table, the encoder, the
transformer and the decoder resident on CUDA, and `POST /v1/images/generations` answers one picture a request.

The image decoder is ported (`cuda_decoder.zig`, `moss_image_decoder.cu`): the checkpoint's `vae/` in float32, the
latents to the raw `[height, width, 3]` picture the pipeline clamps afterwards, driven by `tf-moss-image-decoder`.

The config, the rotary tables and the timestep's modulation (`config.zig`, `host.zig`) are shared with Metal. The
weights are checked as on Metal: the released geometry only, and no tensor left unread.

It runs on the two GPUs it was checked on, sm_120 (RTX 5090) and sm_121 (GB10): `Model.load` refuses any other.
It runs on the two GPUs it was checked on, sm_120 (RTX 5090) and sm_121 (GB10): `Model.load` and `Decoder.load` refuse
any other.

On the 32 GB RTX 5090 the served route and the tool answer the same shapes with the same bytes: 1024x1024, the
negative-prompt branch, 1280x1024 and 1408x1024 are byte equal between `POST /v1/images/generations` and
`tf-moss-image`. At 1536x1024 on that card the served request is refused `OutOfDeviceMemory` and the engine keeps
serving the shapes that fit; the tool completes the same case because it frees the transformer before the decode.

## Precision

Expand All @@ -41,36 +53,114 @@ ones as they were: their SASS is identical before and after (sm_80, 86, 89, 120
- `tf_moss_situ`: the situ gate, over the MLP's (hidden | gate) rows or two buffers;
- `tf_moss_gate_add`: the gated residual add (ones for the refiner's plain residual).

## Kernel contract
## Decoder

`cuda_decoder.zig` runs the checkpoint's `vae/` decoder, float32 throughout as the pipeline decodes it, before any
8-bit step:

- the latents' batch norm undone and the 2 x 2 patches unpacked (`tf_md_unpack`);
- 1x1 convolutions as one fp32 tiled GEMM (`tf_md_gemm`), the mid block's attention projections included;
- 3x3 convolutions direct (`tf_md_conv3x3`: 8 x 16 output pixels by 32 channels a block), not Winograd: fewer fp32
sums than the transform's and the same class of accuracy;
- GroupNorm's statistics in two fp32 passes over chunks of 256 pixels (`tf_md_group_part`, `tf_md_group_finish`), then
the scale and the SiLU (`tf_md_norm`);
- attention as a materialized fp32 score matrix: `tf_md_gemm` for q k^T, `tf_md_softmax` for the rows, `tf_md_gemm`
for the values, one head of 384 scaled by 1/sqrt(384).

Its scratch is Metal's five picture tensors at the widest stage (4.0 GB at 1024x1024) and the score matrix (1.0 GB).
`tf-moss-image-decoder VAE_DIR LATENTS OUT WIDTH HEIGHT` writes the picture before the clamp.

`moss_image_decoder_records.zig` holds the seven kernels' thirteen launches' geometry and five-SM usage receipts,
measured. `zig/tests/cuda/contract_moss_image_decoder_*.zig` puts each kernel under gates 1-4, with its outputs
against float64 at its rounding points and a planted control that gate 3 must catch.

## Prompt encoder

`cuda_encoder.zig` runs the text model as the Metal encoder does: 32 layers, full attention every fourth (`isFull`),
Gated DeltaNet elsewhere, then the final norm. Its own kernels are `moss_image_encoder.cu`'s, each a port of
`moss_image_encoder.metal`'s:

`zig/tests/cuda/contract_moss_image*.zig` registers the four kernels in each form the family launches, and the head-128
attention:
- `tf_me_norm`: Qwen3.5's zero-centered RMSNorm, `bf16(x rsqrt(mean x^2 + eps) (1 + w))`, one rounding;
- `tf_me_head`: each 256-wide head's RMSNorm, then the first 64 channels turned by the bf16 rotary tables
(`bf16(v cos) + bf16(partner sin)`), or the head copied for v;
- `tf_me_attention`: causal GQA (16 heads over 4), head dim 256, fp32 scores and online softmax;
- `tf_me_gate`: the attention rows gated by the second half of each 512-wide `q_proj` head;
- `tf_me_silu_mul`, `tf_me_conv`: the MLP's product and the 4-tap causal conv with its SiLU;
- `tf_me_gdn_prep`, `tf_me_gdn`: the delta rule's q/k norms, `beta` and `g`, then the recurrence in fp32;
- `tf_me_gated_norm`: the delta net's gated norm over each 128-wide head.

- each output is checked against float64 at the kernel's bf16 points, in the range its fp32 steps allow (IEEE division
and square root, two ulps for `expf` and `tanhf`);
- shapes are the served ones (4,106 to 4,188 joint rows, 10 to 63 prompt rows, widths 3,072 and 8,192) and the tiles'
edges; the attention runs all 24 heads at the prompt lengths and two at the joint lengths;
- five controls each drop one bf16 rounding point (the norm's, the modulation's, the rotary's, the sigmoid's and the
gate's), and gate 3 must catch each;
- the attention is checked against `contract_attn.zig`'s float64 reference; its gate 4 uses P x V sums that fp16 or bf16
sums would miss.
The projections are cuBLASLt bf16 GEMMs with fp32 sums, as the transformer's are; the rotary tables, the epsilons and
the rounding points are Metal's, computed on the host where Metal computes them there.

Gate 5's records are in `moss_image_cuda_records.zig` (sm_80, 86, 89, 120 and 121; the same on nvcc 13.0, 13.2 and
13.3, so no later release needs a set of its own).
`tf-moss-image-encoder MODEL_DIR CASE [PROMPT_FILE]` takes a case from `moss_image_case.py encode`: it checks the ids,
then runs each layer and the final norm alone on the float32 run's input, each gated against float32 within twice
torch bf16's own cosine and worst-row distance on the same input, then encodes the whole prompt twice and compares it
with both torch runs and itself.

`tf-cuda-test moss-contract` on a GB10 (nvcc 13.0 and 13.2) and an RTX 5090 (nvcc 13.3):
On a GB10 (sm_121, nvcc 13.0), the 33-row prompt of `case/prompt.txt`:

```
SUMMARY moss image: 8 kernels, 8 pass gates 1-4, 0 fail; 5 controls: 5 red as planted, 0 missed
NVIDIA GB10: 33 tokens, the same ids as the tokenizer's: true; loaded in 5.6 s
layer 0 alone (delta ): float32 1-cosine 4.52e-6 of 9.06e-6, worst row 0.00628 (row 30) of 0.01252, torch bf16 0.00626 (row 30): pass
...
layer 31 alone (attention): float32 1-cosine 7.95e-6 of 1.63e-5, worst row 0.00555 (row 0) of 0.01110, torch bf16 0.00555 (row 0): pass
final norm alone: float32 1-cosine 2.80e-6 of 5.59e-6, worst row 0.00264 (row 7) of 0.00528, torch bf16 0.00264 (row 7): pass
whole prompt, not gated: each layer against torch bf16's, cosine 0.999865 or more; the final rows against float32, 1-cosine 8.99e-5, worst row 0.03532 (row 0), torch bf16's 8.40e-5, 0.03301 (row 30)
encoded again in 0.078 s, the same bytes: true
PASS every step within its gate, repeated byte for byte
```

`moss_image_encoder_records.zig` holds the nine launches' geometry and five-SM usage receipts, measured.
`zig/tests/cuda/contract_moss_image_encoder_*.zig` puts each kernel under gates 1-4, with its outputs against float64
at its rounding points and a planted control that gate 3 must catch.

## Kernel contract

`zig/tests/cuda/contract_moss_image*.zig` registers all 24 kernels the family launches: the transformer's eight (the
norm plain and modulated, q and k's RMSNorm and rotary over separate projections and over packed rows, the situ gate
over (hidden | gate) rows and over two buffers, the gate add, and the head-128 attention), the decoder's seven
(`tf_md_unpack`, `tf_md_gemm`, `tf_md_conv3x3`, `tf_md_group_part`, `tf_md_group_finish`, `tf_md_norm`,
`tf_md_softmax`) and the encoder's nine, one suite each (`tf_me_norm`, `tf_me_head`, `tf_me_attention`, `tf_me_gate`,
`tf_me_silu_mul`, `tf_me_conv`, `tf_me_gdn_prep`, `tf_me_gdn`, `tf_me_gated_norm`):

- each output is checked against float64 at its rounding points, in the range its fp32 steps allow (IEEE division
and square root, two ulps for `expf`, `logf` and `tanhf`);
- shapes are the served ones: the transformer's 4,106 to 4,188 joint rows, 10 to 63 prompt rows and 3,072 and 8,192
widths, its attention all 24 heads at the prompt lengths and two at the joint lengths; the encoder's 10 to 33 prompt
rows, 16 query heads of 256 over 4 key-value heads and 16 key heads of 128 over 32 value heads; the tiles' edges as
well;
- 21 controls each drop or move one step of the kernel's arithmetic, and gate 3 must catch each: the transformer's
five (the norm's, the modulation's, the rotary's, the sigmoid's and the gate add's), the decoder's seven (its two
biases, the unpack's mean, the group's centred squares and dropped channels, beta and the score scale), and the
encoder's nine (its two `(1 + w)`, the score scale, the silu, the gated norm's weight, the decay, the up projection,
and beta's and the sigmoid's fp32);
- the transformer's and the encoder's attention are checked against `contract_attn.zig`'s float64 reference; their
gate 4 uses P x V sums that fp16 or bf16 sums would miss.

Gate 5's records are in `moss_image_cuda_records.zig` for the transformer (sm_80, 86, 89, 120 and 121; the same on nvcc
13.0, 13.2 and 13.3, so no later release needs a set of its own), `moss_image_decoder_records.zig` for the decoder and
`moss_image_encoder_records.zig` for the encoder, all of them measured.

`tf-cuda-test moss-contract` on a GB10 (nvcc 13.0 and 13.2), and on an RTX 5090 (sm_120, nvcc 13.3) as reported by
the tester who ran it there:

```
SUMMARY moss image: 24 kernels, 24 pass gates 1-4, 0 fail; 21 controls: 21 red as planted, 0 missed
```

Both runs cover all 24 kernels: the transformer's eight with the decoder's seven and the encoder's nine. The older
RTX 5090 receipts under "Measured" are the transformer alone, from before the encoder and the decoder were ported,
so they count its own kernels and the head-128 attention, not this 24-kernel set.

## Run a case

```sh
hf download OpenMOSS-Team/MOSS-Image-Base --revision 85975793d8b3d432f1b6e27f352abaa4c2a4c0d3 --local-dir MODEL_DIR
python3 tools/zig/moss_image_case.py case MODEL_DIR case/ --prompt-file prompt.txt --device cuda
zig build install -Doptimize=ReleaseFast -Dnvcc=/usr/local/cuda/bin/nvcc -Dsm=121 # -Dsm=120 for an RTX 5090
zig-out/bin/tf-moss-image-encoder MODEL_DIR case/encoder.safetensors prompt.txt
zig-out/bin/tf-moss-image MODEL_DIR/transformer case/case.safetensors case/
zig-out/bin/tf-moss-image-decoder MODEL_DIR/vae case/latents.f32 case/zig_vae.f32 1024 1024
python3 tools/zig/moss_image_case.py decode MODEL_DIR case/latents.f32 case/zig.png --device cuda
python3 tools/zig/moss_image_case.py compare case/reference.png case/zig.png case/side.png
```
Expand Down Expand Up @@ -108,7 +198,15 @@ Results on a DGX Spark (GB10, sm_121, 121 GB unified memory, nvcc 13.2):
- **Image:** our latents through the pipeline's decoder are 45.93 dB PSNR from the pipeline's own picture for the fox
and 32.76 dB for the sticky note (its handwritten text the same; fine detail such as cabinet handles differs, as on
Metal: 50 guided steps magnify bf16 rounding).
- **Repeat:** the same step twice, another between, gives identical bytes; two runs of a case give identical latents.
- **Repeat:** the same step twice, another between, gives identical bytes; two runs of a case give identical latents,
and two decodes of one latents file give identical bytes.
- **Decoder**, the fox's final latents (1024x1024), against the publisher's decode of the same latents in float64 on the
CPU and in float32 on this card:
- Ours: mean |diff| 3.766e-7 and max 1.568e-5 from float64 before the clamp; 138 of 3,145,728 8-bit values differ
from float64's, each by 1.
- torch's own float32 decode here (its convolutions at TF32's noise level): mean |diff| 8.288e-5 from float64's,
33,300 of 3,145,728 8-bit values differ by 1. Ours differs from it by what it differs from float64 by.
- Speed, one session: 3.67 s a decode (3.67 s on the GPU), 0.4 s loading.
- **Speed**, the GPU otherwise idle, the median of a case's 100 forwards:
- torch bf16: 1.402 s a forward for the fox, 1.477 s for the sticky note.
- Ours: 0.690 s and 0.700 s, 2.03x and 2.11x torch's (69.6 s and 70.6 s for 50 guided steps). 0.2 s for both
Expand Down
16 changes: 16 additions & 0 deletions zig/build/cuda.zig
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,22 @@ pub fn hostTests(b: *std.Build, draft_ids: *std.Build.Module, build_options: *st
const safety = b.step("test-kv-safety-host", "Actual native KV startup budget and paged constructors under allocation/completion faults");
for ([_]*std.Build.Module{ native, mods.nemotron, mods.qwen35 }) |m| safety.dependOn(&b.addRunArtifact(b.addTest(.{ .root_module = m, .filters = &.{"kv safety:"} })).step);
b.step("test-cache-capacity-host", "Startup cache capacity facts and warnings without a GPU").dependOn(&b.addRunArtifact(b.addTest(.{ .root_module = native, .filters = &.{"cache capacity:"} })).step);
// MOSS-Image's stopped engine logs at err, which the test runner counts as a failure: this check runs it as an exe
const moss_stopped = b.addExecutable(.{ .name = "moss-out-of-service-check", .root_module = b.createModule(.{
.root_source_file = b.path("zig/src/native/moss_out_of_service_check.zig"),
.target = host,
.optimize = .debug,
.link_libc = true,
.imports = &.{
.{ .name = "cuda", .module = cuda },
.{ .name = "engine_api", .module = mods.api },
.{ .name = "moss_image", .module = native.import_table.get("moss_image").? },
.{ .name = "tokenizer", .module = native.import_table.get("tokenizer").? },
},
}) });
const moss_stopped_run = b.addRunArtifact(moss_stopped);
step.dependOn(&moss_stopped_run.step);
b.step("test-moss-out-of-service", "MOSS-Image's stopped engine logs its reason at err without a GPU").dependOn(&moss_stopped_run.step);
b.step("test-snap-fork-host", "CUDA prompt-cache rules: no fork marks unless a family sets snap_fork, its marks when it does").dependOn(&b.addRunArtifact(b.addTest(.{ .root_module = native, .filters = &.{"snap fork:"} })).step);
b.step("test-snap-hooks-host", "CUDA prompt-cache hooks: a family's spare, trim and reuses reach the store").dependOn(&b.addRunArtifact(b.addTest(.{ .root_module = native, .filters = &.{"snap hooks:"} })).step);
@import("disk_identity_host.zig").steps(b, native, step);
Expand Down
3 changes: 3 additions & 0 deletions zig/build/cuda_engines.zig
Original file line number Diff line number Diff line change
Expand Up @@ -92,5 +92,8 @@ pub fn engines(b: *std.Build, target: std.Build.ResolvedTarget, optimize: std.bu
},
});
mod.addImport("qwen4", @import("qwen4.zig").module(b, target, optimize, core));
// MOSS-Image's picture host: the family module (denoiser, encoder, decoder, noise, schedule, PNG) and tokenizer
mod.addImport("moss_image", b.createModule(.{ .root_source_file = b.path("zig/src/families/moss_image/cuda.zig"), .target = target, .optimize = optimize, .link_libc = true, .imports = &.{ .{ .name = "cuda", .module = cuda }, .{ .name = "core", .module = core } } }));
mod.addImport("tokenizer", core.import_table.get("tokenizer").?);
return .{ .api = api, .engines = mod, .canon = canon, .verbs = verbs };
}
2 changes: 2 additions & 0 deletions zig/build/cuda_kernels.zig
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,8 @@ pub const kernels = [_]Kernel{
.{ .name = "vit", .flags = glue }, // ours: vision towers' LayerNorm, Linear epilogues, activations, unshuffle
.{ .name = "moss_image", .flags = glue }, // ours: MOSS-Image's modulated norm, q/k rotary, situ, gated add
.{ .name = "nemo_audio", .flags = glue }, // ours: Nemotron Transcribe's audio encoder glue and head-64 attention
.{ .name = "moss_image_decoder", .flags = glue }, // ours: MOSS-Image's fp32 decoder (unpack, convolutions, norms)
.{ .name = "moss_image_encoder", .flags = glue }, // ours: MOSS-Image's prompt encoder (Qwen3.5 norms, rotary, delta rule)
.{ .name = "tree_round", .flags = &.{"-O3"} }, // ours: verified tree rounds for every family (cuda/tree_round.zig)
.{ .name = "act_rows", .flags = &.{"-O3"} }, // ours: SwiGLU, output gates, group sums (cuda/act_rows.zig)
.{ .name = "gemma4_ple", .flags = &.{"-O3"} }, // ours: Gemma 4 E-series per-layer inputs (gemma4/cuda_ple.zig)
Expand Down
3 changes: 2 additions & 1 deletion zig/build/moss_image_teacher_host.zig
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,9 @@ fn generateSteps(b: *std.Build, all: *std.Build.Step) void {
fn compileCuda(b: *std.Build) void {
const cuda = @import("cuda_runtime.zig").runtime(b, b.graph.host, .Debug, &.{});
const core = b.createModule(.{ .root_source_file = b.path("zig/src/core/root.zig"), .target = b.graph.host, .link_libc = true });
const tokenizer = b.createModule(.{ .root_source_file = b.path("zig/src/core/tokenizer/tokenizer.zig"), .target = b.graph.host, .link_libc = true });
const moss = b.createModule(.{ .root_source_file = b.path("zig/src/families/moss_image/cuda.zig"), .target = b.graph.host, .link_libc = true, .imports = &.{ .{ .name = "cuda", .module = cuda }, .{ .name = "core", .module = core } } });
const root = b.createModule(.{ .root_source_file = b.path("zig/tests/moss_image_cuda.zig"), .target = b.graph.host, .link_libc = true, .imports = &.{ .{ .name = "cuda", .module = cuda }, .{ .name = "core", .module = core }, .{ .name = "moss_image", .module = moss } } });
const root = b.createModule(.{ .root_source_file = b.path("zig/tests/moss_image_cuda.zig"), .target = b.graph.host, .link_libc = true, .imports = &.{ .{ .name = "cuda", .module = cuda }, .{ .name = "core", .module = core }, .{ .name = "tokenizer", .module = tokenizer }, .{ .name = "moss_image", .module = moss } } });
const exe = b.addExecutable(.{ .name = "moss-teacher-cuda-compile", .root_module = root });
b.step("compile-moss-teacher-cuda", "Compile the MOSS CUDA teacher CLI without kernel images or execution").dependOn(&exe.step);
}
Expand Down
Loading
Loading