Skip to content

Commit 93c1614

Browse files
committed
Add NoAVX GPU backend support
1 parent 70ad206 commit 93c1614

File tree

3 files changed

+16
-9
lines changed

3 files changed

+16
-9
lines changed

.github/workflows/build.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -163,11 +163,15 @@ jobs:
163163
- build: "avx512"
164164
defines: "-DGGML_NATIVE=OFF -DGGML_AVX512=ON -DGGML_AVX=ON -DGGML_AVX2=ON -DSD_BUILD_SHARED_LIBS=ON"
165165
- build: "cuda12"
166-
defines: "-DSD_CUDA=ON -DSD_BUILD_SHARED_LIBS=ON -DCMAKE_CUDA_ARCHITECTURES=90;89;80;75"
166+
defines: "-DSD_CUDA=ON -DSD_BUILD_SHARED_LIBS=ON"
167+
- build: "cuda12-noavx"
168+
defines: "-DGGML_NATIVE=OFF -DSD_CUDA=ON -DGGML_AVX=OFF -DGGML_AVX2=OFF -DGGML_FMA=OFF -DSD_BUILD_SHARED_LIBS=ON"
167169
# - build: "rocm5.5"
168170
# 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'
169171
- build: 'vulkan'
170172
defines: "-DSD_VULKAN=ON -DSD_BUILD_SHARED_LIBS=ON"
173+
- build: 'vulkan-noavx'
174+
defines: "-DGGML_NATIVE=OFF -DSD_VULKAN=ON -DGGML_AVX=OFF -DGGML_AVX2=OFF -DGGML_FMA=OFF -DSD_BUILD_SHARED_LIBS=ON"
171175
steps:
172176
- name: Clone
173177
id: checkout
@@ -177,10 +181,10 @@ jobs:
177181

178182
- name: Install cuda-toolkit
179183
id: cuda-toolkit
180-
if: ${{ matrix.build == 'cuda12' }}
184+
if: ${{ matrix.build == 'cuda12' || matrix.build == 'cuda12-noavx' }}
181185
uses: Jimver/[email protected]
182186
with:
183-
cuda: "12.6.2"
187+
cuda: "12.4.0"
184188
method: "network"
185189
sub-packages: '["nvcc", "cudart", "cublas", "cublas_dev", "thrust", "visual_studio_integration"]'
186190

@@ -199,7 +203,7 @@ jobs:
199203
version: 1.11.1
200204
- name: Install Vulkan SDK
201205
id: get_vulkan
202-
if: ${{ matrix.build == 'vulkan' }}
206+
if: ${{ matrix.build == 'vulkan' || matrix.build == 'vulkan-noavx' }}
203207
run: |
204208
curl.exe -o $env:RUNNER_TEMP/VulkanSDK-Installer.exe -L "https://sdk.lunarg.com/sdk/download/${env:VULKAN_VERSION}/windows/VulkanSDK-${env:VULKAN_VERSION}-Installer.exe"
205209
& "$env:RUNNER_TEMP\VulkanSDK-Installer.exe" --accept-licenses --default-answer --confirm-command install

ggml

Submodule ggml updated 77 files

stable-diffusion.cpp

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1483,11 +1483,12 @@ struct ggml_tensor* id_embeds = NULL;
14831483
cfg_scale,
14841484
cfg_scale,
14851485
guidance,
1486-
eta,sample_method,
1486+
eta,
1487+
sample_method,
14871488
sigmas,
14881489
start_merge_step,
14891490
id_cond,
1490-
skip_layers,
1491+
skip_layers,
14911492
slg_scale,
14921493
skip_layer_start,
14931494
skip_layer_end,
@@ -1563,7 +1564,8 @@ SDError txt2img(sd_ctx_t* sd_ctx,
15631564
int clip_skip,
15641565
float cfg_scale,
15651566
float guidance,
1566-
float eta,int width,
1567+
float eta,
1568+
int width,
15671569
int height,
15681570
enum sample_method_t sample_method,
15691571
int sample_steps,
@@ -1647,7 +1649,8 @@ SDError txt2img(sd_ctx_t* sd_ctx,
16471649
clip_skip,
16481650
cfg_scale,
16491651
guidance,
1650-
eta,width,
1652+
eta,
1653+
width,
16511654
height,
16521655
sample_method,
16531656
sigmas,

0 commit comments

Comments
 (0)