Skip to content

Commit 1501475

Browse files
XPU: Build SYCL kernels on Windows
1 parent 9029e36 commit 1501475

File tree

3 files changed

+36
-2
lines changed

3 files changed

+36
-2
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.bat text eol=crlf
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
2+
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
3+
4+
curl -o intel-dle-installer.exe %INTEL_DLE_URL%
5+
start /wait "Intel DLE Install" intel-dle-installer.exe --eula=accept --silent
6+
if ERRORLEVEL 1 (
7+
echo Failed to install Intel Deep Learning Essentials
8+
exit /b 1
9+
)
10+
11+
call %ProgramFiles(x86)%\Intel\oneAPI\setvars.bat
12+
if ERRORLEVEL 1 (
13+
echo Failed to setup environment
14+
exit /b 1
15+
)
16+
17+
cmake -G Ninja -DCOMPUTE_BACKEND=xpu -DCMAKE_BUILD_TYPE=Release .
18+
cmake --build . --config Release
19+
20+
if ERRORLEVEL 1 (
21+
echo Build failed
22+
exit /b 1
23+
)
24+
25+
set output_dir=output\%build_os%\x86_64
26+
if not exist "%output_dir%" mkdir "%output_dir%"
27+
copy bitsandbytes\*.dll "%output_dir%\" 2>nul

.github/workflows/python-package.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,14 +110,20 @@ jobs:
110110
build-xpu:
111111
strategy:
112112
matrix:
113-
os: [ubuntu-22.04]
113+
os: [ubuntu-22.04, windows-2025]
114114
runs-on: ${{ matrix.os }}
115115
steps:
116116
- uses: actions/checkout@v4
117-
- name: Build C++
117+
- name: Build C++ (Linux)
118+
if: runner.os == 'Linux'
118119
run: bash .github/scripts/build-xpu.sh
119120
env:
120121
build_os: ${{ matrix.os }}
122+
- name: Build C++ (Windows)
123+
if: runner.os == 'Windows'
124+
run: .github/scripts/build-xpu-windows.bat
125+
env:
126+
build_os: ${{ matrix.os }}
121127
- name: Upload build artifact
122128
uses: actions/upload-artifact@v4
123129
with:

0 commit comments

Comments
 (0)