Skip to content

Commit fad47f2

Browse files
[ROCm] Update build targets (#1788)
* ROCm: Update build targets * Restore disk cleanup
1 parent d3d8e73 commit fad47f2

File tree

2 files changed

+27
-24
lines changed

2 files changed

+27
-24
lines changed

.github/scripts/build-rocm.sh

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,20 @@ declare build_os
44
declare rocm_version
55

66
set -xeuo pipefail
7-
bnb_rocm_arch="gfx90a;gfx942;gfx1100"
7+
bnb_rocm_arch="gfx90a;gfx942;gfx1100;gfx1101"
8+
9+
# ROCm 6.4+ - Add gfx1200/gfx1201. Note we assume >=6.4.1.
10+
[[ "${rocm_version}" == 6.4.* || "${rocm_version}" == 7.*.* ]] && bnb_rocm_arch="${bnb_rocm_arch};gfx1200;gfx1201"
11+
12+
# ROCm 7.0+ - Add gfx950
13+
[[ "${rocm_version}" == 7.*.* ]] && bnb_rocm_arch="${bnb_rocm_arch};gfx950"
14+
815
if [ "${build_os:0:6}" == ubuntu ]; then
9-
image=rocm/dev-ubuntu-22.04:${rocm_version}-complete
10-
echo "Using image $image"
11-
docker run --rm --platform "linux/$build_arch" -i \
12-
-w /src -v "$PWD:/src" "$image" sh -c \
13-
"apt-get update \
16+
image=rocm/dev-ubuntu-22.04:${rocm_version}-complete
17+
echo "Using image $image"
18+
docker run --rm --platform "linux/$build_arch" -i \
19+
-w /src -v "$PWD:/src" "$image" sh -c \
20+
"apt-get update \
1421
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends cmake \
1522
&& cmake -DCOMPUTE_BACKEND=hip -DBNB_ROCM_ARCH=\"${bnb_rocm_arch}\" . \
1623
&& cmake --build ."

.github/workflows/python-package.yml

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -137,30 +137,26 @@ jobs:
137137
matrix:
138138
os: [ubuntu-22.04]
139139
arch: [x86_64]
140-
rocm_version:
141-
["6.1.2", "6.2.4", "6.3.4", "6.4.4", "7.0"]
140+
rocm_version: ["6.2.4", "6.3.4", "6.4.4", "7.0.2"]
142141
runs-on: ${{ matrix.os }}
143142
steps:
144143
- uses: actions/checkout@v4
145144
- name: Clean up disk space
146145
run: |
146+
echo "Disk space before cleanup:"
147+
df -h
148+
149+
# These are the biggest disk space hogs.
147150
sudo rm -rf \
148-
/usr/share/dotnet \
149-
/opt/ghc \
150-
"/usr/local/share/boost" \
151-
"$AGENT_TOOLSDIRECTORY" \
152-
/opt/hostedtoolcache \
153-
/opt/google/chrome \
154-
/opt/microsoft/msedge \
155-
/opt/microsoft/powershell \
156-
/opt/pipx \
157-
/usr/lib/mono \
158-
/usr/local/julia* \
159-
/usr/local/lib/android \
160-
/usr/local/lib/node_modules \
161-
/usr/local/share/chromium \
162-
/usr/local/share/powershell \
163-
/usr/share/swift
151+
/opt/hostedtoolcache/CodeQL \
152+
/usr/lib/dotnet \
153+
/usr/lib/jvm \
154+
/usr/local/.ghcup \
155+
/usr/local/lib/android \
156+
/usr/share/swift
157+
158+
echo "Disk space after cleanup:"
159+
df -h
164160
- name: Build C++
165161
run: bash .github/scripts/build-rocm.sh
166162
env:

0 commit comments

Comments
 (0)