Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: abetlen/llama-cpp-python
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: adromir/llama-cpp-python
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 15 commits
  • 12 files changed
  • 2 contributors

Commits on Apr 1, 2026

  1. ci: Replace all workflows with ROCm-only build & release workflow

    - Removes build-and-release, build-docker, build-wheels-cuda,
      build-wheels-metal, generate-index-from-release, lint,
      publish-to-test, publish, test-pypi and test workflows
    - Adds build-rocm-release.yaml: builds llama-cpp-python wheels
      with hipBLAS/ROCm support for Linux (ubuntu-24.04) and Windows
      (windows-2022) across Python 3.9-3.14
    - Linux: ROCm 7.2.0 via official AMD apt repo (noble)
    - Windows: AMD HIP SDK 7.11 (AMD Software PRO Edition 26.Q1)
      from https://download.amd.com/developer/eula/rocm-hub/AMD-Software-PRO-Edition-26.Q1-Win11-For-HIP.exe
    - Workflow is triggered exclusively by tag pushes (v*)
    - All wheels are uploaded directly to a GitHub Release
    Adromir committed Apr 1, 2026
    Configuration menu
    Copy the full SHA
    b2cda07 View commit details
    Browse the repository at this point in the history
  2. fix(ci): Use amdgpu-install script for ROCm 7.2.1 on Ubuntu 24.04

    The ROCm 7.x plain apt repository no longer exists. Switch to the
    official amdgpu-install helper package method:
    - Download amdgpu-install_7.2.1.70201-1_all.deb from repo.radeon.com
    - Install with: sudo amdgpu-install -y --usecase=rocm --no-dkms
    - Remove explicit hipcc CMAKE_C/CXX_COMPILER flags (hipcc is on PATH)
    Adromir committed Apr 1, 2026
    Configuration menu
    Copy the full SHA
    1b80b75 View commit details
    Browse the repository at this point in the history
  3. fix(ci): Add amdclang compiler flags and ROCm linkage verification

    Linux:
    - Use amdclang/amdclang++ (AMD ROCm-native LLVM/Clang) as C/CXX
      compilers to ensure CMake does not fall back to system GCC, which
      cannot compile HIP device code even with DGGML_HIPBLAS=ON
    - Add AMDGPU_TARGETS (gfx1100, gfx1030, gfx906, gfx908)
    - Add post-build 'Verify ROCm linkage' step: extracts .so from the
      wheel and checks readelf NEEDED section for libhipblas/librocblas;
      fails the job if ROCm linkage is missing
    
    Windows:
    - Add CMAKE_HIP_COMPILER pointing to clang.exe from HIP SDK for
      device code (MSVC remains the host compiler via VS 17 2022)
    - Add AMDGPU_TARGETS matching Linux targets
    Adromir committed Apr 1, 2026
    Configuration menu
    Copy the full SHA
    93beedb View commit details
    Browse the repository at this point in the history
  4. feat(ci): Add RDNA4 GPU targets gfx1200/gfx1201 (RX 9060/9070)

    Add gfx1201 (RX 9060) and gfx1200 (RX 9070) to AMDGPU_TARGETS
    in both the Linux (amdclang) and Windows (HIP clang) build steps.
    
    Full target list: gfx1201, gfx1200, gfx1100, gfx1030, gfx906, gfx908
    Adromir committed Apr 1, 2026
    Configuration menu
    Copy the full SHA
    859b5ee View commit details
    Browse the repository at this point in the history

