Skip to content

Add HIP build support.#35

Open
Rafa00127 wants to merge 3 commits into
rodrigomatta:mainfrom
Rafa00127:main
Open

Add HIP build support.#35
Rafa00127 wants to merge 3 commits into
rodrigomatta:mainfrom
Rafa00127:main

Conversation

@Rafa00127

@Rafa00127 Rafa00127 commented Jun 4, 2026

Copy link
Copy Markdown

Since ggml already has hip support, so no big changes are needed, just wires it up in the top-level CMakeLists.txt.
Tested on Windows with an AMD GPU (7900 XTX).

Summary by CodeRabbit

  • New Features
    • Added optional HIP backend build configuration. Users can now enable HIP support during the build process to leverage GPU acceleration on compatible AMD systems.

@coderabbitai

coderabbitai Bot commented Jun 4, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 3091b774-c229-4426-82e9-3099e8893a95

📥 Commits

Reviewing files that changed from the base of the PR and between 2c33261 and e193bcb.

📒 Files selected for processing (1)
  • CMakeLists.txt

📝 Walkthrough

Walkthrough

This PR adds HIP (Heterogeneous-compute Interface for Portability) backend support to the CMake build system. A new S2_HIP option gates conditional configuration of the GGML HIP backend, integrates HIP targets into the local-patches dependency chain, and applies GGML_USE_CUDA as a compile definition for HIP-enabled builds.

Changes

HIP Backend Support

Layer / File(s) Summary
HIP build option and target configuration
CMakeLists.txt
Adds S2_HIP CMake option, conditionally enables GGML_HIP and registers ggml-hip in local-patches dependency wiring, and applies GGML_USE_CUDA compile definition to targets when HIP is enabled.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 A rabbit hops through CMake's file,
Adding HIP with quantum style,
One option to compute with grace,
CUDA kernels find their place!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Add HIP build support' directly and accurately summarizes the main change in the pull request, which adds HIP backend build configuration to CMakeLists.txt.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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