Skip to content

CMake install manifest not capturing ggml-cuda's private CUDA/cuBLAS/driver link libraries for static Windows builds #79

Open

Description

@SaptaDey

Bug Description

Building with -DTRANSCRIBE_CUDA=ON -DTRANSCRIBE_BUILD_SHARED=OFF (the static posture) produces a transcribe-link.json manifest that omits every CUDA runtime/cuBLAS/driver link dependency ggml-cuda actually needs.

Root cause

transcribe-install.cmake:118 builds the manifest from only the transcribe target's own LINK_LIBRARIES`:

get_target_property(_transcribe_links transcribe LINK_LIBRARIES)

The per-backend translation block right after it (lines 130-139) has explicit cases for metal, blas+APPLE, and vulkan, but no cuda case:

if("metal" IN_LIST _kinds)
    list(APPEND _frameworks Foundation Metal MetalKit)
endif()
if("blas" IN_LIST _kinds AND APPLE)
    list(APPEND _frameworks Accelerate)
endif()
if("vulkan" IN_LIST _kinds)
    list(APPEND _system_libs vulkan)
endif()
# no cuda case

Meanwhile ggml/src/ggml-cuda/CMakeLists.txt:158-183 attaches CUDA's actual link deps to the ggml-cuda target as PRIVATE, so they never show up on transcribe's own property:

  • GGML_STATIC OFF (the default — nothing in transcribe.cpp's CMakeLists.txt or the Rust build.rs ever sets it): CUDA::cudart + CUDA::cublas (line 176)
  • GGML_STATIC ON + WIN32: CUDA::cudart_static + CUDA::cublas (line 161, with your own comment: "As of 12.3.1 CUDA Toolkit for Windows does not offer a static cublas library" cublas is a Windows DLL dependency either way)
  • Unless GGML_CUDA_NO_VMM: CUDA::cuda_driver too (lines 179-182)

Why this only shows up in the static posture

In the shared/dynamic-backends posture, ggml-cuda.dll resolves its own CUDA deps at DLL-link time unaffected. That's presumably why this hasn't surfaced before: the shipped Windows/Linux provider wheels use dynamic-backends, and link_smoke.py's linux+macos coverage doesn't include a CUDA config either way.

System Information

  • Windows 11, MSVC 19.51 (VS 2026 toolset), CUDA Toolkit 13.3, CMake 4.3.4
  • GPU: RTX 4060 (Ada Lovelace, compute capability 8.9)

Activity

  1. cjpais commented on Jul 11, 2026

    @cjpais
    Contributor

    Thanks for the issue, @SaptaDey would you like to submit a PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions