Skip to content

Conversation

SteelPh0enix
Copy link

@SteelPh0enix SteelPh0enix commented Sep 2, 2025

Currently, Nix flake for llama-cpp-rocm doesn't build due to missing lld and objcopy executables. This MR fixes it by adding them to package list.

Additionally, this MR:

  • Provides correct mpi package depending on selected backend
  • Provides builsAllCudaFaQuants parameter to enable building all flash attention quants for CUDA and ROCm builds.
  • Provides rocmUseWmma to add ROCWMMA_FATTN support, enabled by default.
  • Updates outdated CMAKE_HIP_ARCHITECTURES with AMDGPU_TARGETS
  • Provides enableUma parameter to enable UMA support for CUDA/ROCm platforms

In order to enable WMMA support, i had to add a CMake variable and tweak the build script to provide a way of setting the path to include directory manually - otherwise CMake could not find the headers and failed the build

I've tested building the flake with/without ROCm and MPI support and it works fine now and produces working llama-server.

@github-actions github-actions bot added nix Issues specific to consuming flake.nix, or generally concerned with ❄ Nix-based llama.cpp deployment devops improvements to build systems and github actions labels Sep 2, 2025
@SteelPh0enix SteelPh0enix force-pushed the nix-rocm-tweaks branch 5 times, most recently from 452acd8 to 72b59e4 Compare September 2, 2025 18:19
@SteelPh0enix SteelPh0enix marked this pull request as draft September 2, 2025 18:33
@github-actions github-actions bot added the ggml changes relating to the ggml tensor library for machine learning label Sep 2, 2025
@SteelPh0enix SteelPh0enix marked this pull request as ready for review September 2, 2025 18:50
@SteelPh0enix SteelPh0enix force-pushed the nix-rocm-tweaks branch 5 times, most recently from 207ada3 to f794bd3 Compare September 5, 2025 08:31
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 ggml changes relating to the ggml tensor library for machine learning nix Issues specific to consuming flake.nix, or generally concerned with ❄ Nix-based llama.cpp deployment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants