Skip to content

Add Linux HIP source builds and packaged runtime loading - #36

Merged
andimarafioti merged 4 commits into
mainfrom
hip/source-builds
Oct 9, 2026
Merged

andimarafioti merged 4 commits into
mainfrom
hip/source-builds

Conversation

@andimarafioti

@andimarafioti andimarafioti commented Oct 9, 2026 •

Copy link
Copy Markdown
Owner

Adds Linux HIP source builds and packages the versioned GGML HIP runtime so the installed wrapper can resolve sibling libraries without the native build tree. Refs #35.

The helper accepts --backend hip / QWENTTS_CPP_BACKEND=hip, plus a HIP compiler, GPU architectures, and ROCm prefix. It enables shared libraries and HIP graphs, disables CUDA/Metal/BLAS/native CPU tuning, and requires successful $ORIGIN relocation with patchelf. Dynamic backend configurations are rejected before compilation or replacement of packaged libraries; ordinary linker symlinks to the linked, versioned runtime remain supported. The loader preloads HIP before GGML/libqwen.

The new Linux HIP PR check builds the pinned native source for gfx942 in the digest-pinned ROCm 7.2.4 container on a standard Ubuntu 24.04 GitHub worker. It builds and checks a 0.5.0+rocm724 wheel, verifies ABI layouts, installs the wheel, deletes the native source/build trees, clears library overrides, checks default loading and ELF dependencies, and runs the wrapper suite against the installed runtime. It saves the candidate wheel as a seven-day CI artifact.

smoke_stream.py --require-rocm selects ROCm0 and rejects a missing or non-AMD device before model loading. --full adds buffered synthesis alongside streaming, validates finite, nonsilent mono 24 kHz output, and writes both WAVs. The README documents source installation, the tested environment, external ROCm dependencies, clean installed validation, and the separate local-version strategy.

Validation:

  • Real HIP GitHub check: passed: real compilation, strict wheel metadata check, 17 ABI/helper tests, clean installed loading and ELF dependency checks, then 110 tests passed and 2 skipped against the installed runtime. Candidate wheel artifact..
  • Lightweight Ubuntu CI: 107 tests passed, 5 skipped, including real ELF relocation and an installed fixture wheel with the source/build directories removed.
  • Existing Metal CI: wheel build/repair, pinned ABI checks, and clean installed loading passed.
  • macOS: 108 tests passed, 4 skipped, using the pinned native headers.
  • The installed ELF fixture regression also passed in a clean local Linux amd64 environment with explicit setuptools/wheel build dependencies.
  • git diff --check passes.

The standard Linux worker has no AMD GPU. Device registration and full/streaming synthesis using the new clean-installed wheel remain pending AMD hardware validation; the issue's earlier manual GPU build does not validate this wheel. ROCm runtime libraries and rocBLAS/Tensile assets remain external system dependencies. The CI artifact targets Ubuntu 24.04 / ROCm 7.2.4 / gfx942 and has no manylinux portability claim. No publishing workflow or release metadata changes are included; ROCm publishing remains a follow-up.

@andimarafioti
andimarafioti marked this pull request as ready for review October 9, 2026 13:10
@andimarafioti
andimarafioti merged commit e30340a into main Oct 9, 2026
3 checks passed
@andimarafioti
andimarafioti deleted the hip/source-builds branch October 9, 2026 20:34
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.

1 participant