Skip to content

feat(nix): add ROCm/HIP backend support - #162

Merged
0xShug0 merged 1 commit into
0xShug0:mainfrom
francescobozzo:feature/nix-rocm
Jul 30, 2026
Merged

feat(nix): add ROCm/HIP backend support#162
0xShug0 merged 1 commit into
0xShug0:mainfrom
francescobozzo:feature/nix-rocm

Conversation

@francescobozzo

Copy link
Copy Markdown
Contributor

Summary

This PR adds the ROCm build target through the nix build system introduced in #48 . It also refactors flake.nix in multiple nix modules following llama-cpp's approach.

Changes

  • Split flake into .devops/nix/ (package.nix, scope.nix, python-scripts.nix) following llama-cpp's approach
  • All backend flags overridable: this is especially useful to limit the number of gpu targets for ROCm. Example: .override { rocmSupport = true; rocmGpuTargets = ["gfx1151"]; }
  • python-scripts standalone package for model_manager.py
  • Removed vulkan/cuda torch builds in favour of vanilla build as cpu device is enforced
  • Removed x86_64-darwin as no more supported from upstream nixpkgs
  • Added missing numpy dependency in python-scripts
  • Updated docs/build/nixos.md

Tests

On Linux x86:

nix run .#rocm-gfx1151 -- --task tts --model /home/fbozzo/projects/audio.cpp/models/Qwen3-TTS-12Hz-1.7B-Base --backend rocm --text "audio.cpp is running locally." --family qwen3_tts --voice-ref assets/resources/sample.wav --reference-text "Some call me nature. Others call me Mother Nature. I've been here for over 4.5 billion years. 22,500 times longer than you." --out out3.wav

nix shell .#python-scripts -c python3 tools/model_manager.py install supertonic_3

On MacOS:

nix build 'git+https://github.com/francescobozzo/audio.cpp.git?ref=feature/nix-rocm#metal'

@0xShug0
0xShug0 merged commit f32876c into 0xShug0:main Jul 30, 2026
4 checks passed
@0xShug0

0xShug0 commented Jul 30, 2026

Copy link
Copy Markdown
Owner

@francescobozzo Merged, thanks!

@francescobozzo
francescobozzo deleted the feature/nix-rocm branch July 30, 2026 19:43
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