Skip to content

Tags: adromir/llama-cpp-python

Tags

v0.3.19

Toggle v0.3.19's commit message
fix(ci): Apply learnings from working ROCm reference workflow

Key changes derived from a proven working llama.cpp+ROCm build:

1. Compiler path: /opt/rocm/llvm/bin/clang instead of /opt/rocm/bin/amdclang
   - Both point to the same binary, but the llvm path is what cmake's
     HIP language detection searches for via HIP_CLANG_PATH
   - amdclang is just a symlink and cmake may not follow it correctly

2. Full HIP environment variables:
   - HIP_CLANG_PATH=/opt/rocm/llvm/bin  (critical: used by hip-config.cmake)
   - HIP_DEVICE_LIB_PATH=/opt/rocm/lib/llvm/amdgcn/bitcode  (device libs)
   - HIP_INCLUDE_PATH, HIP_LIB_PATH, HIP_PLATFORM=amd
   - LD_LIBRARY_PATH, CPATH for broader linker/compiler visibility

3. GPU_TARGETS added alongside AMDGPU_TARGETS
   - The working reference uses -DGPU_TARGETS= (ggml HIP cmake var)
   - Both passed for maximum compatibility

4. CMAKE_CXX_FLAGS=-I/opt/rocm/include
   - Explicit include path ensures HIP headers are found even if
     cmake's automatic detection misses them

5. Diagnose step enhanced with llvm path checks and device lib check

6. Windows: same GPU_TARGETS flag + explicit include via CMAKE_CXX_FLAGS