perf(ci): bootstrap Ninja and ROCm lld on lucebox3, prune affine FA units, and cache build deps
Merged
DU
3d ago+169+169+012345678901234567890123456789-33-33-01234567890123456789
Based on main (d552394eb). Reduces lucebox3 CI build overhead without changing test coverage, GitHub check names, or overlapping #1066.
What
-
Bootstrap Ninja and expose ROCm
ld.lldonlucebox3(.github/workflows/ci.yml):- Cause:
lucebox3does not haveninjainstalled on its runnerPATH, soci.yml'scommand -v ninjacheck falls back to GNU Make (build-r9700,build-strix,serve-smoke-amd). Likewise,/opt/rocm/lib/llvm/bin/ld.lldis present on ROCm runners but outside the default runnerPATH, socommand -v ld.lldmisses it and GCC's-fuse-ld=lldcannot resolve it. - Fix: Download SHA256-verified static
ninjav1.12.1 into$HOME/.local/bin/ninja(cached across runs on the self-hosted runner), symlink/opt/rocm/lib/llvm/bin/ld.lldto$HOME/.local/bin/ld.lldwhen present, and prepend$HOME/.local/binto$GITHUB_PATH.
- Cause:
-
Skip unused FlashAttention units and image codecs in
rocmfp-affine-build(.github/workflows/ci.yml,server/deps/llama.cpp/ggml/src/ggml-hip/CMakeLists.txt,server/deps/llama.cpp/ggml/src/ggml-cuda/fattn.cu):- Cause:
rocmfp-affine-buildonly compiles and runs the 3test_rocmfp2_{matmul,mmid,affine}tests, yetggml-hip/CMakeLists.txtunconditionally globsfattn-tile*.cu,fattn-mma*.cu, andfattn-vec*.cu(97 HIP FlashAttention.cuunits) even when-DGGML_CUDA_FA=OFFis passed. - Fix: Gate those
fattn-*.cuglobs (plusfattn-tile.cuandfattn-wmma-f16.cu) onif (GGML_CUDA_FA)inggml-hip/CMakeLists.txt, guard the corresponding extern declarations and dispatch cases inggml-cuda/fattn.cuwith#ifndef GGML_CUDA_NO_FA, and pass-DGGML_CUDA_FA=OFF -DLUCE_IMAGE_CODECS=OFFtorocmfp-affine-build.
- Cause:
-
Persistent build dependency cache on self-hosted runners (
server/cmake/ImageCodecs.cmake,.github/workflows/ci.yml):- Add an optional
LUCE_IMAGE_CODECS_CACHE_DIRcache variable (empty by default, preserving existing behavior for local builds) soImageCodecs.cmakereuses the downloadedlibjpeg-turbotarball (DOWNLOAD_DIR) and hash-verifiedlodepng.{cpp,h}across clean build directories, and forwardCMAKE_C_COMPILER_LAUNCHERintolibjpeg_turbo_external. - Export
LUCE_CI_DEPS_CACHE=$HOME/.cache/lucebox-ci-depsand pass-DFETCHCONTENT_BASE_DIR/-DLUCE_IMAGE_CODECS_CACHE_DIRin thelucebox3anddgx-gb10CMake configures.
- Add an optional
-
Drop dead
-DCMAKE_HIP_FLAGS=-DLUCE_WAVE_SIZE=32(.github/workflows/ci.yml):LUCE_WAVE_SIZEhas zero references anywhere inserver/.
Tests
- Validated
.github/workflows/ci.ymlwithyaml.safe_loadandbash -non all modified shell steps. - Ran
pytest .github/ci/locally (105 passed) and.github/ci/check_commit_messages.py. - Live
lucebox3anddgx-gb10CI runs will verify the full ROCm/CUDA builds and test suites end-to-end.
Known limits, not addressed here
-DLUCE_FA_ALL_QUANTS=OFF,-fuse-ld=lldlinker flags, and single-process CppUnit execution are intentionally omitted from this PR because they were already authored in #1066 (currently onci/optimize-ci-pipeline); exposingld.lldin$HOME/.local/binhere lets #1066'scommand -v ld.lldcheck pick it up automatically once #1066 lands onmain.box_step.shexited/zombie KFD PID self-preemption is tracked separately in #1068.