tests: link backend_vulkan.o into the engine-including tests under VK=1 - #1728
Merged
Merged
Conversation
Tests that #include colibri.c or kimi_k3.c compile with $(CFLAGS), which carries -DCOLI_VULKAN under VK=1, so they reference coli_vk_* and fail to link without $(VK_OBJ). On dev that was 38 rules (37 plus the Linux-only test_uring). Six kimi/k3 rules already linked $(VK_OBJ) but did not list it as a prerequisite, so a clean VK=1 test-c built them before backend_vulkan.o existed. Add $(VK_OBJ) as a prerequisite to all of them and link it after $<, the way test_shard_kvb_refuse already links $(CUDA_OBJ). $(VK_OBJ) is empty unless VK=1, so default builds are unchanged. make -k test-c VK=1 on macOS (MoltenVK), clean tree: 43 build failures before, 0 after, no test failures, 0 compiler warnings.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Under
VK=1,make test-cfails to build 43 test binaries on currentdev. The tests themselves are fine; each failure is one of two Makefile gaps.Engine-including tests never link the Vulkan object (37 on macOS, 38 counting Linux). Tests that
#include "colibri.c"orkimi_k3.ccompile with$(CFLAGS), which carries-DCOLI_VULKANunderVK=1. They then referencecoli_vk_*and fail at link withUndefined symbols. On Linux the same applies totest_uring, which macOS skips.Six kimi/k3 rules are missing a prerequisite.
test_k3_mmap,test_kimi_serve_framing,test_kimi_cache_index,test_k3_chat_tools,test_kimi_request_stateandtest_kimi_cuda_expertalready pass$(VK_OBJ)to the linker but don't list it as a prerequisite. On a clean tree they build beforebackend_vulkan.oexists:clang: error: no such file or directory: 'backend_vulkan.o'.Fix. Each of those rules gets
$(VK_OBJ)as a prerequisite, and the 38 link-failing rules also link it right after$<, the waytest_shard_kvb_refusealready links$(CUDA_OBJ).$(VK_OBJ)expands to nothing unlessVK=1, so default builds are unchanged. It's a Makefile-only change.Verification (macOS 13 x86_64, Radeon Pro 580, MoltenVK, MacPorts
libomp):make -k test-c VK=1from a clean tree: 43 build failures ondeva2e578c, 0 with this change. All 43 binaries build and run, with no test failures and 0 compiler warnings.make check(noVK): passes.tests/*rule whose prerequisites include an engine withCOLI_VULKANhooks (colibri.c,kimi_k3.c,glm53.c) found none still missing$(VK_OBJ).I found this while forward-merging #1338, which fixes the same gap for the three qwen38 tests that link the qwen36 tier. The problem exists on
devindependently, so it's split out here.🤖 Generated with Claude Code
https://claude.ai/code/session_01CH2nj3rLtHa38LWsP4wM6i