From fc67c1ea087b25ced2342bdc4936529904950dac Mon Sep 17 00:00:00 2001 From: Zbigniew Herman Date: Tue, 25 Aug 2026 10:16:10 +0200 Subject: [PATCH] QVAC-23802 feat[audiogen-ggml]: add an opt-in cuda feature QVAC-23802 landed CUDA for ACE-Step and MiniMax-Music3 in the engine (qvac-ext-lib-whisper.cpp#162) and published it through the ports (qvac-registry-vcpkg#326, which added speech-cpp's cuda feature), but the addon could not select it: its manifest hardcoded speech-cpp[audiogen, vulkan] and exposed only ENABLE_VULKAN, so a CUDA build was unreachable from here. Mirror the existing vulkan plumbing: an ENABLE_CUDA option that appends the cuda manifest feature, which pulls speech-cpp[cuda] and hence ggml-speech[cuda]. Off by default, and excluded on Apple and Android to match speech-cpp's own `supports` expression, so every current build resolves exactly as before. nvcc is needed only on the build host; the runtime needs just the driver. No CUDA-specific staging is required -- the backend install plumbing already iterates GGML_AVAILABLE_BACKENDS. Verified with a vcpkg dry-run (x64-linux, this manifest): the graph resolves to speech-cpp[audiogen,core,cuda,vulkan]@2026-08-24#2 and ggml-speech[core,cuda,vulkan]@2026-08-21. CUDA is additive next to Vulkan, and the engine's validated-GPU preference selects CUDA when both backends are compiled in. Prebuilds stay Vulkan-only: the reusable prebuild workflow provisions a Vulkan SDK (include-vulkan-sdk) and has no CUDA equivalent, so shipping CUDA artifacts needs nvcc on the builders -- shared-CI-infra work, not this package. Co-Authored-By: Claude Opus 5 --- packages/audiogen-ggml/CMakeLists.txt | 5 +++++ packages/audiogen-ggml/vcpkg.json | 14 ++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/packages/audiogen-ggml/CMakeLists.txt b/packages/audiogen-ggml/CMakeLists.txt index ec77e9f373..c3a28e6a22 100644 --- a/packages/audiogen-ggml/CMakeLists.txt +++ b/packages/audiogen-ggml/CMakeLists.txt @@ -2,6 +2,7 @@ cmake_minimum_required(VERSION 3.25) option(BUILD_TESTING "Build tests" OFF) option(ENABLE_VULKAN "Enable Vulkan GPU acceleration" OFF) +option(ENABLE_CUDA "Enable CUDA GPU acceleration (needs nvcc on the build host)" OFF) if(BUILD_TESTING) list(APPEND VCPKG_MANIFEST_FEATURES "tests") @@ -11,6 +12,10 @@ if(ENABLE_VULKAN) list(APPEND VCPKG_MANIFEST_FEATURES "vulkan") endif() +if(ENABLE_CUDA) + list(APPEND VCPKG_MANIFEST_FEATURES "cuda") +endif() + find_package(cmake-bare REQUIRED PATHS node_modules/cmake-bare) find_package(cmake-vcpkg REQUIRED PATHS node_modules/cmake-vcpkg) diff --git a/packages/audiogen-ggml/vcpkg.json b/packages/audiogen-ggml/vcpkg.json index 9da61416a8..234f95eef0 100644 --- a/packages/audiogen-ggml/vcpkg.json +++ b/packages/audiogen-ggml/vcpkg.json @@ -41,6 +41,20 @@ } ], "features": { + "cuda": { + "description": "Enable CUDA GPU acceleration", + "dependencies": [ + { + "name": "speech-cpp", + "version>=": "2026-08-24#2", + "default-features": false, + "features": [ + "cuda" + ], + "platform": "!(osx | ios | android)" + } + ] + }, "tests": { "description": "Build C++ unit tests", "dependencies": [