Open-source speech recognition toolkit for training, inference, streaming ASR, VAD, punctuation, speaker diarization pipelines, and OpenAI-compatible/MCP serving.
Python asraudiochineseemotion-recognitionfunasrmcp-servermultilingual-asropenai-compatible-apiparaformerpunctuationpytorchreal-time-asrspeaker-diarizationspeech-recognitionspeech-to-textstreaming-asrtranscriptionvllmvoice-activity-detectionwhisper-alternative
fix(runtime): bundle Windows CUDA dependencies
LauraGPTc0b0174738b7
diff --git a/.github/workflows/build-llamacpp-binaries.yml b/.github/workflows/build-llamacpp-binaries.ymlindex 9001b9317..925f0d018 100644--- a/.github/workflows/build-llamacpp-binaries.yml+++ b/.github/workflows/build-llamacpp-binaries.yml@@ -135,6 +135,8 @@ jobs:-DGGML_CUDA_FA=OFF-DGGML_CUDA_NCCL=OFF-DGGML_CUDA_GRAPHS=OFF+ -DGGML_OPENMP=OFF+ -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded-DGGML_AVX=OFF-DGGML_AVX2=OFF-DGGML_AVX_VNNI=OFF@@ -159,6 +161,8 @@ jobs:-DGGML_CUDA_FA=OFF-DGGML_CUDA_NCCL=OFF-DGGML_CUDA_GRAPHS=OFF+ -DGGML_OPENMP=OFF+ -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded-DGGML_AVX=OFF-DGGML_AVX2=OFF-DGGML_AVX_VNNI=OFF@@ -250,12 +254,47 @@ jobs:cp build/bin/llama-funasr-* pkg/ 2>/dev/null || truecp build/bin/Release/llama-funasr-* pkg/ 2>/dev/null || truecp README.md download-funasr-model.sh pkg/ 2>/dev/null || true+ if [ "${{ matrix.cuda }}" = "true" ]; then+ cuda_root="$(cygpath -u "$CUDA_PATH")"+ for dll in cublas64_13.dll cublasLt64_13.dll; do+ source_path="$(find "$cuda_root" -type f -iname "$dll" -print -quit)"+ if [ -z "$source_path" ]; then+ echo "Missing CUDA redistributable: $dll" >&2+ exit 1+ fi+ cp "$source_path" pkg/+ done+ license_path="$(find "$cuda_root" -maxdepth 3 -type f \+ \( -iname 'EULA.txt' -o -iname 'LICENSE' \) -print -quit)"+ if [ -z "$license_path" ]; then+ echo "Missing CUDA redistribution license" >&2+ exit 1+ fi+ cp "$license_path" pkg/NVIDIA-CUDA-LICENSE.txt+ fiecho "--- packaged binaries ---"; ls -la pkgif [ "${{ runner.os }}" = "Windows" ]; then7z a "funasr-llamacpp-${{ matrix.name }}.zip" ./pkg/*elsetar czf "funasr-llamacpp-${{ matrix.name }}.tar.gz" -C pkg .fi+ - name: Audit Windows CUDA package dependencies+ if: matrix.cuda+ run: |+ exe="pkg/llama-funasr-sensevoice.exe"+ test -f "$exe"+ test -f pkg/cublas64_13.dll+ test -f pkg/cublasLt64_13.dll+ test -f pkg/NVIDIA-CUDA-LICENSE.txt+ dependencies="$(objdump -p "$exe" | awk '/DLL Name:/ { print $3 }')"+ printf '%s\n' "$dependencies"+ grep -Fxi 'cublas64_13.dll' <<<"$dependencies"+ for dll in MSVCP140.dll VCOMP140.DLL VCRUNTIME140.dll VCRUNTIME140_1.dll; do+ if grep -Fxi "$dll" <<<"$dependencies"; then+ echo "Unexpected dynamic runtime dependency: $dll" >&2+ exit 1+ fi+ done- uses: actions/upload-artifact@v4with:name: funasr-llamacpp-${{ matrix.name }}diff --git a/runtime/llama.cpp/tests/test_release_workflow.py b/runtime/llama.cpp/tests/test_release_workflow.pyindex d6542c462..d191311af 100644--- a/runtime/llama.cpp/tests/test_release_workflow.py+++ b/runtime/llama.cpp/tests/test_release_workflow.py@@ -67,6 +67,20 @@ def test_windows_cuda_build_uses_cuda_toolkit_and_flags():assert "--target \"${{ matrix.build_target }}\"" in workflow+def test_windows_cuda_archives_bundle_runtime_dependencies():+ workflow = WORKFLOW.read_text(encoding="utf-8")++ assert "-DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded" in workflow+ assert "-DGGML_OPENMP=OFF" in workflow+ assert "cublas64_13.dll" in workflow+ assert "cublasLt64_13.dll" in workflow+ assert "NVIDIA-CUDA-LICENSE.txt" in workflow+ assert "Audit Windows CUDA package dependencies" in workflow+ assert "objdump -p" in workflow+ assert "MSVCP140.dll" in workflow+ assert "VCOMP140.DLL" in workflow++def test_linux_vulkan_build_uses_vulkan_sdk_and_flags():workflow = WORKFLOW.read_text(encoding="utf-8")