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 remote-tracking branch 'upstream/dev' into feat/hip-single-source

noobdev-phaa62ffdf8c08
diff --cc c/Makefile
index 21d0be8e,af173573..03554762
--- a/c/Makefile
+++ b/c/Makefile
@@@ -234,19 -207,20 +234,20 @@@ LDFLAGS += -framework Metal -framewor
METAL_OBJ = backend_metal.o
endif
- all: glm$(EXE)
+ all: colibri$(EXE)
- # phony 'glm' β†’ 'glm.exe' on Windows (so 'make glm' and 'coli build' work on every platform)
- glm: glm$(EXE)
+ # phony targets β€” 'glm' kept for backward compatibility
+ colibri: colibri$(EXE)
+ glm: colibri$(EXE)
# Config stamp: make only tracks file timestamps, not flag changes. Without this,
- # `make glm.exe CUDA_DLL=1` after a prior CPU-only build reports "up to date" and
- # silently keeps the CPU-only binary (no CUDA loader) β€” a build that looks like it
- # worked but isn't. We record the build-affecting flags in .build-config and rewrite
- # it ONLY when they change (evaluated here at parse time, so the file's timestamp
- # moves exactly when the config moves). glm.exe and the CUDA/loader objects depend
+ # `make colibri.exe CUDA_DLL=1` after a prior CPU-only build reports "up to date"
+ # and silently keeps the CPU-only binary (no CUDA loader) β€” a build that looks like
+ # it worked but isn't. We record the build-affecting flags in .build-config and
+ # rewrite it ONLY when they change (evaluated here at parse time, so the file's
+ # timestamp moves exactly when the config moves). The binary and CUDA/loader objects depend
# on it, so they relink on a config change and stay put otherwise. (#306)
-BUILD_CONFIG := $(CC)|$(CFLAGS)|$(LDFLAGS)|CUDA=$(CUDA)|CUDA_DLL=$(CUDA_DLL)|ARCH=$(ARCH)|CUDA_ARCH=$(CUDA_ARCH)|METAL=$(METAL)
+BUILD_CONFIG := $(CC)|$(CFLAGS)|$(LDFLAGS)|CUDA=$(CUDA)|CUDA_DLL=$(CUDA_DLL)|ARCH=$(ARCH)|CUDA_ARCH=$(CUDA_ARCH)|METAL=$(METAL)|HIP=$(HIP)|HIP_ARCH=$(HIP_ARCH)
BUILD_CONFIG_OLD := $(shell cat .build-config 2>/dev/null)
ifneq "$(BUILD_CONFIG)" "$(BUILD_CONFIG_OLD)"
$(shell printf '%s' '$(BUILD_CONFIG)' > .build-config)
@@@ -423,4 -388,4 +424,4 @@@ clean
bench: iobench$(EXE)
@if [ -n "$(ARGS)" ]; then ./iobench$(EXE) $(ARGS); else echo "built iobench$(EXE) β€” run: ./iobench$(EXE) <file> <MB> <iters> <threads> <direct 0|1>"; fi
- .PHONY: all glm cuda-test hip-test gpu-compile cuda-bench cuda-dll portable test-c test-python test check clean install uninstall bench
-.PHONY: all colibri glm cuda-test cuda-bench cuda-dll portable test-c test-python test check clean install uninstall bench
++.PHONY: all colibri glm cuda-test hip-test gpu-compile cuda-bench cuda-dll portable test-c test-python test check clean install uninstall bench