3232 defines : ' -DGGML_AVX512=ON -DSD_BUILD_SHARED_LIBS=ON'
3333 - build : ' cuda12'
3434 defines : ' -DSD_CUDA=ON -DSD_BUILD_SHARED_LIBS=ON'
35- - build : ' rocm5'
36- defines : ' -G Ninja -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DSD_HIPBLAS=ON -DCMAKE_BUILD_TYPE=Release -DAMDGPU_TARGETS="gfx1100;gfx1102;gfx1030" -DSD_BUILD_SHARED_LIBS=ON'
3735 - build : ' vulkan'
3836 defines : " -DSD_VULKAN=ON -DSD_BUILD_SHARED_LIBS=ON"
3937
5553 method : network
5654 sub-packages : ' ["nvcc", "cudart", "cublas", "cublas_dev", "thrust", "visual_studio_integration"]'
5755
58- - name : Install rocm-toolkit
59- id : rocm-toolkit
60- if : ${{ matrix.build == 'rocm5' }}
61- uses :
Cyberhan123/[email protected] 62- with :
63- rocm : ' 5.5.0'
64-
65- - name : Install Ninja
66- id : install-ninja
67- if : ${{ matrix.build == 'rocm5' }}
68- uses : urkle/action-get-ninja@v1
69- with :
70- version : 1.11.1
71-
7256 - name : Install Vulkan SDK
7357 id : get_vulkan
7458 if : ${{ matrix.build == 'vulkan' }}
@@ -88,20 +72,11 @@ jobs:
8872
8973 - name : Upload artifact
9074 id : upload_artifact
91- if : ${{ matrix.build != 'rocm5' }}
92759376 with :
9477 name : windows-${{ matrix.build }}
9578 path : .\build\bin\Release\stable-diffusion.dll
9679
97- - name : Upload artifact Rocm
98- id : upload_artifact_rocm
99- if : ${{ matrix.build == 'rocm5' }}
100- 101- with :
102- name : windows-${{ matrix.build }}
103- path : .\build\bin\stable-diffusion.dll
104-
10580 windows-2019 :
10681 runs-on : windows-2019
10782
@@ -155,8 +130,9 @@ jobs:
155130 shell : bash
156131
157132 env :
158- 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
159- WINDOWS_DPCPP_MKL : intel.oneapi.win.cpp-dpcpp-common:intel.oneapi.win.mkl.devel
133+ WINDOWS_BASEKIT_URL : https://registrationcenter-download.intel.com/akdlm/IRC_NAS/b380d914-366b-4b77-a74a-05e3c38b3514/intel-oneapi-base-toolkit-2025.0.0.882_offline.exe
134+ WINDOWS_DPCPP_MKL : intel.oneapi.win.cpp-dpcpp-common:intel.oneapi.win.mkl.devel:intel.oneapi.win.dnnl:intel.oneapi.win.tbb.devel
135+ ONEAPI_ROOT : " C:/Program Files (x86)/Intel/oneAPI"
160136
161137 steps :
162138 - name : Checkout
@@ -191,6 +167,53 @@ jobs:
191167 with :
192168 name : windows-sycl
193169 path : .\build\bin\stable-diffusion.dll
170+
171+ windows-hip :
172+ runs-on : windows-latest
173+
174+ strategy :
175+ matrix :
176+ gpu_target : [gfx1100, gfx1101, gfx1030]
177+
178+ steps :
179+ - name : Install
180+ id : depends
181+ run : |
182+ $ErrorActionPreference = "Stop"
183+ write-host "Downloading AMD HIP SDK Installer"
184+ Invoke-WebRequest -Uri "https://download.amd.com/developer/eula/rocm-hub/AMD-Software-PRO-Edition-24.Q3-WinSvr2022-For-HIP.exe" -OutFile "${env:RUNNER_TEMP}\rocm-install.exe"
185+ write-host "Installing AMD HIP SDK"
186+ Start-Process "${env:RUNNER_TEMP}\rocm-install.exe" -ArgumentList '-install' -NoNewWindow -Wait
187+ write-host "Completed AMD HIP SDK installation"
188+ - name : Verify ROCm
189+ id : verify
190+ run : |
191+ & 'C:\Program Files\AMD\ROCm\*\bin\clang.exe' --version
192+
193+ - name : Checkout
194+ id : checkout
195+ 196+ with :
197+ repository : ' leejet/stable-diffusion.cpp'
198+ ref : ' ${{ github.event.inputs.commit }}'
199+ submodules : recursive
200+
201+ - name : Build
202+ id : cmake_build
203+ run : |
204+ $env:HIP_PATH=$(Resolve-Path 'C:\Program Files\AMD\ROCm\*\bin\clang.exe' | split-path | split-path)
205+ $env:CMAKE_PREFIX_PATH="${env:HIP_PATH}"
206+ mkdir build
207+ cd build
208+ cmake -G "Unix Makefiles" --build .. -DCMAKE_C_COMPILER="${env:HIP_PATH}\bin\clang.exe" -DCMAKE_CXX_COMPILER="${env:HIP_PATH}\bin\clang++.exe" -DGGML_HIP=ON -DCMAKE_BUILD_TYPE=Release -DAMDGPU_TARGETS=${{ matrix.gpu_target }} -DGGML_RPC=ON -DSD_BUILD_SHARED_LIBS=ON
209+ cmake --build . --config Release
210+
211+ - name : Upload artifact
212+ id : upload_artifact
213+ 214+ with :
215+ name : windows-hip
216+ path : .\build\bin\stable-diffusion.dll
194217
195218 linux :
196219 runs-on : ubuntu-latest
@@ -305,7 +328,7 @@ jobs:
305328 run : |
306329 mkdir build
307330 cd build
308- cmake .. -DCMAKE_C_COMPILER=hipcc -DCMAKE_CXX_COMPILER=hipcc -DSD_HIPBLAS =ON -DCMAKE_BUILD_TYPE=Release -DAMDGPU_TARGETS="gfx1100;gfx1102;gfx1030" -DSD_BUILD_SHARED_LIBS=ON
331+ cmake .. -DCMAKE_HIP_COMPILER="$(hipconfig -l)/clang" -DGGML_HIP =ON -DSD_BUILD_SHARED_LIBS=ON
309332 cmake --build . --config Release
310333
311334 - name : Upload artifact Rocm
@@ -359,6 +382,7 @@ jobs:
359382
360383 needs :
361384 - windows
385+ - windows-hip
362386 - windows-sycl
363387 - linux
364388 - linux-hip
0 commit comments