@@ -101,6 +101,51 @@ jobs:
101
101
102
102
with :
103
103
name : windows-${{ matrix.build }}
104
+ path : .\build\bin\stable-diffusion.dll
105
+
106
+ windows-sycl :
107
+ runs-on : windows-latest
108
+
109
+ defaults :
110
+ run :
111
+ shell : bash
112
+
113
+ env :
114
+ WINDOWS_BASEKIT_URL : https://registrationcenter-download.intel.com/akdlm/IRC_NAS/7dff44ba-e3af-4448-841c-0d616c8da6e7/w_BaseKit_p_2024.1.0.595_offline.exe
115
+ WINDOWS_DPCPP_MKL : intel.oneapi.win.cpp-dpcpp-common:intel.oneapi.win.mkl.devel
116
+
117
+ steps :
118
+ - name : Checkout
119
+ id : checkout
120
+
121
+ with :
122
+ repository : ' leejet/stable-diffusion.cpp'
123
+ ref : ' ${{ github.event.inputs.commit }}'
124
+ submodules : recursive
125
+
126
+ - name : Checkout Install Script
127
+ id : checkoutInstallScript
128
+
129
+ with :
130
+ path : scripts
131
+ sparse-checkout : |
132
+ Backends/install-oneapi.bat
133
+ Backends/win-build-sycl.bat
134
+ sparse-checkout-cone-mode : false
135
+
136
+ - name : Install Sycl tools
137
+ id : installSyclCompiler
138
+ run : scripts/Backends/install-oneapi.bat $WINDOWS_BASEKIT_URL $WINDOWS_DPCPP_MKL
139
+
140
+ - name : Build
141
+ id : cmake_build
142
+ run : scripts/Backends/win-build-sycl.bat
143
+
144
+ - name : Upload artifact
145
+ id : upload_artifact
146
+
147
+ with :
148
+ name : windows-sycl
104
149
path : .\build\bin\stable-diffusion.dll
105
150
106
151
linux :
@@ -119,7 +164,9 @@ jobs:
119
164
- build : ' cuda11'
120
165
defines : ' -DSD_CUBLAS=ON -DSD_BUILD_SHARED_LIBS=ON'
121
166
- build : ' cuda12'
122
- defines : ' -DSD_CUBLAS=ON -DSD_BUILD_SHARED_LIBS=ON'
167
+ defines : ' -DSD_CUBLAS=ON -DSD_BUILD_SHARED_LIBS=ON'
168
+ - build : ' sycl'
169
+ defines : ' -DSD_SYCL=ON -DCMAKE_C_COMPILER=icx -DCMAKE_CXX_COMPILER=icpx -DSD_BUILD_SHARED_LIBS=ON'
123
170
124
171
steps :
125
172
- name : Checkout
@@ -150,8 +197,32 @@ jobs:
150
197
use-github-cache : false
151
198
use-local-cache : false
152
199
200
+ - name : Install Sycl tools
201
+ id : installSyclCompiler
202
+ if : ${{ matrix.build == 'sycl' }}
203
+ shell : bash
204
+ run : |
205
+ cd /tmp
206
+ wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
207
+ sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
208
+ rm GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
209
+ sudo add-apt-repository "deb https://apt.repos.intel.com/oneapi all main"
210
+ sudo apt update
211
+ sudo apt install intel-oneapi-compiler-dpcpp-cpp intel-oneapi-mkl-devel
212
+
213
+ - name : Build
214
+ id : cmake_build_sycl
215
+ if : ${{ matrix.build == 'sycl' }}
216
+ run : |
217
+ source /opt/intel/oneapi/setvars.sh
218
+ mkdir build
219
+ cd build
220
+ cmake .. ${{ matrix.defines }}
221
+ cmake --build . --config Release
222
+
153
223
- name : Build
154
224
id : cmake_build
225
+ if : ${{ matrix.build != 'sycl' }}
155
226
run : |
156
227
mkdir build
157
228
cd build
@@ -244,6 +315,7 @@ jobs:
244
315
245
316
needs :
246
317
- windows
318
+ - windows-sycl
247
319
- linux
248
320
- linux-hip
249
321
- osx
@@ -276,6 +348,7 @@ jobs:
276
348
nuget pack ./Backends/StableDiffusion.NET.Backend.Cuda12.Linux.nuspec -version ${{ github.event.inputs.version }}
277
349
nuget pack ./Backends/StableDiffusion.NET.Backend.Cuda.nuspec -version ${{ github.event.inputs.version }}
278
350
nuget pack ./Backends/StableDiffusion.NET.Backend.Rocm.nuspec -version ${{ github.event.inputs.version }}
351
+ nuget pack ./Backends/StableDiffusion.NET.Backend.Sycl.nuspec -version ${{ github.event.inputs.version }}
279
352
280
353
- name : Upload artifacts
281
354
id : upload_artifacts
0 commit comments