Skip to content

ci : bundle HIP runtime DLLs with Windows ROCm release - #26973

Merged
IMbackK merged 5 commits into
ggml-org:masterfrom
slojosic-amd:slojosic-amd/fix-rocm7.14-packaging
Aug 27, 2026
Merged

ci : bundle HIP runtime DLLs with Windows ROCm release#26973
IMbackK merged 5 commits into
ggml-org:masterfrom
slojosic-amd:slojosic-amd/fix-rocm7.14-packaging

Conversation

@slojosic-amd

@slojosic-amd slojosic-amd commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Overview

Copy amdhip64_7.dll , rocm_kpack.dll and amd_comgr.dll next to the llama.cpp binaries so the correct HIP runtime loads over the driver's copy in System32. Fixes #26929.

Requirements

  • I have read and agree with the contributing guidelines
  • AI usage disclosure: YES: I used AI to help me to write the comment section and to better organize the PowerShell copy logic

@slojosic-amd
slojosic-amd requested a review from a team as a code owner August 12, 2026 14:03
@slojosic-amd

Copy link
Copy Markdown
Contributor Author

@superm1 @CISC @IMbackK

@IMbackK

IMbackK commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

what are the compatibility guarantees between the kernel driver and the runtime on windows?

@ggml-gh-bot

This comment was marked as resolved.

@ggml-gh-bot ggml-gh-bot Bot added the draft PR will be changed to draft by github-actions bot label Aug 12, 2026
@github-actions
github-actions Bot marked this pull request as draft August 12, 2026 15:09
@github-actions github-actions Bot removed the draft PR will be changed to draft by github-actions bot label Aug 12, 2026
@dennyiriawan

Copy link
Copy Markdown

The plan is to maintain backward compatibility between the kernel driver and runtime interfaces on Windows.

@github-actions github-actions Bot added the devops improvements to build systems and github actions label Aug 12, 2026
@slojosic-amd
slojosic-amd marked this pull request as ready for review August 12, 2026 18:42
@slojosic-amd

Copy link
Copy Markdown
Contributor Author

@IMbackK @CISC can we proceed with bundling HIP DLLs or you prefer other solution, something like this: ROCm/TheRock#7143

For more context please check: https://github.com/ScottTodd/rocm-workspace/blob/main/reviews/pr7143-review-packet/02-windows-dll-loading-and-rocm.md

@CISC CISC left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please show a successful Release job run.

@IMbackK IMbackK self-assigned this Aug 26, 2026
@IMbackK IMbackK added the need feedback Testing and feedback with results are needed label Aug 26, 2026
Copy amdhip64_7 and rocm_kpack next to the binaries so the correct
HIP runtime loads over the driver's copy in System32. Fixes ggml-org#26929.
@slojosic-amd
slojosic-amd force-pushed the slojosic-amd/fix-rocm7.14-packaging branch from f9aefd2 to 99aeb1a Compare August 26, 2026 20:21
@slojosic-amd

Copy link
Copy Markdown
Contributor Author

@IMbackK
IMbackK merged commit 6fdd0ac into ggml-org:master Aug 27, 2026
3 checks passed
DanoPTT added a commit to DanoPTT/llama.cpp that referenced this pull request Aug 28, 2026
This reverts commit 6742e7e.

The upstream step (PR ggml-org#26973) does not fix what our artifact is missing. It
bundles the HIP runtime -- amdhip64_7.dll, rocm_kpack.dll, amd_comgr.dll --
but an unpacked f711 artifact still reports no device, because the missing
pieces are rocBLAS/hipBLASLt and their Tensile kernel directories. Verified on
b10665: --list-devices printed "(none)" with the bundled DLLs present, and
still printed "(none)" with them moved aside.

We fill those in with patch-rocm-runtime.ps1 from a single reference tree
(b10400) so rocBLAS stays constant across measured arms, which also means the
bundled DLLs must be kept out of the way to avoid a version mismatch. They
only cost ~140 MB per zip.

Binaries are unaffected -- this only changes artifact packaging.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014sv3jRGzvPZZpr1uFQegyb
DanoPTT added a commit to DanoPTT/llama.cpp that referenced this pull request Aug 28, 2026
Update the fork description for the current production branch
(f711-rdna-b10665-chatfix, rebased onto upstream b10665) and document the
rebase procedure the stack is held to: which commits were dropped, the one
conflict that needed a real merge (rope.cu), and the three gates that follow a
hand-written merge.

Also record why the CI artifact still needs the ROCm runtime patched in, and
why upstream PR ggml-org#26973 does not replace that step.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014sv3jRGzvPZZpr1uFQegyb
@slojosic-amd

slojosic-amd commented Aug 28, 2026

Copy link
Copy Markdown
Contributor Author

@IMbackK @CISC @taronaeo @superm1 @dennyiriawan thank you for your review and feedback.

There is one more very important thing to mention: users still have to install appropriate ROCm 7.14/10.0 build and to add ROCM_BIN path to system's PATH because hipblas/rocblas/hipblaslt dlls and kernel files are not bundled with llama.cpp binaries.

Mandatory steps (please note that #27803 has to be merged first in order to use ROCm 10.0 install instructions and also example links used here are for gfx1151 (Strix Halo) but users should adapt commands to match their GPU target):

image image

On Ubuntu, similar steps are mandatory:

If ROCm installation and post-installation steps are handled correctly, these (or similar) issues should be resolved:

@superm1

superm1 commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Just a thought - what about if we had a Powershell script that we distributed with the artifact to help do this for people and the guidance is to launch llama.cpp with the Powershell script?

Also - if we do this with a script, I doubt that those variables need to be set as admin. The entire thing should be doable as a user. Basically these steps in the script:

  1. Check for %USERPROFILE%\TheRock
  2. If missing, wget/curl and extract there.
  3. Set up env variables.
  4. Launch llama-server.

The script could then be treated as a llama.cpp wrapper. Any arguments passed to it could be passed directly to llama-server.

thecodacus pushed a commit to thecodacus/llama.cpp that referenced this pull request Sep 7, 2026
Copy amdhip64_7, amd_comgr and rocm_kpack next to the binaries so the correct
HIP runtime loads over the driver's copy in System32. Fixes ggml-org#26929.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

devops improvements to build systems and github actions need feedback Testing and feedback with results are needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Misc. bug: Pre-built Windows ROCm binary does not detect GPU

6 participants