-
Notifications
You must be signed in to change notification settings - Fork 668
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #39 from ROCm/enable_rocm_whls
Enable ROCm whls
- Loading branch information
Showing
29 changed files
with
329 additions
and
112 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,21 @@ | ||
#!/bin/bash | ||
declare build_arch | ||
declare build_os | ||
declare rocm_version | ||
|
||
set -xeuo pipefail | ||
bnb_rocm_arch="gfx90a;gfx942;gfx1100" | ||
if [ "${build_os:0:6}" == ubuntu ]; then | ||
image=rocm/dev-ubuntu-22.04:6.1-complete | ||
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 . \ | ||
&& cmake -DCOMPUTE_BACKEND=hip -DBNB_ROCM_ARCH=\"${bnb_rocm_arch}\" . \ | ||
&& cmake --build ." | ||
fi | ||
|
||
#output_dir="output/${build_os}/${build_arch}" | ||
#mkdir -p "${output_dir}" | ||
#(shopt -s nullglob && cp bitsandbytes/*.{so,dylib,dll} "${output_dir}") | ||
output_dir="output/${build_os}/${build_arch}" | ||
mkdir -p "${output_dir}" | ||
(shopt -s nullglob && cp bitsandbytes/*.{so,dylib,dll} "${output_dir}") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -63,12 +63,10 @@ jobs: | |
os: [ubuntu-latest, windows-latest] | ||
arch: [x86_64, aarch64] | ||
cuda_version: | ||
["11.7.1", "11.8.0", "12.0.1", "12.1.1", "12.2.2", "12.3.2", "12.4.0"] | ||
["11.7.1", "11.8.0", "12.0.1", "12.1.1", "12.2.2", "12.3.2", "12.4.1", "12.5.0"] | ||
exclude: | ||
- os: windows-latest # This probably requires arm64 Windows agents | ||
arch: aarch64 | ||
- os: windows-latest # The Jimver/cuda-toolkit is action used for Windows builds is not updated for 12.4 yet. | ||
cuda_version: "12.4.0" | ||
- os: ubuntu-latest # Temporary. Takes too long, not ready yet. | ||
arch: aarch64 | ||
runs-on: ${{ matrix.os }} # One day, we could run them on native agents. Azure supports this now but it's planned only for Q3 2023 for hosted agents | ||
|
@@ -79,7 +77,7 @@ jobs: | |
if: startsWith(matrix.os, 'ubuntu') | ||
uses: docker/setup-qemu-action@v2 | ||
# Windows: We install Cuda on the agent (slow) | ||
- uses: Jimver/[email protected].14 | ||
- uses: Jimver/[email protected].16 | ||
if: startsWith(matrix.os, 'windows') | ||
id: cuda-toolkit | ||
with: | ||
|
@@ -108,6 +106,8 @@ jobs: | |
matrix: | ||
os: [ubuntu-latest] | ||
arch: [x86_64] | ||
rocm_version: | ||
["6.1.2"] | ||
runs-on: ${{ matrix.os }} # One day, we could run them on native agents. Azure supports this now but it's planned only for Q3 2023 for hosted agents | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
@@ -125,10 +125,18 @@ jobs: | |
env: | ||
build_os: ${{ matrix.os }} | ||
build_arch: ${{ matrix.arch }} | ||
rocm_version: ${{ matrix.rocm_version }} | ||
- name: Upload build artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: shared_library_rocm_${{ matrix.os }}_${{ matrix.arch }}_${{ matrix.rocm_version }} | ||
path: output/* | ||
retention-days: 7 | ||
build-wheels: | ||
needs: | ||
- build-shared-libs | ||
- build-shared-libs-cuda | ||
- build-shared-libs-rocm | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, macos-latest, windows-latest] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.