# lemonade-sdk/llamacpp-rocm architecture

> Architecture diagram of the GitHub repository lemonade-sdk/llamacpp-rocm, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/lemonade-sdk/llamacpp-rocm
- Repository: https://github.com/lemonade-sdk/llamacpp-rocm

## Overview

This repository delivers nightly llama.cpp builds accelerated by ROCm, rather than hosting the inference engine itself. Its documented user path is to download a platform/GPU-targeted release, extract it, and run llama-server with a GGUF model. The tree identifies build, smoke-test, and failure-alert workflows; README describes the published build matrix and bundled runtime. The sampled utility gathers missing ROCm libraries for llama-server, but its wiring to the workflows is not established by the available source.

Main entry points: [`.github/workflows/build-llamacpp-rocm.yml`](https://github.com/lemonade-sdk/llamacpp-rocm/blob/main/.github/workflows/build-llamacpp-rocm.yml) (Build workflow), [`utils/gather_required_libs.py`](https://github.com/lemonade-sdk/llamacpp-rocm/blob/main/utils/gather_required_libs.py) (Library gatherer), [`.github/workflows/test-llamacpp-rocm.yml`](https://github.com/lemonade-sdk/llamacpp-rocm/blob/main/.github/workflows/test-llamacpp-rocm.yml) (Build smoke test), [`.github/workflows/nightly-failure-alert.yml`](https://github.com/lemonade-sdk/llamacpp-rocm/blob/main/.github/workflows/nightly-failure-alert.yml) (Nightly failure alert)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_automation["Build automation"]
  node_build_workflow["Build workflow"]
  node_test_workflow["Build smoke test"]
  node_test_action["Test action<br/>[action.yml]"]
  node_failure_workflow["Nightly failure alert"]
end

subgraph group_runtime["Build inputs"]
  node_lib_gatherer["Library gatherer"]
  node_llama_cpp["llama.cpp"]
  node_therock["ROCm TheRock"]
  node_hip["HIP"]
end

subgraph group_delivery["Download and use"]
  node_release[("Release builds")]
  node_llama_server["llama-server"]
end

node_maintainers(("Maintainers"))
node_user(("Build user"))
node_gguf_model["GGUF model"]
node_gpu["Supported AMD GPU"]

node_build_workflow -->|"builds with"| node_llama_cpp
node_build_workflow -->|"includes runtime"| node_therock
node_build_workflow -->|"targets"| node_hip
node_build_workflow -->|"publishes"| node_release
node_test_workflow -->|"uses"| node_test_action
node_failure_workflow -->|"alerts"| node_maintainers
node_lib_gatherer -->|"runs"| node_llama_server
node_lib_gatherer -->|"searches libraries"| node_therock
node_lib_gatherer -->|"copies libraries beside"| node_llama_server
node_user -->|"downloads"| node_release
node_user -->|"runs"| node_llama_server
node_user -->|"supplies"| node_gguf_model
node_llama_server -->|"accelerates inference"| node_gpu

click node_build_workflow "https://github.com/lemonade-sdk/llamacpp-rocm/blob/main/.github/workflows/build-llamacpp-rocm.yml"
click node_test_workflow "https://github.com/lemonade-sdk/llamacpp-rocm/blob/main/.github/workflows/test-llamacpp-rocm.yml"
click node_test_action "https://github.com/lemonade-sdk/llamacpp-rocm/blob/main/.github/actions/test-llamacpp-build/action.yml"
click node_failure_workflow "https://github.com/lemonade-sdk/llamacpp-rocm/blob/main/.github/workflows/nightly-failure-alert.yml"
click node_lib_gatherer "https://github.com/lemonade-sdk/llamacpp-rocm/blob/main/utils/gather_required_libs.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_build_workflow,node_test_workflow,node_test_action,node_failure_workflow,node_user toneBlue
class node_lib_gatherer,node_llama_cpp,node_therock,node_hip toneAmber
class node_release,node_llama_server toneMint
class node_maintainers,node_gguf_model,node_gpu toneIndigo
```

## Components

### Build automation

- [Build workflow](https://github.com/lemonade-sdk/llamacpp-rocm/blob/main/.github/workflows/build-llamacpp-rocm.yml): `.github/workflows/build-llamacpp-rocm.yml`
- [Build smoke test](https://github.com/lemonade-sdk/llamacpp-rocm/blob/main/.github/workflows/test-llamacpp-rocm.yml): `.github/workflows/test-llamacpp-rocm.yml`
- [Test action](https://github.com/lemonade-sdk/llamacpp-rocm/blob/main/.github/actions/test-llamacpp-build/action.yml): `.github/actions/test-llamacpp-build/action.yml`
- [Nightly failure alert](https://github.com/lemonade-sdk/llamacpp-rocm/blob/main/.github/workflows/nightly-failure-alert.yml): `.github/workflows/nightly-failure-alert.yml`

### Build inputs

- [Library gatherer](https://github.com/lemonade-sdk/llamacpp-rocm/blob/main/utils/gather_required_libs.py): `utils/gather_required_libs.py`
- **llama.cpp**
- **ROCm TheRock**
- **HIP**

### Download and use

- **Release builds**
- **llama-server**

### Other components

- **Maintainers**
- **Build user**
- **GGUF model**
- **Supported AMD GPU**

## Connections

- Build workflow → llama.cpp: builds with
- Build workflow → ROCm TheRock: includes runtime
- Build workflow → HIP: targets
- Build workflow → Release builds: publishes
- Build smoke test → Test action: uses
- Nightly failure alert → Maintainers: alerts
- Library gatherer → llama-server: runs
- Library gatherer → ROCm TheRock: searches libraries
- Library gatherer → llama-server: copies libraries beside
- Build user → Release builds: downloads
- Build user → llama-server: runs
- Build user → GGUF model: supplies
- llama-server → Supported AMD GPU: accelerates inference
