From f463018cd700690336898d109226d489deca036d Mon Sep 17 00:00:00 2001 From: Onur Gündüz Date: Sun, 14 Jun 2026 15:19:12 +0200 Subject: all: add support for Qwen3-Embedding + causal GQA attention --- Makefile | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index f7a3927..f1285aa 100644 --- a/Makefile +++ b/Makefile @@ -162,6 +162,8 @@ TEST_TOKENIZER_SRCS = tests/test_tokenizer.c qwen_tokenizer.c $(KERNEL_SRCS) TEST_SAFETENSORS_SRCS = tests/test_safetensors.c qwen_safetensors.c TEST_BF16_SRCS = tests/test_bf16_model.c embed.c qwen_safetensors.c \ $(KERNEL_SRCS) +TEST_QWEN3_SRCS = tests/test_qwen3.c embed.c qwen_safetensors.c \ + $(KERNEL_SRCS) TEST_WORKSPACE_SRCS = tests/test_workspace.c embed.c qwen_tokenizer.c \ qwen_safetensors.c $(KERNEL_SRCS) TEST_LATE_SRCS = tests/test_late.c embed.c qwen_tokenizer.c \ @@ -188,6 +190,9 @@ test: $(CC) $(TEST_CC_FLAGS) -o tests/test_bf16_model \ $(TEST_BF16_SRCS) -lm -lpthread ./tests/test_bf16_model + $(CC) $(TEST_CC_FLAGS) $(TEST_BLAS_CFLAGS) -o tests/test_qwen3 \ + $(TEST_QWEN3_SRCS) -lm -lpthread $(TEST_BLAS_LDFLAGS) + ./tests/test_qwen3 $(CC) $(TEST_CC_FLAGS) -o tests/test_workspace \ $(TEST_WORKSPACE_SRCS) -lm -lpthread ./tests/test_workspace @@ -226,7 +231,7 @@ COV_FLAGS = -fprofile-instr-generate -fcoverage-mapping -O0 \ -fcoverage-compilation-dir=. COV_BINS = tests/test_kernels_generic tests/test_kernels_blas \ tests/test_tokenizer tests/test_safetensors \ - tests/test_bf16_model tests/test_workspace tests/test_late \ + tests/test_bf16_model tests/test_qwen3 tests/test_workspace tests/test_late \ tests/cli_under_test tests/test_server # Report on project sources only - not the harnesses, vendored deps, or # system headers (cJSON lands under /opt or /usr otherwise). @@ -256,6 +261,9 @@ coverage: $(CC) $(TEST_CC_FLAGS) $(COV_FLAGS) -o tests/test_bf16_model \ $(TEST_BF16_SRCS) -lm -lpthread LLVM_PROFILE_FILE=$(COV_DIR)/bf16_model.profraw ./tests/test_bf16_model + $(CC) $(TEST_CC_FLAGS) $(COV_FLAGS) $(TEST_BLAS_CFLAGS) -o tests/test_qwen3 \ + $(TEST_QWEN3_SRCS) -lm -lpthread $(TEST_BLAS_LDFLAGS) + LLVM_PROFILE_FILE=$(COV_DIR)/qwen3.profraw ./tests/test_qwen3 $(CC) $(TEST_CC_FLAGS) $(COV_FLAGS) -o tests/test_workspace \ $(TEST_WORKSPACE_SRCS) -lm -lpthread LLVM_PROFILE_FILE=$(COV_DIR)/workspace.profraw ./tests/test_workspace @@ -381,6 +389,7 @@ clean: $(TARGET) $(SERVER_TARGET) $(LIB) libembed.dylib libembed.so \ tests/test_kernels_generic tests/test_kernels_blas \ tests/test_safetensors tests/test_bf16_model tests/test_server \ + tests/test_qwen3 \ tests/test_tokenizer tests/test_workspace tests/test_cli tests/test_late \ tests/cli_under_test bench/bench_tokenizer bench/bench_kernels bench/bench_model rm -rf $(COV_DIR) -- cgit v1.3.1