From c9c7f6916af2d57efd016b0728a1bd28698b8f3f Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 6 May 2026 09:22:05 +0200 Subject: [PATCH] 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/include via CMAKE_HIP_FLAGS (HIP TUs) and CMAKE_CXX_FLAGS (C++ TUs that include hip.h transitively). --- overlays/unstable/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/overlays/unstable/default.nix b/overlays/unstable/default.nix index 4ba1183..47184e5 100644 --- a/overlays/unstable/default.nix +++ b/overlays/unstable/default.nix @@ -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" ]; });