fix(build): guard CUDA driver probe out of HIP builds - #480
Merged
0xShug0 merged 1 commit intoSep 7, 2026
Merged
Conversation
ggml-hip publicly defines GGML_USE_CUDA for its consumers (hipified CUDA sources), so attention_fallback.cpp compiled the CUDA driver API probe (cuDeviceGet/cuDeviceGetAttribute) in HIP builds too, where no libcuda exists to link against. Every HIP link of the runtime then fails with undefined symbols. Define ENGINE_GGML_HIP_BACKEND on engine_core when ENGINE_ENABLE_HIP is on and use it to compile the probe out. HIP devices are named "ROCmN" and were already skipped by the runtime name check, so behavior on HIP is unchanged: the probe stays fail-open and flash attention remains enabled.
Owner
|
@IIIIIllllIIIIIlllll Good catch! PR merged. |
gqf2008
added a commit
to gqf2008/audio.cpp
that referenced
this pull request
Sep 7, 2026
ENGINE_BUILD_TESTS is OFF by default so CI never compiled or ran the unittest suite. Configure with ENGINE_BUILD_TESTS=ON and run ctest after the main targets on the three CMake-driven workflows; build_windows.ps1 gains a -RunTests switch (forces tests ON, builds remaining targets, runs ctest) instead of hardcoding it into the release presets. Rebased after the test-gate split (0xShug0#480-era): the noisy utility/perf tests now live behind ENGINE_BUILD_EXTENDED_TESTS / MODEL_TESTS, so the plain unit gate runs clean with no per-test exclusions.
0xShug0
pushed a commit
that referenced
this pull request
Sep 7, 2026
ENGINE_BUILD_TESTS is OFF by default so CI never compiled or ran the unittest suite. Configure with ENGINE_BUILD_TESTS=ON and run ctest after the main targets on the three CMake-driven workflows; build_windows.ps1 gains a -RunTests switch (forces tests ON, builds remaining targets, runs ctest) instead of hardcoding it into the release presets. Rebased after the test-gate split (#480-era): the noisy utility/perf tests now live behind ENGINE_BUILD_EXTENDED_TESTS / MODEL_TESTS, so the plain unit gate runs clean with no per-test exclusions.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I haven't updated the program for a while. Today when I pulled the latest branch and compiled with ROCm, I got an error. Upon investigation, I found that a recent commit caused a conflict. Here is a fix patch that bypasses the CUDA-related paths when building with HIP/ROCm.
see also: #423
AI usage: Kimi k3