Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
19 changes: 15 additions & 4 deletions .github/workflows/test-runner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
platform:
type: string
required: true
description: "Platform: linux-x64, linux-aarch64, windows, macos"
description: "Platform: linux-x64, linux-aarch64, windows, windows-arm64, macos"
backend:
type: string
required: true
Expand Down Expand Up @@ -42,6 +42,7 @@ jobs:
inputs.platform == 'linux-x64' && 'ubuntu-22.04' ||
inputs.platform == 'linux-aarch64' && 'ubuntu-22.04-arm' ||
inputs.platform == 'macos' && 'macos-15' ||
inputs.platform == 'windows-arm64' && 'windows-11-arm' ||
'windows-2025'
}}
outputs:
Expand Down Expand Up @@ -112,6 +113,11 @@ jobs:
TEST_RUNNER="windows-2025"
fi
;;
windows-arm64)
BUILD_OS="windows-11-arm"
ARCH="arm64"
TEST_RUNNER="windows-11-arm"
;;
*)
echo "::error::Unsupported platform: ${{ inputs.platform }}"
exit 1
Expand Down Expand Up @@ -152,8 +158,10 @@ jobs:

# Windows: Setup MSVC (needed for both CPU and CUDA builds)
- name: Setup MSVC
if: inputs.platform == 'windows'
if: startsWith(inputs.platform, 'windows')
uses: ilammy/msvc-dev-cmd@v1.13.0
with:
arch: ${{ inputs.platform == 'windows-arm64' && 'arm64' || 'x64' }}

# Build CPU backend
- name: Build C++
Expand Down Expand Up @@ -198,12 +206,15 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
# Python for Windows ARM64 is only available from 3.12+
python-version: ${{ inputs.platform == 'windows-arm64' && '3.12' || '3.10' }}

# Windows: Setup MSVC for torch.compile
- name: Setup MSVC
if: inputs.platform == 'windows'
if: startsWith(inputs.platform, 'windows')
uses: ilammy/msvc-dev-cmd@v1.13.0
with:
arch: ${{ inputs.platform == 'windows-arm64' && 'arm64' || 'x64' }}

- name: Install torch (nightly)
if: inputs.torch_version == 'nightly'
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/tests-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
strategy:
fail-fast: false
matrix:
platform: [linux-x64, linux-aarch64, macos]
platform: [linux-x64, linux-aarch64, macos, windows-arm64]
# default runners don't have AVX-512 support, but icelake does
cpu_type: ["", icelake]
torch_version: ["2.4.1", "2.12.0"]
Expand All @@ -42,6 +42,12 @@ jobs:
cpu_type: icelake
- platform: macos
cpu_type: icelake
# icelake doesn't apply to windows-arm64
- platform: windows-arm64
cpu_type: icelake
# Windows ARM64 minimum torch version is 2.12.0
- platform: windows-arm64
torch_version: "2.4.1"

include:
# Add aarch64 with torch 2.5.1 instead of 2.4.1
Expand Down
2 changes: 1 addition & 1 deletion docs/source/installation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ pip install -e .
</hfoption>
<hfoption id="Windows (ARM64)">

Requires Visual Studio 2022 with the **ARM64 C++ build tools** component and Python >= **3.12**.
Requires Visual Studio 2022 with the **ARM64 C++ build tools** component, Python >= **3.12**, and PyTorch >= **2.12**.

```bash
git clone https://github.com/bitsandbytes-foundation/bitsandbytes.git && cd bitsandbytes/
Expand Down
Loading