Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automated PR: Downstream develop rebase new changes #5

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
a23984f
check grad before using ipex (#1358)
jiqing-feng Sep 19, 2024
e8881be
Enable packaging for ROCm 6.2 (#1367)
pnunna93 Sep 20, 2024
0d3d977
Update for VS2022 17.11 compatibility with CUDA < 12.4 (#1341)
matthewdouglas Sep 9, 2024
e72637c
Enable continuous releases for multi-backend-refactor branch
matthewdouglas Sep 26, 2024
662dc60
Update release workflow
matthewdouglas Sep 26, 2024
3227cdd
Publish continuous release for multi-backend
matthewdouglas Sep 26, 2024
0a2b539
continuous release: revert wheel renaming due to install err
Titus-von-Koeller Sep 27, 2024
8c5499e
Revert "continuous release: revert wheel renaming due to install err"
Titus-von-Koeller Sep 27, 2024
02d5b42
add dynamic tag-based versioning + git hash for dev vers
Titus-von-Koeller Sep 27, 2024
6927dcc
docs: update w/ changes from `main`
Titus-von-Koeller Sep 27, 2024
8dcd971
get tags for dynamic versioning
Titus-von-Koeller Sep 27, 2024
09ac7ec
fine-tune continuous release params
Titus-von-Koeller Sep 30, 2024
cc56a30
reduce the pkg size + build times for the preview release
Titus-von-Koeller Sep 30, 2024
5225ebe
refine docs for multi-backend alpha release (#1380)
Titus-von-Koeller Sep 30, 2024
e6cc109
docs: remove 2 obsolete lines
Titus-von-Koeller Oct 1, 2024
cd3cb68
Remove depth option in installation steps (#1395)
pnunna93 Oct 16, 2024
65f4a08
Merge downstream main into tmp-rocm_enabled_multi_backend-20241029 wi…
github-actions[bot] Oct 29, 2024
6a93812
sync instructions
github-actions[bot] Oct 29, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 50 additions & 2 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down Expand Up @@ -148,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:
Expand All @@ -166,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:
Expand All @@ -183,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: |
Expand All @@ -197,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
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,8 @@ dmypy.json
# vim
*.swp

# BNB-specific stuff
dependencies
cuda_build
output/
bitsandbytes/_version.py
5 changes: 5 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,11 @@ if(BUILD_CUDA)
# This needs to be added *before* we try to enable the CUDA language so CMake's compiler check passes.
if(MSVC AND MSVC_VERSION VERSION_GREATER_EQUAL 1940)
string(APPEND CMAKE_CUDA_FLAGS " --allow-unsupported-compiler")

# This is needed to build with VS2022 17.11+ and CUDA < 12.4.
if (MSVC_VERSION VERSION_GREATER_EQUAL 1941)
string(APPEND CMAKE_CUDA_FLAGS " -D_ALLOW_COMPILER_AND_STL_VERSION_MISMATCH")
endif()
endif()

enable_language(CUDA) # This will fail if CUDA is not found
Expand Down
5 changes: 3 additions & 2 deletions bitsandbytes/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

# Import the dynamically generated version from _version.py (see setup.py)
from ._version import __version__ # isort: skip # type: ignore

import torch

from . import research, utils
Expand Down Expand Up @@ -73,5 +76,3 @@
"optim.optimizer.Optimizer8bit": False,
"optim.optimizer.MockArgs": False,
}

__version__ = "0.43.3.dev"
1 change: 1 addition & 0 deletions bitsandbytes/nn/modules.py
Original file line number Diff line number Diff line change
Expand Up @@ -471,6 +471,7 @@ def forward(self, x: torch.Tensor):
and not hasattr(self.weight.quant_state, "op_context")
and self.weight.quant_state.shape[1] % self.weight.quant_state.blocksize == 0
and self.weight.quant_state.quant_type == "nf4"
and x.requires_grad == False
):
enable_ipex_fusion(self.weight, self.weight.quant_state)

Expand Down
5 changes: 3 additions & 2 deletions docs/source/contributing.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@

### Setup pre-commit hooks
- Install pre-commit hooks with `pip install pre-commit`.
- Run `pre-commit autoupdate` once to configure the hooks.
- Re-run `pre-commit autoupdate` every time a new hook got added.
- Run `pre-commit install` once to install the hooks, so they will be run on every commit.
- If the hooks introduce changes, they'll be visible with `git diff`. Review them and `git add` them if everything is fine, then re-execute the before commit, it should pass now.
- If you want to manually trigger the hooks, you may do `pre-commit run --all-files`

Now all the pre-commit hooks will be automatically run when you try to commit and if they introduce some changes, you need to re-add the changed files before being able to commit and push.

Expand Down
Loading
Loading