diff --git a/.github/scripts/build-rocm.sh b/.github/scripts/build-rocm.sh index b508fac69..d2cb950d1 100644 --- a/.github/scripts/build-rocm.sh +++ b/.github/scripts/build-rocm.sh @@ -4,13 +4,20 @@ declare build_os declare rocm_version set -xeuo pipefail -bnb_rocm_arch="gfx90a;gfx942;gfx1100" +bnb_rocm_arch="gfx90a;gfx942;gfx1100;gfx1101" + +# ROCm 6.4+ - Add gfx1200/gfx1201. Note we assume >=6.4.1. +[[ "${rocm_version}" == 6.4.* || "${rocm_version}" == 7.*.* ]] && bnb_rocm_arch="${bnb_rocm_arch};gfx1200;gfx1201" + +# ROCm 7.0+ - Add gfx950 +[[ "${rocm_version}" == 7.*.* ]] && bnb_rocm_arch="${bnb_rocm_arch};gfx950" + if [ "${build_os:0:6}" == ubuntu ]; then - image=rocm/dev-ubuntu-22.04:${rocm_version}-complete - echo "Using image $image" - docker run --rm --platform "linux/$build_arch" -i \ - -w /src -v "$PWD:/src" "$image" sh -c \ - "apt-get update \ + image=rocm/dev-ubuntu-22.04:${rocm_version}-complete + echo "Using image $image" + docker run --rm --platform "linux/$build_arch" -i \ + -w /src -v "$PWD:/src" "$image" sh -c \ + "apt-get update \ && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends cmake \ && cmake -DCOMPUTE_BACKEND=hip -DBNB_ROCM_ARCH=\"${bnb_rocm_arch}\" . \ && cmake --build ." diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 857590208..50ee6354b 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -137,30 +137,26 @@ jobs: matrix: os: [ubuntu-22.04] arch: [x86_64] - rocm_version: - ["6.1.2", "6.2.4", "6.3.4", "6.4.4", "7.0"] + rocm_version: ["6.2.4", "6.3.4", "6.4.4", "7.0.2"] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 - name: Clean up disk space run: | + echo "Disk space before cleanup:" + df -h + + # These are the biggest disk space hogs. sudo rm -rf \ - /usr/share/dotnet \ - /opt/ghc \ - "/usr/local/share/boost" \ - "$AGENT_TOOLSDIRECTORY" \ - /opt/hostedtoolcache \ - /opt/google/chrome \ - /opt/microsoft/msedge \ - /opt/microsoft/powershell \ - /opt/pipx \ - /usr/lib/mono \ - /usr/local/julia* \ - /usr/local/lib/android \ - /usr/local/lib/node_modules \ - /usr/local/share/chromium \ - /usr/local/share/powershell \ - /usr/share/swift + /opt/hostedtoolcache/CodeQL \ + /usr/lib/dotnet \ + /usr/lib/jvm \ + /usr/local/.ghcup \ + /usr/local/lib/android \ + /usr/share/swift + + echo "Disk space after cleanup:" + df -h - name: Build C++ run: bash .github/scripts/build-rocm.sh env: