Skip to content

tests: link backend_vulkan.o into the engine-including tests under VK=1 - #1728

Merged
JustVugg merged 1 commit into
JustVugg:devfrom
crichalchemist:vk-link-colibri-tests
Sep 24, 2026
Merged

JustVugg merged 1 commit into
JustVugg:devfrom
crichalchemist:vk-link-colibri-tests

Conversation

@crichalchemist

Copy link
Copy Markdown
Contributor

Under VK=1, make test-c fails to build 43 test binaries on current dev. 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" or kimi_k3.c compile with $(CFLAGS), which carries -DCOLI_VULKAN under VK=1. They then reference coli_vk_* and fail at link with Undefined symbols. On Linux the same applies to test_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_state and test_kimi_cuda_expert already pass $(VK_OBJ) to the linker but don't list it as a prerequisite. On a clean tree they build before backend_vulkan.o exists: 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 way test_shard_kvb_refuse already links $(CUDA_OBJ). $(VK_OBJ) expands to nothing unless VK=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=1 from a clean tree: 43 build failures on dev a2e578c, 0 with this change. All 43 binaries build and run, with no test failures and 0 compiler warnings.
  • make check (no VK): passes.
  • A scan of every tests/* rule whose prerequisites include an engine with COLI_VULKAN hooks (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 dev independently, so it's split out here.

🤖 Generated with Claude Code

https://claude.ai/code/session_01CH2nj3rLtHa38LWsP4wM6i

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.
Copilot AI lite review requested due to automatic review settings September 24, 2026 03:47

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@JustVugg
JustVugg merged commit d23e362 into JustVugg:dev Sep 24, 2026
29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants