Skip to content

Find hipcub and rocprim in the HIP build - #1186

Merged
0xShug0 merged 1 commit into
0xShug0:mainfrom
apt-install-coffee:fix/nix-hipcub
Nov 3, 2026
Merged

0xShug0 merged 1 commit into
0xShug0:mainfrom
apt-install-coffee:fix/nix-hipcub

Conversation

@apt-install-coffee

Copy link
Copy Markdown
Contributor

The vendored ggml HIP backend compiles every ggml-cuda translation unit, and argsort.cu includes <hipcub/hipcub.hpp> for its radix path over rows wider than 1024 columns. hipcub in turn needs rocprim's headers. Both ship as separate ROCm components, so they are not necessarily next to hip and rocblas, and with the nix packaging the ROCm build did not compile at all.

The build now looks for both with find_package (hipcub, rocprim) and falls back to a header search over CMAKE_INCLUDE_PATH and ${ROCM_PATH}/include for packagers that ship the headers without a CMake config package. The nix package adds rocmPackages.hipcub and rocmPackages.rocprim to the build inputs.

Co-Authored-By: Deepseek v4.1-Flash

The vendored ggml HIP backend compiles every ggml-cuda translation unit, and
argsort.cu includes <hipcub/hipcub.hpp> for its radix path over rows wider than
1024 columns. hipcub in turn needs rocprim's headers. Both ship as separate
ROCm components, so they are not necessarily next to hip and rocblas, and with
the nix packaging the ROCm build did not compile at all.

The build now looks for both with find_package (hipcub, rocprim) and falls
back to a header search over CMAKE_INCLUDE_PATH and ${ROCM_PATH}/include for
packagers that ship the headers without a CMake config package. The nix
package adds rocmPackages.hipcub and rocmPackages.rocprim to the build
inputs.

Co-Authored-By: Deepseek v4.1-Flash
@0xShug0

0xShug0 commented Nov 3, 2026

Copy link
Copy Markdown
Owner

@apt-install-coffee Thanks! Code review only and it looks safe. PR merged!

@0xShug0
0xShug0 merged commit 80eda7e into 0xShug0:main Nov 3, 2026
7 checks passed
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.

2 participants