Skip to content

Fix CUDA stream lookup with dynamic ggml backends - #340

Merged
0xShug0 merged 1 commit into
mainfrom
fix/cuda-backend-stream-dl
Aug 29, 2026
Merged

Fix CUDA stream lookup with dynamic ggml backends#340
0xShug0 merged 1 commit into
mainfrom
fix/cuda-backend-stream-dl

Conversation

@0xShug0

@0xShug0 0xShug0 commented Aug 29, 2026

Copy link
Copy Markdown
Owner

Summary

Fixes the non-CPU Docker workflow failure introduced by PR #321. That PR added ggml_backend_cuda_get_stream() and used it from torch_random.cpp through a direct link-time reference. CUDA Docker builds enable ENGINE_ENABLE_CPU_ALL_VARIANTS=ON, which forces GGML_BACKEND_DL=ON, so ggml-cuda is a dynamic backend module and the direct symbol reference is unresolved when linking audiocpp_cli.

This PR keeps the Music3 call site unchanged and routes CUDA stream lookup through the backend proc-address table, matching the existing CUDA hooks for stream priority, graph clearing, and pool trimming.

Validation

  • cmake -S . -B build/debug -DCMAKE_BUILD_TYPE=Debug -DAUDIOCPP_MODEL_SET=full -DENGINE_ENABLE_CPU_ALL_VARIANTS=ON -DENGINE_ENABLE_CUDA=ON -DENGINE_ENABLE_CUDA_GRAPHS=ON -DENGINE_ENABLE_VULKAN=OFF -DENGINE_ENABLE_OPENMP=ON -DAUDIOCPP_BUILD_NATIVE_MODEL_MANAGER=ON -DENGINE_BUILD_EXAMPLES=OFF -DENGINE_BUILD_TESTS=OFF -DENGINE_BUILD_MODEL_TESTS=OFF -DENGINE_BUILD_WARMBENCH=OFF
  • cmake --build build/debug --parallel $(nproc) --target audiocpp_cli
  • cmake --build build/debug --parallel $(nproc) --target audiocpp_server --target audiocpp_model_manager --target model_perf

@0xShug0
0xShug0 merged commit ec4fa59 into main Aug 29, 2026
9 checks passed
@0xShug0
0xShug0 deleted the fix/cuda-backend-stream-dl branch August 29, 2026 16:26
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.

1 participant