Skip to content

fix(coli): --gpu on DeepSeek V4 refused an install with only the DeepGEMM DLL - #1586

Merged
JustVugg merged 1 commit into
JustVugg:devfrom
kevin9327:fix/v4-gpu-accepts-dg-dll
Sep 17, 2026
Merged

JustVugg merged 1 commit into
JustVugg:devfrom
kevin9327:fix/v4-gpu-accepts-dg-dll

Conversation

@kevin9327

Copy link
Copy Markdown

Symptom

On Windows, a DeepSeek V4 install with coli_cuda_dsv4_dg.dll next to deepseek_v4.exe but no coli_cuda_dsv4.dll gets two contradicting answers. That is the DeepGEMM build docs/deepseek-v4.md lists for RTX 50-series:

$ coli doctor --model v4_tiny
[  ok] engine.binary      engine executable is ready
[  ok] accelerator.gpu    GPU engine and devices are available

$ coli run --gpu 0 --model v4_tiny "x"
--gpu needs the CUDA build: build coli_cuda_dsv4.dll (make cuda-dsv4-dll)
(exit 1)

--vram refuses the same way. The engine itself would have loaded that DLL.

Root cause

dsv4_cuda_available in c/coli tests only coli_cuda_dsv4.dll on win32. Two other places accept either DLL:

  • The engine's loader, backend_loader_dsv4.c dsv4_cuda_load, tries coli_cuda_dsv4_dg.dll first and coli_cuda_dsv4.dll second. Either one starts the tier.
  • doctor.cuda_linkage accepts either name for a [DSV4 CUDA] engine.

Fix

On win32, dsv4_cuda_available accepts either of the two names the loader tries, the same pair doctor accepts. Linux and macOS are unchanged, and so is the build hint.

Tests

In c/tests/test_env_defaults.py (Dsv4CudaDetectTest):

  • test_win32_deepgemm_dll_alone_detected: only coli_cuda_dsv4_dg.dll next to the engine is detected.
  • test_win32_unrelated_dll_rejected: a lone coli_cuda.dll (the GLM backend) is still not accepted.
  • _detect takes the DLL name as a parameter. Existing cases keep the old default.

Fail-before on unfixed dev:

FAIL: test_win32_deepgemm_dll_alone_detected (tests.test_env_defaults.Dsv4CudaDetectTest.test_win32_deepgemm_dll_alone_detected)
AssertionError: False is not true
FAILED (failures=1)

Verification

  • tests.test_cli_output, test_cuda_binary_engine, test_env_defaults, test_stop_scope, test_v4_cli (every module that exercises the launcher's GPU gating): 92 tests OK (1 skipped), in the cp949 locale and with PYTHONUTF8=1.
  • End to end, Windows, with deepseek_v4.exe from make -C c deepseek-v4 (gcc 16.2), the tiny checkpoint from tools/make_deepseek_v4_tiny.py, and an empty coli_cuda_dsv4_dg.dll next to the engine:
    • Before the fix, coli run --gpu 0 --ngen 4 --model v4_tiny "x" exits 1 with the refusal above.
    • After the fix, the same command reaches the engine. The engine tries both names, finds no usable backend (the file is a placeholder) and continues on the CPU:
      [DSV4 CUDA] no usable backend DLL (coli_cuda_dsv4_dg.dll / coli_cuda_dsv4.dll); GPU tier disabled (CPU path remains active).
      v4_tokens prompt=1 generated=4 total=5 ...
      
      It exits 0.

🤖 Generated with Claude Code

…GEMM DLL

dsv4_cuda_available checked only coli_cuda_dsv4.dll next to the engine
on Windows. backend_loader_dsv4.c loads coli_cuda_dsv4_dg.dll first and
coli_cuda_dsv4.dll second, and doctor's cuda_linkage accepts either. So
with only the DeepGEMM build installed, `coli doctor` reported the GPU
engine as available while `coli chat/serve/run --gpu` and `--vram`
exited with "--gpu needs the CUDA build".

Accept either name, as the loader and doctor do.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@JustVugg
JustVugg merged commit 56a0984 into JustVugg:dev Sep 17, 2026
28 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.

2 participants