"git@developer.sourcefind.cn:OpenDAS/ollama.git" did not exist on "0c819e167becd7f08312d2a1a1e2ac8e8ea5d4da"
Unverified Commit 318a86e3 authored by Matthew Douglas's avatar Matthew Douglas Committed by GitHub
Browse files

Add CPU + IPEX to nightly CI (#1667)

* Tests: add linux x64 cpu+ipex to nightly CI workflow

* typo

* Tests: guard linear8bit compile test for ipex cpu issue
parent 945f7c1d
......@@ -161,6 +161,46 @@ jobs:
- name: Run tests
run: pytest --durations=100
test-cpu-ipex:
if: github.repository == 'bitsandbytes-foundation/bitsandbytes'
needs: build-cpu
runs-on: banb-aws-general-8-plus-use1-public-80
env:
BNB_TEST_DEVICE: cpu
steps:
- uses: actions/checkout@v4
- name: Download build artifact
uses: actions/download-artifact@v4
with:
name: lib_cpu_ubuntu-22.04_x86_64
path: bitsandbytes/
merge-multiple: true
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: 3.9
- name: Install dependencies
run: |
pip install torch==2.7.0 --index-url https://download.pytorch.org/whl/cpu
pip install intel_extension_for_pytorch==2.7.0 --extra-index-url https://pytorch-extension.intel.com/release-whl/stable/cpu/us/
pip install -e ".[test]"
pip install pytest-cov
- name: Show installed packages
run: pip list
- name: Show environment information
run: python -m torch.utils.collect_env
- name: IPEX smoke test
run: python -c "import torch; import intel_extension_for_pytorch as ipex; print(torch.__version__); print(ipex.__version__);"
- name: Run tests
run: pytest --durations=100
# test-cuda-aarch64:
# if: github.repository == 'bitsandbytes-foundation/bitsandbytes'
# needs: build-cuda
......@@ -182,8 +222,6 @@ jobs:
# - name: Show pip packages
# run: pip list
test-cuda:
if: github.repository == 'bitsandbytes-foundation/bitsandbytes'
needs: build-cuda
......
......@@ -271,11 +271,14 @@ def test_linear8bitlt_torch_compile(device, threshold, bias, fullgraph, mode):
# Test with gradients. Currently only works with threshold=0.
# Has a strange regression on Linux aarch64 CPU in torch==2.6.0.
# There is also an issue with torch==2.7.0 on x86-64 with IPEX.
is_broken_platform = (
device == "cpu"
and platform.machine() == "aarch64"
and platform.system() == "Linux"
and ((2, 7) > torch.__version__ >= (2, 6))
and (
(platform.machine() == "aarch64" and (2, 6) <= torch.__version__ < (2, 7))
or (platform.machine() == "x86_64" and bnb.functional.ipex_cpu)
)
)
if threshold == 0 and not is_broken_platform:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment