Repository navigation
VRAM exhaustion during SDXL inference on 8GB AMD GPU (Vulkan backend) causes fragmented VAE processing #761
Description
Activity
Are you running sd.cpp as a library or from the cli? Because with the cli it should by default free all the unet-related buffers before the VAE decoding stage.
YES
I use the sd.cpp from cli
if I generate image without ---vae-tiling it will[DEBUG] ggml_extend.hpp:1173 - clip compute buffer size: 1.40 MB(VRAM) [DEBUG] ggml_extend.hpp:1173 - clip compute buffer size: 2.33 MB(VRAM) [DEBUG] ggml_extend.hpp:1173 - clip compute buffer size: 2.33 MB(VRAM) [DEBUG] conditioner.hpp:486 - computing condition graph completed, taking 179 ms [DEBUG] ggml_extend.hpp:1173 - clip compute buffer size: 1.40 MB(VRAM) [DEBUG] ggml_extend.hpp:1173 - clip compute buffer size: 2.33 MB(VRAM) [DEBUG] conditioner.hpp:486 - computing condition graph completed, taking 267 ms [DEBUG] conditioner.hpp:358 - parse '' to [['', 1], ] [DEBUG] clip.hpp:311 - token length: 77 [DEBUG] ggml_extend.hpp:1173 - clip compute buffer size: 1.40 MB(VRAM) [DEBUG] ggml_extend.hpp:1173 - clip compute buffer size: 2.33 MB(VRAM) [DEBUG] ggml_extend.hpp:1173 - clip compute buffer size: 2.33 MB(VRAM) [DEBUG] conditioner.hpp:486 - computing condition graph completed, taking 161 ms [INFO ] stable-diffusion.cpp:1696 - get_learned_condition completed, taking 443 ms [INFO ] stable-diffusion.cpp:1719 - sampling using Euler A method [INFO ] stable-diffusion.cpp:1768 - generating image: 1/1 - seed 8038 [DEBUG] stable-diffusion.cpp:865 - Sample [DEBUG] ggml_extend.hpp:1173 - unet compute buffer size: 858.29 MB(VRAM) |==================================================| 20/20 - 4.52s/it [INFO ] stable-diffusion.cpp:1806 - sampling completed, taking 91.29s [INFO ] stable-diffusion.cpp:1814 - generating 1 latent images completed, taking 91.33s [INFO ] stable-diffusion.cpp:1817 - decoding 1 latents ggml_vulkan: Device memory allocation of size 6870269952 failed. ggml_vulkan: Requested buffer size exceeds device memory allocation limit: ErrorOutOfDeviceMemory ggml_gallocr_reserve_n: failed to allocate Vulkan0 buffer of size 6870269952 [ERROR] ggml_extend.hpp:1163 - vae: failed to allocate the compute bufferthe image size is 896 x1152
when compute unet ,the vram is used about 6.4gThose ~6.9 G are just for the VAE operation. Most (all?) Vulkan backends have limits on how large a single allocation can get, regardless of the total VRAM (that "device memory allocation limit"); and, unfortunately, the non-tiled VAE code allocates a single buffer.
VAE tiling is the usual solution for that, but you could also try the new
--vae-conv-directoption.Reacted by Erik Scholz, stduhpf and magictextAfter adding the
--vae-conv-directoption, the situation remained unchanged.
when use--vae-tilingthe log is[INFO ] stable-diffusion.cpp:1806 - sampling completed, taking 95.10s [INFO ] stable-diffusion.cpp:1814 - generating 1 latent images completed, taking 95.17s [INFO ] stable-diffusion.cpp:1817 - decoding 1 latents [DEBUG] ggml_extend.hpp:625 - tile work buffer size: 0.77 MB [DEBUG] ggml_extend.hpp:1173 - vae compute buffer size: 416.00 MB(VRAM) [INFO ] ggml_extend.hpp:639 - processing 63 tiles |> | 1/63 - 0.00it/s[DEBUG] ggml_extend.hpp:1173 - vae compute buffer size: 416.00 MB(VRAM) |> | 1/63 - 1.09it/s[DEBUG] ggml_extend.hpp:1173 - vae compute buffer size: 416.00 MB(VRAM) |=> | 2/63 - 1.10it/s[DEBUG] ggml_extend.hpp:1173 - vae compute buffer size: 416.00 MB(VRAM) |==> | 3/63 - 1.10it/s[DEBUG] ggml_extend.hpp:1173 - vae compute buffer size: 416.00 MB(VRAM) |===> | 4/63 - 1.09it/s[DEBUG] ggml_extend.hpp:1173 - vae compute buffer size: 416.00 MB(VRAM) |===> | 5/63 - 1.10it/s[DEBUG] ggml_extend.hpp:1173 - vae compute buffer size: 416.00 MB(VRAM) |====> | 6/63 - 1.10it/s[DEBUG] ggml_extend.hpp:1173 - vae compute buffer size: 416.00 MB(VRAM) |=====> | 7/63 - 1.10it/s[DEBUG] ggml_extend.hpp:1173 - vae compute buffer size: 416.00 MB(VRAM) |======> | 8/63 - 1.11it/s[DEBUG] ggml_extend.hpp:1173 - vae compute buffer size: 416.00 MB(VRAM) |=======> | 9/63 - 1.10it/s[DEBUG] ggml_extend.hpp:1173 - vae compute buffer size: 416.00 MB(VRAM) |=======> | 10/63 - 1.10it/s[DEBUG] ggml_extend.hpp:1173 - vae compute buffer size: 416.00 MB(VRAM) |========> | 11/63 - 1.10it/s[DEBUG] ggml_extend.hpp:1173 - vae compute buffer size: 416.00 MB(VRAM) |=========> | 12/63 - 1.08it/s[DEBUG] ggml_extend.hpp:1173 - vae compute buffer size: 416.00 MB(VRAM) |==========> | 13/63 - 1.08it/s[DEBUG] ggml_extend.hpp:1173 - vae compute buffer size: 416.00 MB(VRAM) |===========> | 14/63 - 1.11it/s[DEBUG] ggml_extend.hpp:1173 - vae compute buffer size: 416.00 MB(VRAM) |===========> | 15/63 - 1.10it/s[DEBUG] ggml_extend.hpp:1173 - vae compute buffer size: 416.00 MB(VRAM) |============> | 16/63 - 1.07it/s[DEBUG] ggml_extend.hpp:1173 - vae compute buffer size: 416.00 MB(VRAM) |=============> | 17/63 - 1.09it/s[DEBUG] ggml_extend.hpp:1173 - vae compute buffer size: 416.00 MB(VRAM) |==============> | 18/63 - 1.07it/s[DEBUG] ggml_extend.hpp:1173 - vae compute buffer size: 416.00 MB(VRAM) |===============> | 19/63 - 1.09it/s[DEBUG] ggml_extend.hpp:1173 - vae compute buffer size: 416.00 MB(VRAM) |===============> | 20/63 - 1.10it/s[DEBUG] ggml_extend.hpp:1173 - vae compute buffer size: 416.00 MB(VRAM) |================> | 21/63 - 1.09it/s[DEBUG] ggml_extend.hpp:1173 - vae compute buffer size: 416.00 MB(VRAM) |=================> | 22/63 - 1.08it/s[DEBUG] ggml_extend.hpp:1173 - vae compute buffer size: 416.00 MB(VRAM) |==================> | 23/63 - 1.09it/s[DEBUG] ggml_extend.hpp:1173 - vae compute buffer size: 416.00 MB(VRAM) |===================> | 24/63 - 1.09it/s[DEBUG] ggml_extend.hpp:1173 - vae compute buffer size: 416.00 MB(VRAM) |===================> | 25/63 - 1.09it/s[DEBUG] ggml_extend.hpp:1173 - vae compute buffer size: 416.00 MB(VRAM) |====================> | 26/63 - 1.09it/s[DEBUG] ggml_extend.hpp:1173 - vae compute buffer size: 416.00 MB(VRAM) |=====================> | 27/63 - 1.10it/s[DEBUG] ggml_extend.hpp:1173 - vae compute buffer size: 416.00 MB(VRAM) |======================> | 28/63 - 1.08it/s[DEBUG] ggml_extend.hpp:1173 - vae compute buffer size: 416.00 MB(VRAM) |=======================> | 29/63 - 1.10it/s[DEBUG] ggml_extend.hpp:1173 - vae compute buffer size: 416.00 MB(VRAM) |=======================> | 30/63 - 1.07it/s[DEBUG] ggml_extend.hpp:1173 - vae compute buffer size: 416.00 MB(VRAM) |========================> | 31/63 - 1.09it/s[DEBUG] ggml_extend.hpp:1173 - vae compute buffer size: 416.00 MB(VRAM) |=========================> | 32/63 - 1.09it/s[DEBUG] ggml_extend.hpp:1173 - vae compute buffer size: 416.00 MB(VRAM) |==========================> | 33/63 - 1.09it/s[DEBUG] ggml_extend.hpp:1173 - vae compute buffer size: 416.00 MB(VRAM) |==========================> | 34/63 - 1.09it/s[DEBUG] ggml_extend.hpp:1173 - vae compute buffer size: 416.00 MB(VRAM) |===========================> | 35/63 - 1.08it/s[DEBUG] ggml_extend.hpp:1173 - vae compute buffer size: 416.00 MB(VRAM) |============================> | 36/63 - 1.10it/s[DEBUG] ggml_extend.hpp:1173 - vae compute buffer size: 416.00 MB(VRAM) |=============================> | 37/63 - 1.10it/s[DEBUG] ggml_extend.hpp:1173 - vae compute buffer size: 416.00 MB(VRAM) |==============================> | 38/63 - 1.09it/s[DEBUG] ggml_extend.hpp:1173 - vae compute buffer size: 416.00 MB(VRAM) |==============================> | 39/63 - 1.06it/s[DEBUG] ggml_extend.hpp:1173 - vae compute buffer size: 416.00 MB(VRAM) |===============================> | 40/63 - 1.09it/s[DEBUG] ggml_extend.hpp:1173 - vae compute buffer size: 416.00 MB(VRAM) |================================> | 41/63 - 1.09it/s[DEBUG] ggml_extend.hpp:1173 - vae compute buffer size: 416.00 MB(VRAM) |=================================> | 42/63 - 1.10it/s[DEBUG] ggml_extend.hpp:1173 - vae compute buffer size: 416.00 MB(VRAM) |==================================> | 43/63 - 1.09it/s[DEBUG] ggml_extend.hpp:1173 - vae compute buffer size: 416.00 MB(VRAM) |==================================> | 44/63 - 1.10it/s[DEBUG] ggml_extend.hpp:1173 - vae compute buffer size: 416.00 MB(VRAM) |===================================> | 45/63 - 1.11it/s[DEBUG] ggml_extend.hpp:1173 - vae compute buffer size: 416.00 MB(VRAM) |====================================> | 46/63 - 1.09it/s[DEBUG] ggml_extend.hpp:1173 - vae compute buffer size: 416.00 MB(VRAM) |=====================================> | 47/63 - 1.09it/s[DEBUG] ggml_extend.hpp:1173 - vae compute buffer size: 416.00 MB(VRAM) |==================================================| 63/63 - 1.09it/s [DEBUG] stable-diffusion.cpp:1182 - computing vae [mode: DECODE] graph completed, taking 44.92s [INFO ] stable-diffusion.cpp:1827 - latent 1 decoded, taking 44.92s [INFO ] stable-diffusion.cpp:1831 - decode_first_stage completed, taking 44.92s [INFO ] stable-diffusion.cpp:2088 - generate_image completed in 140.53sis this right?
And when use pytorch version stable-diffusion(use zluda and hip), it can run for the 2.5it/s,But sometimes it runs out of memory(16g) when handle vae,I found that sd.cpp consumes less memory, and will the sd.cpp support ZLuda in the future?And when use pytorch version stable-diffusion(use zluda and hip), it can run for the 2.5it/s,But sometimes it runs out of memory(16g) when handle vae,I found that sd.cpp consumes less memory, and will the sd.cpp support ZLuda in the future?
Actually stable-diffusion.cpp already supports HIP/ROCm, though it's not provided in the official releases and it's not very straight forward to build it (see #194 (comment) if you want instructions on how to build it for Windows). It's pretty fast compared to Vulkan and doesn't have the same issue of the VAE taking way too much VRAM.
I don't think Zluda support is planned though. If somehow llama.cpp ends up supporting Zluda, this will probably support it too, but I think it's unlikely to happen.
After adding the
--vae-conv-directoption, the situation remained unchanged.That's odd, are you using the lastest version of stable-diffusion.cpp?
yes,I download and use this release
After adding the --vae-conv-direct option, the situation remained unchanged.
Does it report the same failed buffer allocation, with the same value? On Vulkan, it should use far less memory (see the table on #744 ; for 896 x1152, I'd expect more or less the same memory usage as 1024x1024).
year,here is the full logs
PS D:\Downloads\sd-master-f7f05fb-bin-win-vulkan-x64> ./sd.exe --diffusion-fa --vae-conv-direct -W 896 -H 1152 -m MODEL_PATH --lora-model-dir LORA_PATH -p "masterpiece,best quality" -s -1 -v Option: n_threads: 6 mode: img_gen model_path: D:\sd-webui-forge-aki-v1.0\models\Stable-diffusion\Illustrious.safetensors wtype: unspecified clip_l_path: clip_g_path: t5xxl_path: diffusion_model_path: vae_path: taesd_path: esrgan_path: control_net_path: embedding_dir: stacked_id_embed_dir: input_id_images_path: style ratio: 20.00 normalize input image : false output_path: output.png init_img: mask_img: control_image: ref_images_paths: clip on cpu: false controlnet cpu: false vae decoder on cpu:false diffusion flash attention:true strength(control): 0.90 prompt: masterpiece,best quality,1girl,full body negative_prompt: min_cfg: 1.00 cfg_scale: 7.00 img_cfg_scale: 7.00 slg_scale: 0.00 guidance: 3.50 eta: 0.00 clip_skip: -1 width: 896 height: 1152 sample_method: euler_a schedule: default sample_steps: 20 strength(img2img): 0.75 rng: cuda seed: 29545 batch_count: 1 vae_tiling: false upscale_repeats: 1 chroma_use_dit_mask: true chroma_use_t5_mask: false chroma_t5_mask_pad: 1 System Info: SSE3 = 1 AVX = 1 AVX2 = 1 AVX512 = 0 AVX512_VBMI = 0 AVX512_VNNI = 0 FMA = 1 NEON = 0 ARM_FMA = 0 F16C = 1 FP16_VA = 0 WASM_SIMD = 0 VSX = 0 [DEBUG] stable-diffusion.cpp:145 - Using Vulkan backend ggml_vulkan: Found 1 Vulkan devices: ggml_vulkan: 0 = AMD Radeon RX 6600 (AMD proprietary driver) | uma: 0 | fp16: 1 | bf16: 0 | warp size: 32 | shared memory: 32768 | int dot: 0 | matrix cores: none [INFO ] stable-diffusion.cpp:192 - loading model from 'D:\sd-webui-forge-aki-v1.0\models\Stable-diffusion\Illustrious.safetensors' [INFO ] model.cpp:1013 - load D:\sd-webui-forge-aki-v1.0\models\Stable-diffusion\Illustrious.safetensors using safetensors format [DEBUG] model.cpp:1088 - init from 'D:\sd-webui-forge-aki-v1.0\models\Stable-diffusion\Illustrious.safetensors' [INFO ] stable-diffusion.cpp:243 - Version: SDXL [INFO ] stable-diffusion.cpp:277 - Weight type: f16 [INFO ] stable-diffusion.cpp:278 - Conditioner weight type: f16 [INFO ] stable-diffusion.cpp:279 - Diffusion model weight type: f16 [INFO ] stable-diffusion.cpp:280 - VAE weight type: f32 [DEBUG] stable-diffusion.cpp:282 - ggml tensor size = 400 bytes [WARN ] stable-diffusion.cpp:291 - !!!It looks like you are using SDXL model. If you find that the generated images are completely black, try specifying SDXL VAE FP16 Fix with the --vae parameter. You can find it here: https://huggingface.co/madebyollin/sdxl-vae-fp16-fix/blob/main/sdxl_vae.safetensors [INFO ] stable-diffusion.cpp:330 - Using flash attention in the diffusion model [DEBUG] clip.hpp:171 - vocab size: 49408 [DEBUG] clip.hpp:182 - trigger word img already in vocab [DEBUG] ggml_extend.hpp:1222 - clip params backend buffer size = 307.44 MB(VRAM) (196 tensors) [DEBUG] ggml_extend.hpp:1222 - clip params backend buffer size = 1449.92 MB(VRAM) (517 tensors) [DEBUG] ggml_extend.hpp:1222 - unet params backend buffer size = 4900.07 MB(VRAM) (1680 tensors) [DEBUG] ggml_extend.hpp:1222 - vae params backend buffer size = 94.47 MB(VRAM) (140 tensors) [DEBUG] stable-diffusion.cpp:459 - loading weights [DEBUG] model.cpp:1891 - loading tensors from D:\sd-webui-forge-aki-v1.0\models\Stable-diffusion\Illustrious.safetensors |==================================================| 2641/2641 - 200.00it/s [INFO ] stable-diffusion.cpp:558 - total params memory size = 6751.89MB (VRAM 6751.89MB, RAM 0.00MB): clip 1757.36MB(VRAM), unet 4900.07MB(VRAM), vae 94.47MB(VRAM), controlnet 0.00MB(VRAM), pmid 0.00MB(VRAM) [INFO ] stable-diffusion.cpp:562 - loading model from 'D:\sd-webui-forge-aki-v1.0\models\Stable-diffusion\Illustrious.safetensors' completed, taking 11.72s [INFO ] stable-diffusion.cpp:604 - running in eps-prediction mode [DEBUG] stable-diffusion.cpp:648 - finished loaded file [DEBUG] stable-diffusion.cpp:1887 - generate_image 896x1152 [INFO ] stable-diffusion.cpp:2017 - TXT2IMG [DEBUG] stable-diffusion.cpp:1557 - prompt after extract and remove lora: "masterpiece,best quality,1girl,full body" [INFO ] stable-diffusion.cpp:738 - Attempting to apply 0 LoRAs [INFO ] stable-diffusion.cpp:1562 - apply_loras completed, taking 0.00s [DEBUG] conditioner.hpp:358 - parse 'masterpiece,best quality,1girl,full body' to [['masterpiece,best quality,1girl,full body', 1], ] [DEBUG] clip.hpp:311 - token length: 77 [DEBUG] ggml_extend.hpp:1173 - clip compute buffer size: 1.40 MB(VRAM) [DEBUG] ggml_extend.hpp:1173 - clip compute buffer size: 2.33 MB(VRAM) [DEBUG] ggml_extend.hpp:1173 - clip compute buffer size: 2.33 MB(VRAM) [DEBUG] conditioner.hpp:486 - computing condition graph completed, taking 168 ms [DEBUG] conditioner.hpp:358 - parse '' to [['', 1], ] [DEBUG] clip.hpp:311 - token length: 77 [DEBUG] ggml_extend.hpp:1173 - clip compute buffer size: 1.40 MB(VRAM) [DEBUG] ggml_extend.hpp:1173 - clip compute buffer size: 2.33 MB(VRAM) [DEBUG] ggml_extend.hpp:1173 - clip compute buffer size: 2.33 MB(VRAM) [DEBUG] conditioner.hpp:486 - computing condition graph completed, taking 161 ms [INFO ] stable-diffusion.cpp:1696 - get_learned_condition completed, taking 334 ms [INFO ] stable-diffusion.cpp:1719 - sampling using Euler A method [INFO ] stable-diffusion.cpp:1768 - generating image: 1/1 - seed 29545 [DEBUG] stable-diffusion.cpp:865 - Sample [DEBUG] ggml_extend.hpp:1173 - unet compute buffer size: 759.93 MB(VRAM) |==================================================| 20/20 - 4.77s/it [INFO ] stable-diffusion.cpp:1806 - sampling completed, taking 100.23s [INFO ] stable-diffusion.cpp:1814 - generating 1 latent images completed, taking 100.29s [INFO ] stable-diffusion.cpp:1817 - decoding 1 latents ggml_vulkan: Device memory allocation of size 6870269952 failed. ggml_vulkan: Requested buffer size exceeds device memory allocation limit: ErrorOutOfDeviceMemory ggml_gallocr_reserve_n: failed to allocate Vulkan0 buffer of size 6870269952 [ERROR] ggml_extend.hpp:1163 - vae: failed to allocate the compute buffer PS D:\Downloads\sd-master-f7f05fb-bin-win-vulkan-x64>Reacted by Wagner BrunaThat's odd, it looks like
--vae-conv-directhas no effect at all on your system. (or on the ci build maybe?)By the way, @daniandtheweb looks like you forgot to add the values for conv direct options to the
print_params()function in the cli.OK I can reproduce the ineffectiveness of the
--vae-conv-direct, but only with the Vulkan build from the official releases. My local build on master branch does support the flag properly. That's very strange.That's very strange.
It is not, because it is not the latest build. Github does not sort releases within a day, they appear to be random, or have some internal ordering.
Oh I've never noticed that
I guess we should warn or error on unknown params.
It used to do that. I guess the recent refactor got rid of it by accident?
anyways @magictext, please try again with this release: sd-master-5b8996f-bin-win-vulkan-x64.zip
@stduhpf I guess the ping was about the incorrect build? I did add the flags to the
print_params()function, they're right after the flash-attention flag.@stduhpf I guess the ping was about the incorrect build? I did add the flags to the
print_params()function, they're right after the flash-attention flag.Ah right, sorry. I didn't check the code. I trusted it was the lastest release and assumed it was missing.
Ah right, sorry. I didn't check the code. I trusted it was the lastest release and assumed it was missing.
This actually seems like a big problem, especially for new and inexperienced users that find the program. I've almost never touched a github ci but maybe there's a way for the releases to be published in the right order.
Ah right, sorry. I didn't check the code. I trusted it was the lastest release and assumed it was missing.
This actually seems like a big problem, especially for new and inexperienced users that find the program. I've almost never touched a github ci but maybe there's a way for the releases to be published in the right order.
Sequential numbers seem to do the trick. llama.cpp switched to git tree height, and it works there.
I can confirm that the non-time based ordering is causing issues for a project of mine regularly.
Reacted by stduhpfIt works. but it failed too...
[INFO ] stable-diffusion.cpp:1822 - sampling completed, taking 91.77s [INFO ] stable-diffusion.cpp:1830 - generating 1 latent images completed, taking 91.82s [INFO ] stable-diffusion.cpp:1833 - decoding 1 latents ggml_vulkan: Device memory allocation of size 2642411520 failed. ggml_vulkan: Requested buffer size exceeds device memory allocation limit: ErrorOutOfDeviceMemory ggml_gallocr_reserve_n: failed to allocate Vulkan0 buffer of size 2642411520 [ERROR] ggml_extend.hpp:1182 - vae: failed to allocate the compute bufferWhile reviewing past release records, I found that versions supporting ROCm were available in the past. Why are they no longer supported now? I have HIP 5.7 installed on my system. Can I use past release versions?
While reviewing past release records, I found that versions supporting ROCm were available in the past. Why are they no longer supported now? I have HIP 5.7 installed on my system. Can I use past release versions?
You could use past releases, but you'd be missing out on a lot of newer features and bug fixes. ROCm build isn't working anymore in github action for some reason, but it's possible to build it from sources.
ggml_gallocr_reserve_n: failed to allocate Vulkan0 buffer of size 2642411520
That's better, now I think typing
$env:GGML_VK_FORCE_MAX_ALLOCATION_SIZE=4294967295in your terminal before launching sd.exe would make it work. Most GPU drivers actually support up to 4GB (max value for uint) buffers, even though AMD drivers claim they support up to 2GB (max value for int).it works!!
now it can run without tiled[DEBUG] ggml_extend.hpp:1192 - vae compute buffer size: 2520.00 MB(VRAM) [DEBUG] stable-diffusion.cpp:1198 - computing vae [mode: DECODE] graph completed, taking 3.90s [INFO ] stable-diffusion.cpp:1843 - latent 1 decoded, taking 3.90s [INFO ] stable-diffusion.cpp:1847 - decode_first_stage completed, taking 3.90s [INFO ] stable-diffusion.cpp:2104 - generate_image completed in 95.66s save result PNG image to 'output.png'it tooks 4s,and before this is 44.92s! Thanks for your help!
for build sd.cpp from source code,because I am not familiar with C++, it might be a bit difficult, but I will give it a try.
Reacted by Wagner Bruna and magictextReacted by stduhpf and magictextwhen run
cmake --build . --config Release
it returnPS D:\stable-diffusion.cpp\build> cmake --build . --config Release [2/125] Building CXX object ggml/src/CMakeFiles/ggml-base.dir/ggml.cpp.obj FAILED: ggml/src/CMakeFiles/ggml-base.dir/ggml.cpp.obj C:\PROGRA~1\AMD\ROCm\5.7\bin\CLANG_~1.EXE -DGGML_COMMIT=\"7dee1d6a\" -DGGML_MAX_NAME=128 -DGGML_SCHED_MAX_COPIES=4 -DGGML_VERSION=\"0.0.2404\" -DSD_USE_CUDA -D_CRT_SECURE_NO_WARNINGS -D_XOPEN_SOURCE=600 -ID:/stable-diffusion.cpp/ggml/src/. -ID:/stable-diffusion.cpp/ggml/src/../include -O3 -DNDEBUG -D_DLL -D_MT -Xclang --dependent-lib=msvcrt -std=gnu++17 -Wmissing-declarations -Wmissing-noreturn -Wall -Wextra -Wpedantic -Wcast-qual -Wno-unused-function -Wunreachable-code-break -Wunreachable-code-return -Wmissing-prototypes -Wextra-semi -MD -MT ggml/src/CMakeFiles/ggml-base.dir/ggml.cpp.obj -MF ggml\src\CMakeFiles\ggml-base.dir\ggml.cpp.obj.d -o ggml/src/CMakeFiles/ggml-base.dir/ggml.cpp.obj -c D:/stable-diffusion.cpp/ggml/src/ggml.cpp In file included from D:/stable-diffusion.cpp/ggml/src/ggml.cpp:1: In file included from D:/stable-diffusion.cpp/ggml/src/./ggml-impl.h:549: In file included from C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\initializer_list:8: C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\yvals_core.h:908:1: error: static assertion failed: error STL1000: Unexpected compiler version, expected Clang 19.0.0 or newer. _EMIT_STL_ERROR(STL1000, "Unexpected compiler version, expected Clang 19.0.0 or newer."); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\yvals_core.h:534:44: note: expanded from macro '_EMIT_STL_ERROR' #define _EMIT_STL_ERROR(NUMBER, MESSAGE) static_assert(false, "error " #NUMBER ": " MESSAGE) ^ ~~~~~ 1 error generated. [3/125] Building CXX object ggml/src/CMakeFiles/ggml-base.dir/ggml-threading.cpp.obj FAILED: ggml/src/CMakeFiles/ggml-base.dir/ggml-threading.cpp.obj C:\PROGRA~1\AMD\ROCm\5.7\bin\CLANG_~1.EXE -DGGML_COMMIT=\"7dee1d6a\" -DGGML_MAX_NAME=128 -DGGML_SCHED_MAX_COPIES=4 -DGGML_VERSION=\"0.0.2404\" -DSD_USE_CUDA -D_CRT_SECURE_NO_WARNINGS -D_XOPEN_SOURCE=600 -ID:/stable-diffusion.cpp/ggml/src/. -ID:/stable-diffusion.cpp/ggml/src/../include -O3 -DNDEBUG -D_DLL -D_MT -Xclang --dependent-lib=msvcrt -std=gnu++17 -Wmissing-declarations -Wmissing-noreturn -Wall -Wextra -Wpedantic -Wcast-qual -Wno-unused-function -Wunreachable-code-break -Wunreachable-code-return -Wmissing-prototypes -Wextra-semi -MD -MT ggml/src/CMakeFiles/ggml-base.dir/ggml-threading.cpp.obj -MF ggml\src\CMakeFiles\ggml-base.dir\ggml-threading.cpp.obj.d -o ggml/src/CMakeFiles/ggml-base.dir/ggml-threading.cpp.obj -c D:/stable-diffusion.cpp/ggml/src/ggml-threading.cpp In file included from D:/stable-diffusion.cpp/ggml/src/ggml-threading.cpp:2: In file included from C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\mutex:8: C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\yvals_core.h:908:1: error: static assertion failed: error STL1000: Unexpected compiler version, expected Clang 19.0.0 or newer. _EMIT_STL_ERROR(STL1000, "Unexpected compiler version, expected Clang 19.0.0 or newer."); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\yvals_core.h:534:44: note: expanded from macro '_EMIT_STL_ERROR' #define _EMIT_STL_ERROR(NUMBER, MESSAGE) static_assert(false, "error " #NUMBER ": " MESSAGE) ^ ~~~~~ 1 error generated. [4/125] Building CXX object ggml/src/CMakeFiles/ggml-base.dir/ggml-backend.cpp.obj FAILED: ggml/src/CMakeFiles/ggml-base.dir/ggml-backend.cpp.obj C:\PROGRA~1\AMD\ROCm\5.7\bin\CLANG_~1.EXE -DGGML_COMMIT=\"7dee1d6a\" -DGGML_MAX_NAME=128 -DGGML_SCHED_MAX_COPIES=4 -DGGML_VERSION=\"0.0.2404\" -DSD_USE_CUDA -D_CRT_SECURE_NO_WARNINGS -D_XOPEN_SOURCE=600 -ID:/stable-diffusion.cpp/ggml/src/. -ID:/stable-diffusion.cpp/ggml/src/../include -O3 -DNDEBUG -D_DLL -D_MT -Xclang --dependent-lib=msvcrt -std=gnu++17 -Wmissing-declarations -Wmissing-noreturn -Wall -Wextra -Wpedantic -Wcast-qual -Wno-unused-function -Wunreachable-code-break -Wunreachable-code-return -Wmissing-prototypes -Wextra-semi -MD -MT ggml/src/CMakeFiles/ggml-base.dir/ggml-backend.cpp.obj -MF ggml\src\CMakeFiles\ggml-base.dir\ggml-backend.cpp.obj.d -o ggml/src/CMakeFiles/ggml-base.dir/ggml-backend.cpp.obj -c D:/stable-diffusion.cpp/ggml/src/ggml-backend.cpp In file included from D:/stable-diffusion.cpp/ggml/src/ggml-backend.cpp:14: In file included from D:/stable-diffusion.cpp/ggml/src/./ggml-impl.h:549: In file included from C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\initializer_list:8: C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\yvals_core.h:908:1: error: static assertion failed: error STL1000: Unexpected compiler version, expected Clang 19.0.0 or newer. _EMIT_STL_ERROR(STL1000, "Unexpected compiler version, expected Clang 19.0.0 or newer."); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\yvals_core.h:534:44: note: expanded from macro '_EMIT_STL_ERROR' #define _EMIT_STL_ERROR(NUMBER, MESSAGE) static_assert(false, "error " #NUMBER ": " MESSAGE) ^ ~~~~~ 1 error generated. [5/125] Building CXX object ggml/src/CMakeFiles/ggml-cpu.dir/ggml-cpu/repack.cpp.obj FAILED: ggml/src/CMakeFiles/ggml-cpu.dir/ggml-cpu/repack.cpp.obj C:\PROGRA~1\AMD\ROCm\5.7\bin\CLANG_~1.EXE -DGGML_MAX_NAME=128 -DGGML_SCHED_MAX_COPIES=4 -DGGML_USE_CPU_REPACK -DSD_USE_CUDA -D_CRT_SECURE_NO_WARNINGS -D_XOPEN_SOURCE=600 -ID:/stable-diffusion.cpp/ggml/src/.. -ID:/stable-diffusion.cpp/ggml/src/. -ID:/stable-diffusion.cpp/ggml/src/ggml-cpu -ID:/stable-diffusion.cpp/ggml/src/../include -O3 -DNDEBUG -D_DLL -D_MT -Xclang --dependent-lib=msvcrt -std=gnu++17 -Wmissing-declarations -Wmissing-noreturn -Wall -Wextra -Wpedantic -Wcast-qual -Wno-unused-function -Wunreachable-code-break -Wunreachable-code-return -Wmissing-prototypes -Wextra-semi -march=native -MD -MT ggml/src/CMakeFiles/ggml-cpu.dir/ggml-cpu/repack.cpp.obj -MF ggml\src\CMakeFiles\ggml-cpu.dir\ggml-cpu\repack.cpp.obj.d -o ggml/src/CMakeFiles/ggml-cpu.dir/ggml-cpu/repack.cpp.obj -c D:/stable-diffusion.cpp/ggml/src/ggml-cpu/repack.cpp In file included from D:/stable-diffusion.cpp/ggml/src/ggml-cpu/repack.cpp:3: In file included from D:/stable-diffusion.cpp/ggml/src/.\ggml-common.h:14: In file included from C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\cstdint:8: C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\yvals_core.h:908:1: error: static assertion failed: error STL1000: Unexpected compiler version, expected Clang 19.0.0 or newer. _EMIT_STL_ERROR(STL1000, "Unexpected compiler version, expected Clang 19.0.0 or newer."); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\yvals_core.h:534:44: note: expanded from macro '_EMIT_STL_ERROR' #define _EMIT_STL_ERROR(NUMBER, MESSAGE) static_assert(false, "error " #NUMBER ": " MESSAGE) ^ ~~~~~ 1 error generated. [6/125] Building CXX object ggml/src/CMakeFiles/ggml-cpu.dir/ggml-cpu/traits.cpp.obj FAILED: ggml/src/CMakeFiles/ggml-cpu.dir/ggml-cpu/traits.cpp.obj C:\PROGRA~1\AMD\ROCm\5.7\bin\CLANG_~1.EXE -DGGML_MAX_NAME=128 -DGGML_SCHED_MAX_COPIES=4 -DGGML_USE_CPU_REPACK -DSD_USE_CUDA -D_CRT_SECURE_NO_WARNINGS -D_XOPEN_SOURCE=600 -ID:/stable-diffusion.cpp/ggml/src/.. -ID:/stable-diffusion.cpp/ggml/src/. -ID:/stable-diffusion.cpp/ggml/src/ggml-cpu -ID:/stable-diffusion.cpp/ggml/src/../include -O3 -DNDEBUG -D_DLL -D_MT -Xclang --dependent-lib=msvcrt -std=gnu++17 -Wmissing-declarations -Wmissing-noreturn -Wall -Wextra -Wpedantic -Wcast-qual -Wno-unused-function -Wunreachable-code-break -Wunreachable-code-return -Wmissing-prototypes -Wextra-semi -march=native -MD -MT ggml/src/CMakeFiles/ggml-cpu.dir/ggml-cpu/traits.cpp.obj -MF ggml\src\CMakeFiles\ggml-cpu.dir\ggml-cpu\traits.cpp.obj.d -o ggml/src/CMakeFiles/ggml-cpu.dir/ggml-cpu/traits.cpp.obj -c D:/stable-diffusion.cpp/ggml/src/ggml-cpu/traits.cpp In file included from D:/stable-diffusion.cpp/ggml/src/ggml-cpu/traits.cpp:1: In file included from D:/stable-diffusion.cpp/ggml/src/ggml-cpu/traits.h:3: In file included from D:/stable-diffusion.cpp/ggml/src/ggml-cpu/ggml-cpu-impl.h:6: In file included from D:/stable-diffusion.cpp/ggml/src/.\ggml-impl.h:549: In file included from C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\initializer_list:8: C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\yvals_core.h:908:1: error: static assertion failed: error STL1000: Unexpected compiler version, expected Clang 19.0.0 or newer. _EMIT_STL_ERROR(STL1000, "Unexpected compiler version, expected Clang 19.0.0 or newer."); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\yvals_core.h:534:44: note: expanded from macro '_EMIT_STL_ERROR' #define _EMIT_STL_ERROR(NUMBER, MESSAGE) static_assert(false, "error " #NUMBER ": " MESSAGE) ^ ~~~~~ 1 error generated. [7/125] Building CXX object ggml/src/CMakeFiles/ggml-base.dir/gguf.cpp.obj FAILED: ggml/src/CMakeFiles/ggml-base.dir/gguf.cpp.obj C:\PROGRA~1\AMD\ROCm\5.7\bin\CLANG_~1.EXE -DGGML_COMMIT=\"7dee1d6a\" -DGGML_MAX_NAME=128 -DGGML_SCHED_MAX_COPIES=4 -DGGML_VERSION=\"0.0.2404\" -DSD_USE_CUDA -D_CRT_SECURE_NO_WARNINGS -D_XOPEN_SOURCE=600 -ID:/stable-diffusion.cpp/ggml/src/. -ID:/stable-diffusion.cpp/ggml/src/../include -O3 -DNDEBUG -D_DLL -D_MT -Xclang --dependent-lib=msvcrt -std=gnu++17 -Wmissing-declarations -Wmissing-noreturn -Wall -Wextra -Wpedantic -Wcast-qual -Wno-unused-function -Wunreachable-code-break -Wunreachable-code-return -Wmissing-prototypes -Wextra-semi -MD -MT ggml/src/CMakeFiles/ggml-base.dir/gguf.cpp.obj -MF ggml\src\CMakeFiles\ggml-base.dir\gguf.cpp.obj.d -o ggml/src/CMakeFiles/ggml-base.dir/gguf.cpp.obj -c D:/stable-diffusion.cpp/ggml/src/gguf.cpp In file included from D:/stable-diffusion.cpp/ggml/src/gguf.cpp:3: In file included from D:/stable-diffusion.cpp/ggml/src/./ggml-impl.h:549: In file included from C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\initializer_list:8: C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\yvals_core.h:908:1: error: static assertion failed: error STL1000: Unexpected compiler version, expected Clang 19.0.0 or newer. _EMIT_STL_ERROR(STL1000, "Unexpected compiler version, expected Clang 19.0.0 or newer."); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\yvals_core.h:534:44: note: expanded from macro '_EMIT_STL_ERROR' #define _EMIT_STL_ERROR(NUMBER, MESSAGE) static_assert(false, "error " #NUMBER ": " MESSAGE) ^ ~~~~~ 1 error generated. [8/125] Building CXX object ggml/src/CMakeFiles/ggml-base.dir/ggml-opt.cpp.obj FAILED: ggml/src/CMakeFiles/ggml-base.dir/ggml-opt.cpp.obj C:\PROGRA~1\AMD\ROCm\5.7\bin\CLANG_~1.EXE -DGGML_COMMIT=\"7dee1d6a\" -DGGML_MAX_NAME=128 -DGGML_SCHED_MAX_COPIES=4 -DGGML_VERSION=\"0.0.2404\" -DSD_USE_CUDA -D_CRT_SECURE_NO_WARNINGS -D_XOPEN_SOURCE=600 -ID:/stable-diffusion.cpp/ggml/src/. -ID:/stable-diffusion.cpp/ggml/src/../include -O3 -DNDEBUG -D_DLL -D_MT -Xclang --dependent-lib=msvcrt -std=gnu++17 -Wmissing-declarations -Wmissing-noreturn -Wall -Wextra -Wpedantic -Wcast-qual -Wno-unused-function -Wunreachable-code-break -Wunreachable-code-return -Wmissing-prototypes -Wextra-semi -MD -MT ggml/src/CMakeFiles/ggml-base.dir/ggml-opt.cpp.obj -MF ggml\src\CMakeFiles\ggml-base.dir\ggml-opt.cpp.obj.d -o ggml/src/CMakeFiles/ggml-base.dir/ggml-opt.cpp.obj -c D:/stable-diffusion.cpp/ggml/src/ggml-opt.cpp In file included from D:/stable-diffusion.cpp/ggml/src/ggml-opt.cpp:6: In file included from D:/stable-diffusion.cpp/ggml/src/./ggml-impl.h:549: In file included from C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\initializer_list:8: C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\yvals_core.h:908:1: error: static assertion failed: error STL1000: Unexpected compiler version, expected Clang 19.0.0 or newer. _EMIT_STL_ERROR(STL1000, "Unexpected compiler version, expected Clang 19.0.0 or newer."); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\yvals_core.h:534:44: note: expanded from macro '_EMIT_STL_ERROR' #define _EMIT_STL_ERROR(NUMBER, MESSAGE) static_assert(false, "error " #NUMBER ": " MESSAGE) ^ ~~~~~ 1 error generated. [9/125] Building CXX object ggml/src/CMakeFiles/ggml-cpu.dir/ggml-cpu/ggml-cpu.cpp.obj FAILED: ggml/src/CMakeFiles/ggml-cpu.dir/ggml-cpu/ggml-cpu.cpp.obj C:\PROGRA~1\AMD\ROCm\5.7\bin\CLANG_~1.EXE -DGGML_MAX_NAME=128 -DGGML_SCHED_MAX_COPIES=4 -DGGML_USE_CPU_REPACK -DSD_USE_CUDA -D_CRT_SECURE_NO_WARNINGS -D_XOPEN_SOURCE=600 -ID:/stable-diffusion.cpp/ggml/src/.. -ID:/stable-diffusion.cpp/ggml/src/. -ID:/stable-diffusion.cpp/ggml/src/ggml-cpu -ID:/stable-diffusion.cpp/ggml/src/../include -O3 -DNDEBUG -D_DLL -D_MT -Xclang --dependent-lib=msvcrt -std=gnu++17 -Wmissing-declarations -Wmissing-noreturn -Wall -Wextra -Wpedantic -Wcast-qual -Wno-unused-function -Wunreachable-code-break -Wunreachable-code-return -Wmissing-prototypes -Wextra-semi -march=native -MD -MT ggml/src/CMakeFiles/ggml-cpu.dir/ggml-cpu/ggml-cpu.cpp.obj -MF ggml\src\CMakeFiles\ggml-cpu.dir\ggml-cpu\ggml-cpu.cpp.obj.d -o ggml/src/CMakeFiles/ggml-cpu.dir/ggml-cpu/ggml-cpu.cpp.obj -c D:/stable-diffusion.cpp/ggml/src/ggml-cpu/ggml-cpu.cpp In file included from D:/stable-diffusion.cpp/ggml/src/ggml-cpu/ggml-cpu.cpp:4: In file included from D:/stable-diffusion.cpp/ggml/src/ggml-cpu/repack.h:4: In file included from D:/stable-diffusion.cpp/ggml/src/.\ggml-common.h:14: In file included from C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\cstdint:8: C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\yvals_core.h:908:1: error: static assertion failed: error STL1000: Unexpected compiler version, expected Clang 19.0.0 or newer. _EMIT_STL_ERROR(STL1000, "Unexpected compiler version, expected Clang 19.0.0 or newer."); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\yvals_core.h:534:44: note: expanded from macro '_EMIT_STL_ERROR' #define _EMIT_STL_ERROR(NUMBER, MESSAGE) static_assert(false, "error " #NUMBER ": " MESSAGE) ^ ~~~~~ 1 error generated. [10/125] Building CXX object ggml/src/CMakeFiles/ggml.dir/ggml-backend-reg.cpp.obj FAILED: ggml/src/CMakeFiles/ggml.dir/ggml-backend-reg.cpp.obj C:\PROGRA~1\AMD\ROCm\5.7\bin\CLANG_~1.EXE -DGGML_MAX_NAME=128 -DGGML_SCHED_MAX_COPIES=4 -DGGML_USE_CPU -DGGML_USE_CUDA -DGGML_USE_HIP -DSD_USE_CUDA -D_CRT_SECURE_NO_WARNINGS -D_XOPEN_SOURCE=600 -ID:/stable-diffusion.cpp/ggml/src/../include -O3 -DNDEBUG -D_DLL -D_MT -Xclang --dependent-lib=msvcrt -std=gnu++17 -Wmissing-declarations -Wmissing-noreturn -Wall -Wextra -Wpedantic -Wcast-qual -Wno-unused-function -Wunreachable-code-break -Wunreachable-code-return -Wmissing-prototypes -Wextra-semi -MD -MT ggml/src/CMakeFiles/ggml.dir/ggml-backend-reg.cpp.obj -MF ggml\src\CMakeFiles\ggml.dir\ggml-backend-reg.cpp.obj.d -o ggml/src/CMakeFiles/ggml.dir/ggml-backend-reg.cpp.obj -c D:/stable-diffusion.cpp/ggml/src/ggml-backend-reg.cpp In file included from D:/stable-diffusion.cpp/ggml/src/ggml-backend-reg.cpp:3: In file included from D:/stable-diffusion.cpp/ggml/src/ggml-impl.h:549: In file included from C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\initializer_list:8: C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\yvals_core.h:908:1: error: static assertion failed: error STL1000: Unexpected compiler version, expected Clang 19.0.0 or newer. _EMIT_STL_ERROR(STL1000, "Unexpected compiler version, expected Clang 19.0.0 or newer."); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\yvals_core.h:534:44: note: expanded from macro '_EMIT_STL_ERROR' #define _EMIT_STL_ERROR(NUMBER, MESSAGE) static_assert(false, "error " #NUMBER ": " MESSAGE) ^ ~~~~~ 1 error generated. [11/125] Building CXX object CMakeFiles/stable-diffusion.dir/upscaler.cpp.obj FAILED: CMakeFiles/stable-diffusion.dir/upscaler.cpp.obj C:\PROGRA~1\AMD\ROCm\5.7\bin\CLANG_~1.EXE -DGGML_MAX_NAME=128 -DGGML_USE_CPU -DGGML_USE_CUDA -DGGML_USE_HIP -DSD_USE_CUDA -ID:/stable-diffusion.cpp/. -ID:/stable-diffusion.cpp/thirdparty -ID:/stable-diffusion.cpp/ggml/src/../include -ID:/stable-diffusion.cpp/thirdparty/. -O3 -DNDEBUG -D_DLL -D_MT -Xclang --dependent-lib=msvcrt -MD -MT CMakeFiles/stable-diffusion.dir/upscaler.cpp.obj -MF CMakeFiles\stable-diffusion.dir\upscaler.cpp.obj.d -o CMakeFiles/stable-diffusion.dir/upscaler.cpp.obj -c D:/stable-diffusion.cpp/upscaler.cpp In file included from D:/stable-diffusion.cpp/upscaler.cpp:1: In file included from D:/stable-diffusion.cpp/./esrgan.hpp:4: In file included from D:/stable-diffusion.cpp/./ggml_extend.hpp:7: In file included from C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\algorithm:8: C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\yvals_core.h:908:1: error: static assertion failed: error STL1000: Unexpected compiler version, expected Clang 19.0.0 or newer. _EMIT_STL_ERROR(STL1000, "Unexpected compiler version, expected Clang 19.0.0 or newer."); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\yvals_core.h:534:44: note: expanded from macro '_EMIT_STL_ERROR' #define _EMIT_STL_ERROR(NUMBER, MESSAGE) static_assert(false, "error " #NUMBER ": " MESSAGE) ^ ~~~~~ 1 error generated. [13/125] Building CXX object CMakeFiles/stable-diffusion.dir/util.cpp.obj FAILED: CMakeFiles/stable-diffusion.dir/util.cpp.obj C:\PROGRA~1\AMD\ROCm\5.7\bin\CLANG_~1.EXE -DGGML_MAX_NAME=128 -DGGML_USE_CPU -DGGML_USE_CUDA -DGGML_USE_HIP -DSD_USE_CUDA -ID:/stable-diffusion.cpp/. -ID:/stable-diffusion.cpp/thirdparty -ID:/stable-diffusion.cpp/ggml/src/../include -ID:/stable-diffusion.cpp/thirdparty/. -O3 -DNDEBUG -D_DLL -D_MT -Xclang --dependent-lib=msvcrt -MD -MT CMakeFiles/stable-diffusion.dir/util.cpp.obj -MF CMakeFiles\stable-diffusion.dir\util.cpp.obj.d -o CMakeFiles/stable-diffusion.dir/util.cpp.obj -c D:/stable-diffusion.cpp/util.cpp In file included from D:/stable-diffusion.cpp/util.cpp:1: In file included from D:/stable-diffusion.cpp/./util.h:4: In file included from C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\cstdint:8: C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\yvals_core.h:908:1: error: static assertion failed: error STL1000: Unexpected compiler version, expected Clang 19.0.0 or newer. _EMIT_STL_ERROR(STL1000, "Unexpected compiler version, expected Clang 19.0.0 or newer."); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\yvals_core.h:534:44: note: expanded from macro '_EMIT_STL_ERROR' #define _EMIT_STL_ERROR(NUMBER, MESSAGE) static_assert(false, "error " #NUMBER ": " MESSAGE) ^ ~~~~~ In file included from D:/stable-diffusion.cpp/util.cpp:30: D:/stable-diffusion.cpp/thirdparty\stb_image_resize.h:760:31: warning: expression result unused [-Wunused-value] STBIR__DEBUG_ASSERT(scale <= 1); ~~~~~ ^ ~ D:/stable-diffusion.cpp/thirdparty\stb_image_resize.h:778:31: warning: expression result unused [-Wunused-value] STBIR__DEBUG_ASSERT(scale <= 1); ~~~~~ ^ ~ D:/stable-diffusion.cpp/thirdparty\stb_image_resize.h:1041:56: warning: expression result unused [-Wunused-value] STBIR__DEBUG_ASSERT(in_last_pixel - in_first_pixel <= (int)ceil(stbir__filter_info_table[filter].support(1/scale) * 2)); // Taken directly from stbir__get_coefficient_width() which we can't call because we don't know if we're horizontal or vertical. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ D:/stable-diffusion.cpp/thirdparty\stb_image_resize.h:1046:41: warning: expression result unused [-Wunused-value] STBIR__DEBUG_ASSERT(contributor->n1 >= contributor->n0); ~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~ D:/stable-diffusion.cpp/thirdparty\stb_image_resize.h:1064:128: warning: expression result unused [-Wunused-value] STBIR__DEBUG_ASSERT(stbir__filter_info_table[filter].kernel((float)(in_last_pixel + 1) + 0.5f - in_center_of_out, 1/scale) == 0); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~ D:/stable-diffusion.cpp/thirdparty\stb_image_resize.h:1066:38: warning: expression result unused [-Wunused-value] STBIR__DEBUG_ASSERT(total_filter > 0.9); ~~~~~~~~~~~~ ^ ~~~ D:/stable-diffusion.cpp/thirdparty\stb_image_resize.h:1067:38: warning: expression result unused [-Wunused-value] STBIR__DEBUG_ASSERT(total_filter < 1.1f); // Make sure it's not way off. ~~~~~~~~~~~~ ^ ~~~~ D:/stable-diffusion.cpp/thirdparty\stb_image_resize.h:1089:59: warning: expression result unused [-Wunused-value] STBIR__DEBUG_ASSERT(out_last_pixel - out_first_pixel <= (int)ceil(stbir__filter_info_table[filter].support(scale_ratio) * 2)); // Taken directly from stbir__get_coefficient_width() which we can't call because we don't know if we're horizontal or vertical. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ D:/stable-diffusion.cpp/thirdparty\stb_image_resize.h:1094:41: warning: expression result unused [-Wunused-value] STBIR__DEBUG_ASSERT(contributor->n1 >= contributor->n0); ~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~ D:/stable-diffusion.cpp/thirdparty\stb_image_resize.h:1103:133: warning: expression result unused [-Wunused-value] STBIR__DEBUG_ASSERT(stbir__filter_info_table[filter].kernel((float)(out_last_pixel + 1) + 0.5f - out_center_of_in, scale_ratio) == 0); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~ D:/stable-diffusion.cpp/thirdparty\stb_image_resize.h:1138:35: warning: expression result unused [-Wunused-value] STBIR__DEBUG_ASSERT(total > 0.9f); ~~~~~ ^ ~~~~ D:/stable-diffusion.cpp/thirdparty\stb_image_resize.h:1139:35: warning: expression result unused [-Wunused-value] STBIR__DEBUG_ASSERT(total < 1.1f); ~~~~~ ^ ~~~~ D:/stable-diffusion.cpp/thirdparty\stb_image_resize.h:1427:47: warning: expression result unused [-Wunused-value] STBIR__DEBUG_ASSERT(ring_buffer_index != stbir_info->ring_buffer_begin_index); ~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ D:/stable-diffusion.cpp/thirdparty\stb_image_resize.h:1459:32: warning: expression result unused [-Wunused-value] STBIR__DEBUG_ASSERT(n1 >= n0); ~~ ^ ~~ D:/stable-diffusion.cpp/thirdparty\stb_image_resize.h:1460:32: warning: expression result unused [-Wunused-value] STBIR__DEBUG_ASSERT(n0 >= -stbir_info->horizontal_filter_pixel_margin); ~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ D:/stable-diffusion.cpp/thirdparty\stb_image_resize.h:1461:32: warning: expression result unused [-Wunused-value] STBIR__DEBUG_ASSERT(n1 >= -stbir_info->horizontal_filter_pixel_margin); ~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ D:/stable-diffusion.cpp/thirdparty\stb_image_resize.h:1462:32: warning: expression result unused [-Wunused-value] STBIR__DEBUG_ASSERT(n0 < stbir_info->input_w + stbir_info->horizontal_filter_pixel_margin); ~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ D:/stable-diffusion.cpp/thirdparty\stb_image_resize.h:1463:32: warning: expression result unused [-Wunused-value] STBIR__DEBUG_ASSERT(n1 < stbir_info->input_w + stbir_info->horizontal_filter_pixel_margin); ~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ D:/stable-diffusion.cpp/thirdparty\stb_image_resize.h:1471:53: warning: expression result unused [-Wunused-value] STBIR__DEBUG_ASSERT(coefficient != 0); ~~~~~~~~~~~ ^ ~ D:/stable-diffusion.cpp/thirdparty\stb_image_resize.h:1480:53: warning: expression result unused [-Wunused-value] STBIR__DEBUG_ASSERT(coefficient != 0); ~~~~~~~~~~~ ^ ~ D:/stable-diffusion.cpp/thirdparty\stb_image_resize.h:1490:53: warning: expression result unused [-Wunused-value] STBIR__DEBUG_ASSERT(coefficient != 0); ~~~~~~~~~~~ ^ ~ D:/stable-diffusion.cpp/thirdparty\stb_image_resize.h:1501:53: warning: expression result unused [-Wunused-value] STBIR__DEBUG_ASSERT(coefficient != 0); ~~~~~~~~~~~ ^ ~ D:/stable-diffusion.cpp/thirdparty\stb_image_resize.h:1514:53: warning: expression result unused [-Wunused-value] STBIR__DEBUG_ASSERT(coefficient != 0); ~~~~~~~~~~~ ^ ~ D:/stable-diffusion.cpp/thirdparty\stb_image_resize.h:1537:25: warning: expression result unused [-Wunused-value] STBIR__DEBUG_ASSERT(!stbir__use_width_upsampling(stbir_info)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ D:/stable-diffusion.cpp/thirdparty\stb_image_resize.h:1555:53: warning: expression result unused [-Wunused-value] STBIR__DEBUG_ASSERT(coefficient != 0); ~~~~~~~~~~~ ^ ~ D:/stable-diffusion.cpp/thirdparty\stb_image_resize.h:1576:53: warning: expression result unused [-Wunused-value] STBIR__DEBUG_ASSERT(coefficient != 0); ~~~~~~~~~~~ ^ ~ D:/stable-diffusion.cpp/thirdparty\stb_image_resize.h:1598:53: warning: expression result unused [-Wunused-value] STBIR__DEBUG_ASSERT(coefficient != 0); ~~~~~~~~~~~ ^ ~ D:/stable-diffusion.cpp/thirdparty\stb_image_resize.h:1621:53: warning: expression result unused [-Wunused-value] STBIR__DEBUG_ASSERT(coefficient != 0); ~~~~~~~~~~~ ^ ~ D:/stable-diffusion.cpp/thirdparty\stb_image_resize.h:1646:53: warning: expression result unused [-Wunused-value] STBIR__DEBUG_ASSERT(coefficient != 0); ~~~~~~~~~~~ ^ ~ D:/stable-diffusion.cpp/thirdparty\stb_image_resize.h:2005:25: warning: expression result unused [-Wunused-value] STBIR__DEBUG_ASSERT(!stbir__use_height_upsampling(stbir_info)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ D:/stable-diffusion.cpp/thirdparty\stb_image_resize.h:2079:66: warning: expression result unused [-Wunused-value] STBIR__DEBUG_ASSERT(in_last_scanline - in_first_scanline <= stbir_info->vertical_filter_pixel_width); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ D:/stable-diffusion.cpp/thirdparty\stb_image_resize.h:2171:25: warning: expression result unused [-Wunused-value] STBIR__DEBUG_ASSERT(!stbir__use_height_upsampling(stbir_info)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ D:/stable-diffusion.cpp/thirdparty\stb_image_resize.h:2180:68: warning: expression result unused [-Wunused-value] STBIR__DEBUG_ASSERT(out_last_scanline - out_first_scanline <= stbir_info->vertical_filter_pixel_width); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ D:/stable-diffusion.cpp/thirdparty\stb_image_resize.h:2382:92: warning: expression result unused [-Wunused-value] STBIR__DEBUG_ASSERT((size_t)STBIR__NEXT_MEMPTR(info->encode_buffer, unsigned char) == (size_t)tempmem + tempmem_size_in_bytes); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ D:/stable-diffusion.cpp/thirdparty\stb_image_resize.h:2390:90: warning: expression result unused [-Wunused-value] STBIR__DEBUG_ASSERT((size_t)STBIR__NEXT_MEMPTR(info->ring_buffer, unsigned char) == (size_t)tempmem + tempmem_size_in_bytes); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ D:/stable-diffusion.cpp/util.cpp:406:5: warning: 'strncat' is deprecated: This function or variable may be unsafe. Consider using strncat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [-Wdeprecated-declarations] strncat(log_buffer, "\n", LOG_BUFFER_SIZE - strlen(log_buffer)); ^ C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\ucrt\string.h:262:1: note: 'strncat' has been explicitly marked deprecated here __DEFINE_CPP_OVERLOAD_STANDARD_NFUNC_0_2_EX( ^ C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\ucrt\corecrt.h:1921:17: note: expanded from macro '__DEFINE_CPP_OVERLOAD_STANDARD_NFUNC_0_2_EX' _CRT_INSECURE_DEPRECATE(_SecureFuncName) _DeclSpec _ReturnType __cdecl _FuncName(_SalAttributeDst _DstType *_Dst, _TType1 _TArg1, _TType2 _TArg2); ^ C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\vcruntime.h:368:55: note: expanded from macro '_CRT_INSECURE_DEPRECATE' #define _CRT_INSECURE_DEPRECATE(_Replacement) _CRT_DEPRECATE_TEXT( \ ^ C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\vcruntime.h:358:47: note: expanded from macro '_CRT_DEPRECATE_TEXT' #define _CRT_DEPRECATE_TEXT(_Text) __declspec(deprecated(_Text)) ^ 36 warnings and 1 error generated. [14/125] Building CXX object CMakeFiles/stable-diffusion.dir/stable-diffusion.cpp.obj FAILED: CMakeFiles/stable-diffusion.dir/stable-diffusion.cpp.obj C:\PROGRA~1\AMD\ROCm\5.7\bin\CLANG_~1.EXE -DGGML_MAX_NAME=128 -DGGML_USE_CPU -DGGML_USE_CUDA -DGGML_USE_HIP -DSD_USE_CUDA -ID:/stable-diffusion.cpp/. -ID:/stable-diffusion.cpp/thirdparty -ID:/stable-diffusion.cpp/ggml/src/../include -ID:/stable-diffusion.cpp/thirdparty/. -O3 -DNDEBUG -D_DLL -D_MT -Xclang --dependent-lib=msvcrt -MD -MT CMakeFiles/stable-diffusion.dir/stable-diffusion.cpp.obj -MF CMakeFiles\stable-diffusion.dir\stable-diffusion.cpp.obj.d -o CMakeFiles/stable-diffusion.dir/stable-diffusion.cpp.obj -c D:/stable-diffusion.cpp/stable-diffusion.cpp In file included from D:/stable-diffusion.cpp/stable-diffusion.cpp:1: In file included from D:/stable-diffusion.cpp/./ggml_extend.hpp:7: In file included from C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\algorithm:8: C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\yvals_core.h:908:1: error: static assertion failed: error STL1000: Unexpected compiler version, expected Clang 19.0.0 or newer. _EMIT_STL_ERROR(STL1000, "Unexpected compiler version, expected Clang 19.0.0 or newer."); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\yvals_core.h:534:44: note: expanded from macro '_EMIT_STL_ERROR' #define _EMIT_STL_ERROR(NUMBER, MESSAGE) static_assert(false, "error " #NUMBER ": " MESSAGE) ^ ~~~~~ 1 error generated. [15/125] Building CXX object CMakeFiles/stable-diffusion.dir/model.cpp.obj FAILED: CMakeFiles/stable-diffusion.dir/model.cpp.obj C:\PROGRA~1\AMD\ROCm\5.7\bin\CLANG_~1.EXE -DGGML_MAX_NAME=128 -DGGML_USE_CPU -DGGML_USE_CUDA -DGGML_USE_HIP -DSD_USE_CUDA -ID:/stable-diffusion.cpp/. -ID:/stable-diffusion.cpp/thirdparty -ID:/stable-diffusion.cpp/ggml/src/../include -ID:/stable-diffusion.cpp/thirdparty/. -O3 -DNDEBUG -D_DLL -D_MT -Xclang --dependent-lib=msvcrt -MD -MT CMakeFiles/stable-diffusion.dir/model.cpp.obj -MF CMakeFiles\stable-diffusion.dir\model.cpp.obj.d -o CMakeFiles/stable-diffusion.dir/model.cpp.obj -c D:/stable-diffusion.cpp/model.cpp In file included from D:/stable-diffusion.cpp/model.cpp:2: In file included from C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\fstream:8: C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\yvals_core.h:908:1: error: static assertion failed: error STL1000: Unexpected compiler version, expected Clang 19.0.0 or newer. _EMIT_STL_ERROR(STL1000, "Unexpected compiler version, expected Clang 19.0.0 or newer."); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\yvals_core.h:534:44: note: expanded from macro '_EMIT_STL_ERROR' #define _EMIT_STL_ERROR(NUMBER, MESSAGE) static_assert(false, "error " #NUMBER ": " MESSAGE)This seems to indicate that the version of clang built into hip5.7 is too low, and I think I need to upgrade to 6.2.4?
Also,when run
cmake .. -G "Ninja" -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DSD_HIPBLAS=ON -DCMAKE_BUILD_TYPE=Release -DAMDGPU_TARGETS=gfx1032
,,need set envHIP_PLATFORM = amdI successfully built
Here is the performance I tested using the same parameters
sd.cpp with vulkan 4.52s/it
sd.cpp with rocm6.2 3.3s/it
pytorch + rocm5.7 + zluda 4.5s/it (But VAE computation will additionally consume a considerable amount of time)Reacted by stduhpf, Erik Scholz, magictext and Wagner Bruna
When running SDXL models using Vulkan backend on an AMD Radeon RX 6600 (8GB VRAM), the UNET computation exhausts nearly all available VRAM. This forces subsequent VAE decoding to operate in fragmented slices.
Optimization Suggestions:
Model Swapping with Caching
During batch image generation:
Cache intermediate latent tensors after UNET computation
Completely unload the UNET model from VRAM
Load VAE model once and process all cached latents collectively
Asynchronous CPU Offloading
Implement pipelining where:
GPU processes UNET for image N+1
CPU simultaneously decodes VAE for image N (using cached latents)
These approaches could significantly reduce VRAM pressure and potentially improve throughput on GPUs with limited memory.