Skip to content

Run frontier MoE models on hardware you already own — pure C, zero deps, experts streamed from disk. Tiny engine, immense model. 🐦

C

Merge branch 'dev' into build/makefile-autodeps

Kenneth-Javier Ortigoza58b1941d13eb
diff --cc c/Makefile
index c660212e,cb95e9b2..7915c37a
--- a/c/Makefile
+++ b/c/Makefile
@@@ -1211,10 -1202,32 +1220,38 @@@ ifneq ($(EXE),
.PHONY: qwen36
qwen36: qwen36$(EXE)
endif
+ # Apple METAL=1 engine builds also compile the qpack MLX-affine routed-
+ # expert path (activated at runtime by QWEN36_QPACK=<container dir>); other
+ # builds keep the inline stubs in qwen36_qpack.h and change nothing.
-QWEN36_QPACK_SRC =
++QWEN36_QPACK_OBJ =
+ ifeq ($(METAL),1)
-QWEN36_QPACK_SRC = qwen36_qpack.c qpack.c
++QWEN36_QPACK_OBJ = qwen36_qpack.o qpack.o
+ QWEN36_CFLAGS += -DQWEN36_QPACK
+ endif
++# As objects rather than extra units on qwen36's command line (#1741), with
++# the flags that line gave them.
++qwen36_qpack.o: qwen36_qpack.c .build-config
++ $(CC) $(QWEN36_CFLAGS) -c qwen36_qpack.c -o $@
++qpack.o: qpack.c .build-config
++ $(CC) $(QWEN36_CFLAGS) -c qpack.c -o $@
# Rebuild when CUDA_DLL changes; otherwise an existing CPU-only executable can
# be reported as up to date despite selecting the Windows CUDA DLL tier.
- qwen36$(EXE): qwen36.c $(QWEN36_TIER_OBJ) $(CUDA_OBJ) .build-config
- $(CC) $(QWEN36_CFLAGS) qwen36.c $(QWEN36_TIER_OBJ) $(CUDA_OBJ) -o qwen36$(EXE) $(QWEN36_LDFLAGS)
-qwen36$(EXE): qwen36.c affine_quant.h backend_metal.h qwen36_qpack.h qwen38_vision.h sse41_kernels.h decode_batch.h serve_poll.h cli_args.h qwen36_tier.h expert_ffn.h idot.h st.h json.h compat.h omp_tune.h kv_prefix.h pin_pool.h edge_adapter_internal.h edge_adapters.h edge_runtime.h segment_adapter_internal.h segment_adapters.h segment_runtime.h gsgemv.h qgemv.h $(QWEN36_TIER_SRC) $(QWEN36_QPACK_SRC) $(CUDA_OBJ) $(METAL_OBJ) .build-config
- $(CC) $(QWEN36_CFLAGS) qwen36.c $(QWEN36_TIER_SRC) $(QWEN36_QPACK_SRC) $(CUDA_OBJ) $(METAL_OBJ) -o qwen36$(EXE) $(QWEN36_LDFLAGS)
++qwen36$(EXE): qwen36.c $(QWEN36_TIER_OBJ) $(QWEN36_QPACK_OBJ) $(CUDA_OBJ) $(METAL_OBJ) .build-config
++ $(CC) $(QWEN36_CFLAGS) qwen36.c $(QWEN36_TIER_OBJ) $(QWEN36_QPACK_OBJ) $(CUDA_OBJ) $(METAL_OBJ) -o qwen36$(EXE) $(QWEN36_LDFLAGS)
+
+ # Qwen-Image-2.1 text-to-image (docs/qwen-image.md). It reads the diffusers
+ # checkpoint as it is: no conversion step. qi_gemm.h is its one matrix kernel.
+ ifneq ($(EXE),)
+ .PHONY: qwenimage
+ qwenimage: qwenimage$(EXE)
+ endif
-qwenimage$(EXE): qwenimage.c qi_gemm.h qwenimage_vae.h qwenimage_preview.h st.h json.h tok.h tok_unicode.h tok_unicode_o200k.h tok_unicode_deepseek.h qwen38_nfc.h qwen38_nfc_tables.h serve_poll.h compat.h .build-config
++qwenimage$(EXE): qwenimage.c .build-config
+ $(CC) $(CFLAGS) qwenimage.c -o qwenimage$(EXE) $(LDFLAGS)
+
+ # In make check: every format and ragged edges against the naive product, and
+ # the int8 x int8 VNNI path against the exact integer sum.
-tests/test_qi_gemm$(EXE): tests/test_qi_gemm.c qi_gemm.h
++tests/test_qi_gemm$(EXE): tests/test_qi_gemm.c
+ $(CC) $(CFLAGS) $< -o $@ $(LDFLAGS)
# DeepSeek V4.1 Flash: one file, like every other portable engine. The fp4 experts
# stream from the official checkpoint and quant.h's mxfp4 kernel reads them as they
@@@ -1278,26 -1292,41 +1315,47 @@@ qwen38-tier-engine-check: qwen38-tiny-f
# Context-size gates: KV layout, growth across requests, and the attention
# capacity. Includes qwen36.c directly, so no model file is needed.
-# Same tier sources as the engine: the test includes qwen36.c, so with CUDA=1
-# it needs qwen36_tier.c and the backend object too (without CUDA, the header's
+# Same tier objects as the engine: the test includes qwen36.c, so with CUDA=1
+# it links qwen36_tier.o and the backend object too (without CUDA, the header's
# inline stubs cover it and both are empty).
-tests/test_qwen36_ctx$(EXE): tests/test_qwen36_ctx.c gsgemv.h qgemv.h sse41_kernels.h qwen36.c qwen38_vision.h expert_ffn.h qwen36_tier.h st.h json.h compat.h $(QWEN36_TIER_SRC) $(CUDA_OBJ)
- $(CC) $(CFLAGS) $< $(QWEN36_TIER_SRC) $(CUDA_OBJ) -o $@ $(LDFLAGS)
+tests/test_qwen36_ctx$(EXE): tests/test_qwen36_ctx.c qwen36.c $(QWEN36_TIER_OBJ) $(CUDA_OBJ)
+ $(CC) $(CFLAGS) $< $(QWEN36_TIER_OBJ) $(CUDA_OBJ) -o $@ $(LDFLAGS)
# CACHE_ROUTE: route_select() against a residency table, no model needed.
-tests/test_qwen36_cache_route$(EXE): tests/test_qwen36_cache_route.c gsgemv.h qgemv.h sse41_kernels.h qwen36.c qwen38_vision.h expert_ffn.h qwen36_tier.h st.h json.h compat.h $(QWEN36_TIER_SRC) $(CUDA_OBJ)
- $(CC) $(CFLAGS) $< $(QWEN36_TIER_SRC) $(CUDA_OBJ) -o $@ $(LDFLAGS)
+tests/test_qwen36_cache_route$(EXE): tests/test_qwen36_cache_route.c qwen36.c $(QWEN36_TIER_OBJ) $(CUDA_OBJ)
+ $(CC) $(CFLAGS) $< $(QWEN36_TIER_OBJ) $(CUDA_OBJ) -o $@ $(LDFLAGS)
-tests/test_qwen36_dense_batch$(EXE): tests/test_qwen36_dense_batch.c gsgemv.h qgemv.h sse41_kernels.h qwen36.c qwen38_vision.h expert_ffn.h qwen36_tier.h st.h json.h compat.h $(QWEN36_TIER_SRC) $(CUDA_OBJ)
- $(CC) $(QWEN36_CFLAGS) $< $(QWEN36_TIER_SRC) $(CUDA_OBJ) -o $@ $(QWEN36_LDFLAGS)
+tests/test_qwen36_dense_batch$(EXE): tests/test_qwen36_dense_batch.c qwen36.c $(QWEN36_TIER_OBJ) $(CUDA_OBJ)
+ $(CC) $(QWEN36_CFLAGS) $< $(QWEN36_TIER_OBJ) $(CUDA_OBJ) -o $@ $(QWEN36_LDFLAGS)
+ # CPU gate: the qpack MLX-affine routed-expert glue (qwen36_qpack.c)
+ # against the portable affine reference, on a synthesized container -- no
+ # GPU, every platform. The Apple parity twin (Metal vs CPU reference on a
+ # real Swiftlet-generated fixture) is the qwen36-metal-test target.
-tests/test_qwen36_qpack$(EXE): tests/test_qwen36_qpack.c qwen36.c gsgemv.h qgemv.h sse41_kernels.h qwen38_vision.h expert_ffn.h qwen36_qpack.c qwen36_qpack.h qpack.c qpack.h affine_quant.h qwen36_tier.h st.h json.h compat.h $(QWEN36_TIER_SRC) $(CUDA_OBJ) $(METAL_OBJ)
- $(CC) $(QWEN36_CFLAGS) -DQWEN36_QPACK $< qwen36_qpack.c qpack.c $(QWEN36_TIER_SRC) $(CUDA_OBJ) $(METAL_OBJ) -o $@ $(QWEN36_LDFLAGS)
-
-tests/test_qwen36_json_escape$(EXE): tests/test_qwen36_json_escape.c gsgemv.h qgemv.h sse41_kernels.h qwen36.c qwen38_vision.h expert_ffn.h qwen36_tier.h st.h json.h compat.h $(QWEN36_TIER_SRC) $(CUDA_OBJ)
- $(CC) $(QWEN36_CFLAGS) $< $(QWEN36_TIER_SRC) $(CUDA_OBJ) -o $@ $(QWEN36_LDFLAGS)
++tests/test_qwen36_qpack$(EXE): tests/test_qwen36_qpack.c qwen36.c tests/qwen36_qpack.o tests/qpack_qwen36.o $(QWEN36_TIER_OBJ) $(CUDA_OBJ) $(METAL_OBJ)
++ $(CC) $(QWEN36_CFLAGS) -DQWEN36_QPACK $< tests/qwen36_qpack.o tests/qpack_qwen36.o $(QWEN36_TIER_OBJ) $(CUDA_OBJ) $(METAL_OBJ) -o $@ $(QWEN36_LDFLAGS)
++# qwen36_qpack.c and qpack.c as objects, compiled with the flags this test gave
++# them on the same command line before (#1741): one unit per command.
++tests/qwen36_qpack.o: qwen36_qpack.c .build-config
++ $(CC) $(QWEN36_CFLAGS) -DQWEN36_QPACK -c qwen36_qpack.c -o $@
++tests/qpack_qwen36.o: qpack.c .build-config
++ $(CC) $(QWEN36_CFLAGS) -DQWEN36_QPACK -c qpack.c -o $@
++
+tests/test_qwen36_json_escape$(EXE): tests/test_qwen36_json_escape.c qwen36.c $(QWEN36_TIER_OBJ) $(CUDA_OBJ)
+ $(CC) $(QWEN36_CFLAGS) $< $(QWEN36_TIER_OBJ) $(CUDA_OBJ) -o $@ $(QWEN36_LDFLAGS)
+ # Dense-bridge gate: qwen36's loader against an MLX affine
+ # model.safetensors (the dense half of a Swiftlet qpack container) --
+ # `language_model.` name resolution, U32 triple indexing, checked Q4/Q8
+ # expansion, refusals. With argv it doubles as the round-trip harness for
+ # tests/test_make_qwen36_qpack_snap.py.
-tests/test_qwen36_dense_affine$(EXE): tests/test_qwen36_dense_affine.c qwen36.c affine_quant.h qwen36_tier.h st.h json.h compat.h $(QWEN36_TIER_SRC) $(CUDA_OBJ)
- $(CC) $(QWEN36_CFLAGS) $< $(QWEN36_TIER_SRC) $(CUDA_OBJ) -o $@ $(QWEN36_LDFLAGS)
++tests/test_qwen36_dense_affine$(EXE): tests/test_qwen36_dense_affine.c qwen36.c $(QWEN36_TIER_OBJ) $(CUDA_OBJ)
++ $(CC) $(QWEN36_CFLAGS) $< $(QWEN36_TIER_OBJ) $(CUDA_OBJ) -o $@ $(QWEN36_LDFLAGS)
+
# Both tokenizer.json merge spellings ("a b" strings and ["a","b"] pairs)
# must index the same merge table; the pair form is what Qwen3.6 ships.
-tests/test_qwen36_tok_merges$(EXE): tests/test_qwen36_tok_merges.c gsgemv.h qgemv.h sse41_kernels.h qwen36.c qwen38_vision.h expert_ffn.h qwen36_tier.h st.h json.h compat.h $(QWEN36_TIER_SRC) $(CUDA_OBJ)
- $(CC) $(QWEN36_CFLAGS) $< $(QWEN36_TIER_SRC) $(CUDA_OBJ) -o $@ $(QWEN36_LDFLAGS)
+tests/test_qwen36_tok_merges$(EXE): tests/test_qwen36_tok_merges.c qwen36.c $(QWEN36_TIER_OBJ) $(CUDA_OBJ)
+ $(CC) $(QWEN36_CFLAGS) $< $(QWEN36_TIER_OBJ) $(CUDA_OBJ) -o $@ $(QWEN36_LDFLAGS)
# A byte-counted serving payload may end mid-character; the pre-tokenizer must
# not read past it. qwen38 already gates this (tests/test_qwen38_tokenizer.c).
@@@ -1368,16 -1396,19 +1426,19 @@@ endi
portable:
$(MAKE) colibri$(EXE) ARCH=$(PORTABLE_ARCH)
-iobench$(EXE): iobench.c compat.h
+iobench$(EXE): iobench.c
$(CC) $(CFLAGS) iobench.c -o iobench$(EXE) $(LDFLAGS)
+ qpack-inspect$(EXE): qpack_inspect.c qpack.c qpack.h affine_quant.h json.h compat.h
+ $(CC) $(CFLAGS) qpack_inspect.c qpack.c -o qpack-inspect$(EXE) $(LDFLAGS)
+
-tests/test_serve_sentinel$(EXE): tests/test_serve_sentinel.c compat.h serve_codec.h
+tests/test_serve_sentinel$(EXE): tests/test_serve_sentinel.c
$(CC) $(CFLAGS) $< -o $@ $(LDFLAGS)
-tests/test_cluster_protocol$(EXE): tests/test_cluster_protocol.c sse41_kernels.h colibri.c oracle.h st.h uring.h json.h tok.h tok_unicode.h tok_unicode_deepseek.h compat.h grammar.h tier.h quant.h fp8_format.h idot.h sample.h kv_persist.h telemetry.h route_trace.h $(VK_OBJ)
+tests/test_cluster_protocol$(EXE): tests/test_cluster_protocol.c colibri.c $(VK_OBJ)
$(CC) $(CFLAGS) $< $(VK_OBJ) -o $@ $(LDFLAGS)
-tests/test_ue8m0$(EXE): tests/test_ue8m0.c st.h json.h compat.h
+tests/test_ue8m0$(EXE): tests/test_ue8m0.c
$(CC) $(CFLAGS) $< -o $@ $(LDFLAGS)
# Compiles the engine with -DCOLI_XDNA so the QT side pointer, its reset helper
@@@ -1482,6 -1505,15 +1543,15 @@@ qwen38-vision-check: tests/test_qwen38_
$(PYTHON) tools/make_qwen38_vision_tiny.py --out ./qwen38_vision_tiny
./tests/test_qwen38_vision$(EXE) ./qwen38_vision_tiny
+ # Qwen-Image-2.1 VAE decoder against diffusers. The fixture needs torch and
+ # diffusers (tools/make_qwenimage_vae_tiny.py OUTDIR, about 6 MB); the test itself
+ # is plain C: make test_qwenimage_vae && tests/test_qwenimage_vae OUTDIR
-tests/test_qwenimage_vae$(EXE): tests/test_qwenimage_vae.c qwenimage_vae.h qi_gemm.h st.h json.h compat.h
++tests/test_qwenimage_vae$(EXE): tests/test_qwenimage_vae.c
+ $(CC) $(CFLAGS) $< -o $@ $(LDFLAGS)
+
+ .PHONY: test_qwenimage_vae
+ test_qwenimage_vae: tests/test_qwenimage_vae$(EXE)
+
# Il percorso completo: frame IMAGE, torre, sostituzione degli embedding,
# generazione. Prova che due immagini diverse danno risposte diverse, che e'
# l'unica domanda a cui una fixture con pesi casuali sa rispondere onestamente.
@@@ -1789,25 -1808,30 +1859,42 @@@ tests/test_router_nan$(EXE): tests/test
tests/test_i4_acc512$(EXE): tests/test_i4_acc512.c
$(CC) $(CFLAGS) $< -o $@ $(LDFLAGS)
-tests/test_compat_direct$(EXE): tests/test_compat_direct.c compat.h
+tests/test_compat_direct$(EXE): tests/test_compat_direct.c
$(CC) $(CFLAGS) $< -o $@ $(LDFLAGS)
-tests/test_expert_store_ops$(EXE): tests/test_expert_store_ops.c expert_store.h tensor.h
+tests/test_expert_store_ops$(EXE): tests/test_expert_store_ops.c
$(CC) $(CFLAGS) $< -o $@ $(LDFLAGS)
-tests/test_native_quant$(EXE): tests/test_native_quant.c sse41_kernels.h deepseek_v4.c native_quant.h tensor.h quant.h fp8_format.h idot.h
- $(CC) $(CFLAGS) -DCOLI_V4_UNIT_NATIVE_QUANT deepseek_v4.c $< -o $@ $(LDFLAGS)
+tests/test_native_quant$(EXE): tests/test_native_quant.c tests/deepseek_v4_native_quant.o
+ $(CC) $(CFLAGS) -DCOLI_V4_UNIT_NATIVE_QUANT tests/deepseek_v4_native_quant.o $< -o $@ $(LDFLAGS)
+# deepseek_v4.c as its own object, compiled with the flags this test gave it on
+# the same command line before (#1741): one unit per command keeps each .d whole.
+tests/deepseek_v4_native_quant.o: deepseek_v4.c .build-config
+ $(CC) $(CFLAGS) -DCOLI_V4_UNIT_NATIVE_QUANT -c deepseek_v4.c -o $@
+ # Portable MLX affine Q4/Q8 format contract and CPU oracle. This stays
+ # separate from QT fmt=4, whose signed-int4 scale-only layout is incompatible.
-tests/test_affine_quant$(EXE): tests/test_affine_quant.c affine_quant.h backend_metal.h
++tests/test_affine_quant$(EXE): tests/test_affine_quant.c
+ $(CC) $(CFLAGS) $< -o $@ $(LDFLAGS)
+
-tests/test_qpack$(EXE): tests/test_qpack.c qpack.c qpack.h affine_quant.h json.h compat.h
- $(CC) $(CFLAGS) tests/test_qpack.c qpack.c -o $@ $(LDFLAGS)
++tests/test_qpack$(EXE): tests/test_qpack.c tests/qpack.o
++ $(CC) $(CFLAGS) tests/test_qpack.c tests/qpack.o -o $@ $(LDFLAGS)
++# qpack.c as its own object, compiled with the flags this test gave it on the
++# same command line before (#1741): one unit per command keeps each .d whole.
++tests/qpack.o: qpack.c .build-config
++ $(CC) $(CFLAGS) -c qpack.c -o $@
+
+ # Loader-side expansion oracle for the same MLX affine contract: nibble/byte
+ # order, scalar decodings, parity against coli_affine_matmul_ref, refusals.
-tests/test_affine_dequant$(EXE): tests/test_affine_dequant.c affine_quant.h
++tests/test_affine_dequant$(EXE): tests/test_affine_dequant.c
+ $(CC) $(CFLAGS) $< -o $@ $(LDFLAGS)
+
-tests/test_edge_runtime$(EXE): tests/test_edge_runtime.c edge_runtime.c edge_runtime.h
- $(CC) $(CFLAGS) tests/test_edge_runtime.c edge_runtime.c -o $@ $(LDFLAGS)
+tests/test_edge_runtime$(EXE): tests/test_edge_runtime.c tests/edge_runtime.o
+ $(CC) $(CFLAGS) tests/test_edge_runtime.c tests/edge_runtime.o -o $@ $(LDFLAGS)
+# edge_runtime.c as its own object, compiled with the flags this test gave it on
+# the same command line before (#1741): one unit per command keeps each .d whole.
+tests/edge_runtime.o: edge_runtime.c .build-config
+ $(CC) $(CFLAGS) -c edge_runtime.c -o $@
ifeq ($(COLI_V4_SUPPORTED),1)
include Makefile.deepseek-v4.units
@@@ -2457,54 -2504,5 +2546,55 @@@ tests/test_kimi_request_state$(EXE): te
$(CC) $(NOCUDA_CFLAGS) tests/test_kimi_request_state.c $(VK_OBJ) -o tests/test_kimi_request_state$(EXE) $(NOCUDA_LDFLAGS)
# Kimi CUDA dispatch/fallback with a fake backend; no CUDA toolkit required.
-tests/test_kimi_cuda_expert$(EXE): tests/test_kimi_cuda_expert.c sse41_kernels.h kimi_k3.c backend_cuda.h kv_prefix.h serve_codec.h st.h json.h tok.h tok_unicode.h tok_unicode_deepseek.h tok_unicode_o200k.h compat.h quant.h fp8_format.h idot.h omp_tune.h route_trace.h $(VK_OBJ)
+tests/test_kimi_cuda_expert$(EXE): tests/test_kimi_cuda_expert.c kimi_k3.c $(VK_OBJ)
$(CC) $(NOCUDA_CFLAGS) -DCOLI_CUDA $< $(VK_OBJ) -o $@ $(NOCUDA_LDFLAGS)
+
+# ---------------------------------------------------------------------------
+# Generated header prerequisites (#1741)
+#
+# Every rule in AUTODEP_BINS compiles ONE translation unit with $(CFLAGS), so
+# -MMD (added to CFLAGS near the top) leaves a complete <target>.d and the rule
+# does not list headers by hand. The engines and everything under tests/ are
+# derived the same way TEST_RULES is, so a new rule joins automatically; the
+# objects and the ctypes library are named here.
+#
+# A command that compiles several .c files writes a .d for the LAST one only,
+# silently dropping the headers of the others. So a helper source a test links
+# is its own object (the tests/*.o rules, each next to its test), compiled with
+# the flags that test gives it. tests/test_makefile_deps.py fails if a rule in
+# AUTODEP_BINS ever compiles more than one unit.
+#
+# AUTODEP_ELSEWHERE keeps its header lists: test_deepseek_v4 and
+# test_v4_serve_framing are built by Makefile.deepseek-v4, and the four
+# segment/edge adapter tests still compile three units in one command.
+# AUTODEP_OWN_FLAGS does not compile through $(CFLAGS) at all (a GPU compiler,
+# or a benchmark pinned to its own flags), so it writes no .d. The nvcc,
+# MSVC-hosted CUDA, Metal and fuzz targets, and the gcc-built CUDA loader
+# harnesses (dsv4-cuda-*), keep their lists and are not listed here at all.
+#
+# Most rules do not depend on .build-config, so a change to CFLAGS alone would
+# not rebuild a binary made before this change, and it would have no .d. Each
+# target therefore also depends on its own .d through an empty rule: a missing
+# .d counts as out of date, the target is rebuilt, and that compile writes it.
+# The same covers a .d deleted by hand.
+AUTODEP_ELSEWHERE = test_segment_adapters_registration test_segment_adapters_real \
+ test_edge_adapters_registration test_edge_adapters_real test_deepseek_v4 \
+ test_v4_serve_framing
+AUTODEP_OWN_FLAGS = bench_cuda_resident_batch bench_load_tq_peak_rss \
+ bench_indexer_allocations
+ENGINE_RULES := $(foreach n,$(RULE_NAMES),$(if $(findstring /,$(n)),,$(if $(wildcard $(n).c),$(n))))
+AUTODEP_TESTS := $(patsubst tests/%,%,$(filter tests/%,$(RULE_NAMES)))
+AUTODEP_OBJS = backend_vulkan.o backend_loader.o backend_xdna.o qwen36_tier.o \
+ tests/backend_xdna_lane.o tests/edge_runtime.o tests/edge_runtime_nocuda.o \
+ tests/segment_runtime.o tests/segment_runtime_nocuda.o \
+ tests/segment_conformance_fixtures.o tests/deepseek_v4_native_quant.o \
++ qwen36_qpack.o qpack.o tests/qwen36_qpack.o tests/qpack_qwen36.o tests/qpack.o \
+ $(SEGMENT_ALL_OBJS) $(SEGMENT_RUNTIME_OBJS) $(V4_OWNERSHIP_OBJS) $(RANSLIB)
+AUTODEP_BINS = $(addsuffix $(EXE),$(ENGINE_RULES)) \
+ $(addprefix tests/,$(addsuffix $(EXE),$(filter-out $(AUTODEP_ELSEWHERE) \
+ $(AUTODEP_OWN_FLAGS),$(AUTODEP_TESTS)))) \
+ $(AUTODEP_OBJS)
+AUTODEP_DEPS = $(addsuffix .d,$(basename $(AUTODEP_BINS)))
+$(foreach b,$(AUTODEP_BINS),$(eval $(b): $(basename $(b)).d))
+$(AUTODEP_DEPS): ;
+-include $(wildcard $(AUTODEP_DEPS))
diff --cc c/tools/clean.py
index 33c005a4,517b93a9..65b96507
--- a/c/tools/clean.py
+++ b/c/tools/clean.py
@@@ -25,10 -25,7 +25,11 @@@ FILES =
"glm53", "glm53.exe",
"glm", "glm.exe", # pre-rename name of the colibri engine
"iobench", "iobench.exe",
- "backend_cuda.o", "backend_loader.o",
+ "backend_cuda.o", "backend_loader.o", "qwen36_tier.o",
- # VK=1 and XDNA=1 objects. Left behind once their .d is cleaned, an
- # object would sit in the tree with no record of the headers it read.
- "backend_vulkan.o", "backend_xdna.o",
++ # VK=1, XDNA=1 and METAL=1 (qwen36's qpack) objects. Left behind once
++ # their .d is cleaned, an object would sit in the tree with no record of
++ # the headers it read.
++ "backend_vulkan.o", "backend_xdna.o", "qwen36_qpack.o", "qpack.o",
"backend_cuda_test", "backend_cuda_test.exe",
"mxfp4_expert_cuda_test", "mxfp4_expert_cuda_test.exe",
"backend_cuda_bench", "backend_cuda_bench.exe",