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
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.bat text eol=crlf
34 changes: 34 additions & 0 deletions .github/scripts/build-xpu-windows.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
set INTEL_DLE_URL=https://registrationcenter-download.intel.com/akdlm/IRC_NAS/75d4eb97-914a-4a95-852c-7b9733d80f74/intel-deep-learning-essentials-2025.1.3.8_offline.exe
set INTEL_DLE_TMP=%RUNNER_TEMP%\intel_dle
set INTEL_DLE_LOG=%RUNNER_TEMP%\intel_dle_log.txt

echo ::group::Intel Deep Learning Essentials Installation
curl -o intel-dle-installer.exe %INTEL_DLE_URL%
start /wait "Intel DLE Install" intel-dle-installer.exe -f %INTEL_DLE_TMP% -l %INTEL_DLE_LOG% --silent -a --eula=accept -p=NEED_VS2022_INTEGRATION=0
type %INTEL_DLE_LOG%
if ERRORLEVEL 1 (
echo Failed to install Intel Deep Learning Essentials
exit /b 1
)
echo ::endgroup::

echo ::group::Build Environment Setup
call "%ProgramFiles(x86)%\Intel\oneAPI\setvars.bat"
cmake -G Ninja -DCOMPUTE_BACKEND=xpu -DCMAKE_BUILD_TYPE=Release .
if ERRORLEVEL 1 (
echo Failed to setup environment
exit /b 1
)
echo ::endgroup::

echo ::group::Building with XPU backend
cmake --build . --config Release
if ERRORLEVEL 1 (
echo Build failed
exit /b 1
)
echo ::endgroup::

set output_dir=output\%build_os%\x86_64
if not exist "%output_dir%" mkdir "%output_dir%"
copy bitsandbytes\*.dll "%output_dir%\" 2>nul
11 changes: 9 additions & 2 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,14 +110,21 @@ jobs:
build-xpu:
strategy:
matrix:
os: [ubuntu-22.04]
os: [ubuntu-22.04, windows-2025]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Build C++
- name: Build C++ (Linux)
if: runner.os == 'Linux'
run: bash .github/scripts/build-xpu.sh
env:
build_os: ${{ matrix.os }}
- name: Build C++ (Windows)
if: runner.os == 'Windows'
run: .github/scripts/build-xpu-windows.bat
shell: cmd
env:
build_os: ${{ matrix.os }}
- name: Upload build artifact
uses: actions/upload-artifact@v4
with:
Expand Down
1 change: 1 addition & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ repos:
- id: mixed-line-ending
args:
- --fix=lf
exclude: '\.bat$'
- repo: https://github.com/crate-ci/typos
rev: v1.26.0
hooks:
Expand Down