Commits on Apr 2, 2026

  1. fix(ci): Correct ROCm build verification logic

    The previous check looked for hipblas in the NEEDED section of
    libggml-cpu.so, which always fails because ROCm libs are deliberately
    kept external (not bundled into the wheel).
    
    The correct indicator is the presence of libggml-hip.so inside the
    wheel: llama.cpp compiles one .so per backend and only creates the
    HIP backend when GGML_HIPBLAS=ON with a working HIP compiler.
    Adromir committed Apr 2, 2026
    Configuration menu
    Copy the full SHA
    6663078 View commit details
    Browse the repository at this point in the history
  2. fix(ci): Fix HIP compilation \u2013 add dev packages, compiler flags,…

    … diagnostics
    
    Linux:
    - Install libhipblas-dev, librocblas-dev, hip-dev, rocm-cmake after
      amdgpu-install to ensure CMake modules and headers are available
    - Add CMAKE_HIP_COMPILER=/opt/rocm/bin/amdclang++ so CMake 3.21+
      can enable HIP as a first-class language (without this it silently
      falls back to CPU-only even when GGML_HIPBLAS=ON)
    - Add CMAKE_PREFIX_PATH=/opt/rocm so find_package(hip/hipblas) works
    - Add pre-build diagnostics step (compiler paths, hipBLAS, cmake files)
    
    Windows:
    - CMAKE_HIP_COMPILER now set at runtime in the run block (not in the
      YAML env block) because HIP_PATH is only available after GITHUB_ENV
      is written by the install step
    - Also append CMAKE_PREFIX_PATH=%HIP_PATH% at runtime for the same reason
    Adromir committed Apr 2, 2026
    Configuration menu
    Copy the full SHA
    caacba0 View commit details
    Browse the repository at this point in the history
  3. fix(ci): Explicit hip_DIR cmake vars + non-fatal ROCm verification

    cmake find_package fixes:
    - Add -Dhip_DIR=/opt/rocm/lib/cmake/hip so find_package(hip) always
      finds the config file regardless of CMAKE_PREFIX_PATH search order
    - Add -Dhipblas_DIR and -Drocblas_DIR for the same reason
      (CMAKE_PREFIX_PATH alone is insufficient when ROCm is installed
      via amdgpu-install rather than as a native distro package)
    
    Verification step overhaul:
    - No longer fails the build (addresses the valid point that
      libggml-hip.so may not be installed into the wheel even if HIP
      was compiled, e.g. if it is dlopen'd at runtime)
    - Two-pronged check: (1) libggml-hip.so in wheel, (2) hipblas/rocblas
      in NEEDED section of ANY .so in the wheel
    - Prints a clear warning if neither is found so ROCm issues are
      immediately visible in the Actions log without blocking release
    Adromir committed Apr 2, 2026
    Configuration menu
    Copy the full SHA
    324c444 View commit details
    Browse the repository at this point in the history
  4. fix(ci): Use GGML_HIP=ON instead of GGML_HIPBLAS=ON

    ROOT CAUSE: In ggml 0.9.8 (llama.cpp commit c0159f9c), the cmake option
    for ROCm/HIP support was renamed from GGML_HIPBLAS to GGML_HIP.
    GGML_HIPBLAS no longer exists in this version and was silently ignored,
    causing the build to fall through to CPU-only despite amdclang++ being
    correctly set as the compiler.
    
    Verified in vendor/llama.cpp/ggml/CMakeLists.txt line 207:
      option(GGML_HIP 'ggml: use HIP' OFF)
    
    The resulting backend library is libggml-hip.so, identical name.
    Adromir committed Apr 2, 2026
    Configuration menu
    Copy the full SHA
    6f7990b View commit details
    Browse the repository at this point in the history
  5. 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
    Adromir committed Apr 2, 2026
    Configuration menu
    Copy the full SHA
    5486454 View commit details
    Browse the repository at this point in the history

Commits on Apr 6, 2026

  1. Configuration menu
    Copy the full SHA
    da0ed5e View commit details
    Browse the repository at this point in the history
  2. fix(ci): Resolve ROCm build errors for v0.3.20

    - Linux: Install rocm-device-libs and set CMAKE_HIP_FLAGS=--rocm-path=/opt/rocm
    - Windows: Create C:\hip-sdk junction for space-free ROCm paths breaking MSVC
    Adromir committed Apr 6, 2026
    Configuration menu
    Copy the full SHA
    59ed42f View commit details
    Browse the repository at this point in the history
  3. fix(ci): Resolve Linux __AMDGCN_WAVEFRONT_SIZE error via repo pinning…

    … and compat macros
    Adromir committed Apr 6, 2026
    Configuration menu
    Copy the full SHA
    b793ac9 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    508a377 View commit details
    Browse the repository at this point in the history

Commits on Apr 8, 2026

  1. Configuration menu
    Copy the full SHA
    b709d5f View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    4fbfc01 View commit details
    Browse the repository at this point in the history
Loading