fix(llama-cpp-rocm): wire rocwmma include path for hipcc

rocwmma is header-only and ships no CMake config file, so
find_package(rocwmma) is not available. hipcc/clang also bypass the
nixpkgs cc-wrapper that would normally pick up headers from
buildInputs, so the rocwmma path was unreachable and the build failed
with:

  ggml-cuda/vendors/hip.h: 'rocwmma/rocwmma-version.hpp' file not found

Inject -I<rocwmma>/include via CMAKE_HIP_FLAGS (HIP TUs) and
CMAKE_CXX_FLAGS (C++ TUs that include hip.h transitively).
This commit is contained in:
Harald Hoyer 2026-05-06 09:22:05 +02:00
parent f62e8ac470
commit c9c7f6916a

View file

@ -34,9 +34,13 @@ final: prev: {
channels.unstable.rocmPackages.rocwmma
];
# rocwmma is header-only and ships no CMake config; hipcc/clang
# bypass the cc-wrapper, so inject the include path directly.
cmakeFlags = (prevAttrs.cmakeFlags or [ ]) ++ [
"-DGGML_HIP_ROCWMMA_FATTN=ON"
"-DGGML_HIP_GRAPHS=ON"
"-DCMAKE_HIP_FLAGS=-I${channels.unstable.rocmPackages.rocwmma}/include"
"-DCMAKE_CXX_FLAGS=-I${channels.unstable.rocmPackages.rocwmma}/include"
];
});