forked from bitsandbytes-foundation/bitsandbytes
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* AMD: Clarify diagnostic messages; free up disk space for CI build * Add build job for rocm * Add rocm build script * Copy shared obj file into output_dir * upload build artifacts and enable wheels build * Remove cuda build temporarily * Add ROCm version to .so filename * Add rocm_version to whls build * Revert "Remove cuda build temporarily" This reverts commit 1413c5f. * Add rocm_version env var * Remove thrush header files * Print node info * print cuda node info * Revert "print cuda node info" This reverts commit cdb209a. * Revert "Print node info" This reverts commit 7e9a65c. * Add rocm arch to compile command * Rename .so files to rocm * Update default gpu arch * Skip cpu based igemmlt int tests on ROCm * Update Documentation * Update upstream repo name * Update docs * Update string format Co-authored-by: Aarni Koskela <[email protected]> * Remove pre-release option for torch install * Update pytorch install path Co-authored-by: Titus <[email protected]> * Add messages for Heuristics error * Remove toolcache for disk space * print disk usage * Clean disk space for linux * Fix for ubuntu * Add sudo for apt clean * Update clean up disk list * remove disk usage print * Add BNB_BACKEND variable * Update diagnostic functions for ROCm * Fix tuple error * Fix library detection bug for recursive and symlink cases * fix pre-commit errors * Remove recursive path lib search * Create function for runtime lib patterns * Update logger format Co-authored-by: Aarni Koskela <[email protected]> * Update error reporting Co-authored-by: Aarni Koskela <[email protected]> * Remove commented code Co-authored-by: Aarni Koskela <[email protected]> * Update error reporting Co-authored-by: Aarni Koskela <[email protected]> * Update error reporting * Create hip diagnostics functions * Fix Typo * Fix pre-commit checks --------- Co-authored-by: Aarni Koskela <[email protected]> Co-authored-by: Titus <[email protected]> * check grad before using ipex (bitsandbytes-foundation#1358) * Enable packaging for ROCm 6.2 (bitsandbytes-foundation#1367) * Enable 6.2 build * Update documentation for 6.2.0 pip install * Update for VS2022 17.11 compatibility with CUDA < 12.4 (bitsandbytes-foundation#1341) * Update for VS2022 17.11 compatibility with CUDA < 12.4 * Try again * Enable continuous releases for multi-backend-refactor branch * Update release workflow * Publish continuous release for multi-backend * continuous release: revert wheel renaming due to install err * Revert "continuous release: revert wheel renaming due to install err" This reverts commit 0a2b539. * add dynamic tag-based versioning + git hash for dev vers * docs: update w/ changes from `main` * get tags for dynamic versioning * fine-tune continuous release params * reduce the pkg size + build times for the preview release * refine docs for multi-backend alpha release (bitsandbytes-foundation#1380) * refine docs for multi-backend alpha release * docs: further tweaks to multi-backend alpha docs * docs: further tweaks to multi-backend alpha docs * docs: further tweaks to multi-backend alpha docs * docs: add multi-backend feedback links * docs: add request for contributions * docs: small fixes * docs: small fixes * docs: add info about `main` continuous build * docs: further tweaks to multi-backend alpha docs * docs: further tweaks to multi-backend alpha docs * docs: remove 2 obsolete lines --------- Co-authored-by: pnunna93 <[email protected]> Co-authored-by: Aarni Koskela <[email protected]> Co-authored-by: Titus <[email protected]> Co-authored-by: Matthew Douglas <[email protected]>
- Loading branch information
1 parent
cd7bf21
commit 5e19019
Showing
14 changed files
with
432 additions
and
95 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 |
---|---|---|
|
@@ -58,6 +58,7 @@ jobs: | |
# This job matrix builds the CUDA versions of the libraries for platforms that support CUDA (Linux x64/aarch64 + Windows x64) | ||
## | ||
build-shared-libs-cuda: | ||
if: github.ref_name != 'multi-backend-refactor' | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, windows-latest] | ||
|
@@ -107,7 +108,7 @@ jobs: | |
os: [ubuntu-latest] | ||
arch: [x86_64] | ||
rocm_version: | ||
["6.1.2"] | ||
["6.1.2", "6.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 | ||
|
@@ -116,10 +117,23 @@ jobs: | |
uses: docker/setup-qemu-action@v2 | ||
- name: Clean up disk space | ||
run: | | ||
sudo rm -rf /usr/share/dotnet | ||
sudo rm -rf /opt/ghc | ||
sudo rm -rf "/usr/local/share/boost" | ||
sudo rm -rf "$AGENT_TOOLSDIRECTORY" | ||
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 | ||
- name: Build C++ | ||
run: bash .github/scripts/build-rocm.sh | ||
env: | ||
|
@@ -135,7 +149,7 @@ jobs: | |
build-wheels: | ||
needs: | ||
- build-shared-libs | ||
- build-shared-libs-cuda | ||
# - build-shared-libs-cuda reduce the pkg size + build times for the preview release | ||
- build-shared-libs-rocm | ||
strategy: | ||
matrix: | ||
|
@@ -153,6 +167,13 @@ jobs: | |
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 1 # shallow clone | ||
- name: Fetch tags for dynamic versioning in setup.py | ||
run: | | ||
git fetch --depth=1 origin --tags | ||
echo "Available Git tags:" | ||
git tag -n | ||
- name: Download build artifact | ||
uses: actions/download-artifact@v4 | ||
with: | ||
|
@@ -170,7 +191,8 @@ jobs: | |
python-version: ${{ matrix.python-version }} | ||
cache: pip | ||
- run: pip install build wheel | ||
- run: python -m build . | ||
# for now need to do the below instead of prior `python -m build .`, which didn't allow us to access git tags | ||
- run: python -m build --sdist && python -m build --wheel | ||
- name: Determine and Set Platform Tag, then Tag Wheel | ||
shell: bash | ||
run: | | ||
|
@@ -184,6 +206,45 @@ jobs: | |
path: dist/bitsandbytes-*.whl | ||
retention-days: 7 | ||
|
||
upload-pre-release-wheels: | ||
name: Create release and upload artifacts | ||
runs-on: ubuntu-latest | ||
if: github.ref_name == 'multi-backend-refactor' | ||
permissions: | ||
contents: write | ||
needs: | ||
- build-wheels | ||
steps: | ||
- name: Download and rename artifacts | ||
uses: actions/download-artifact@v4 | ||
with: | ||
path: tmp/ | ||
pattern: "bdist_wheel_*" | ||
merge-multiple: true | ||
- name: Inspect tmp directory after downloading artifacts | ||
run: ls -alFR tmp/ | ||
- name: Move and rename wheel files with pattern replacement | ||
run: | | ||
mkdir -p wheels/ | ||
find tmp/ -type f -name '*.whl' -print0 | while IFS= read -r -d '' wheel; do | ||
wheel_filename=$(basename "$wheel") | ||
# Remove the gith hash, e.g. `+1234567`, for a stable download link on the multi-backend pre-release | ||
cleaned_filename=$(echo "$wheel_filename" | sed -E 's/\+[0-9a-f]{7}-/-/g') | ||
mv "$wheel" "wheels/$cleaned_filename" | ||
done | ||
- name: Inspect wheels directory after renaming files | ||
run: ls -alFR wheels/ | ||
- name: Create release and upload artifacts | ||
uses: softprops/[email protected] | ||
with: | ||
files: wheels/*.whl | ||
prerelease: true | ||
name: Multi-Backend Preview | ||
tag_name: continuous-release_multi-backend-refactor | ||
make_latest: false | ||
draft: false | ||
target_commitish: ${{ github.sha }} | ||
|
||
audit-wheels: | ||
needs: build-wheels | ||
runs-on: ubuntu-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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -151,6 +151,8 @@ dmypy.json | |
# vim | ||
*.swp | ||
|
||
# BNB-specific stuff | ||
dependencies | ||
cuda_build | ||
output/ | ||
bitsandbytes/_version.py |
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.