stable-diffusion.cpp/src/core
Claude 6bb3b8de16
fix: load the CUDA driver at run time so the library starts without it
stable-diffusion.dll linked the driver import library only to read the
compute capability of the device, so it imported nvcuda.dll at load time. On a
machine without an NVIDIA driver, such as the CI runner, sd-cli.exe could not
start at all (status 127 in Git Bash): the smoke test of the cuda12 portable
package failed, and the package would not have run on a CPU-only PC either.

The three driver functions are now looked up with LoadLibraryEx/dlopen the
first time a CUDA device is queried, and the library no longer links the driver.

The smoke test of the portable workflow now lists the DLLs a Windows
executable imports, and the ones that cannot be found, when it fails to start.

Claude-Session: https://claude.ai/code/session_01EhZzDBkuuMp1jBf4WtEySC
2026-10-11 12:51:59 +02:00
..
backend_diag.cpp feat: log why a GPU backend module could not be used 2026-10-11 05:52:43 +02:00
backend_diag.h feat: log why a GPU backend module could not be used 2026-10-11 05:52:43 +02:00
backend_fit.cpp feat: run CPU graphs in segments when weights stream from disk 2026-10-11 06:39:34 +02:00
backend_fit.h feat: run CPU graphs in segments when weights stream from disk 2026-10-11 06:39:34 +02:00
compute_workspace.cpp feat: support building with upstream ggml (#1999) 2026-09-19 22:25:01 +08:00
compute_workspace.h fix: guard GPU memory capacity and propagate encoding failures (#1958) 2026-09-13 21:35:46 +08:00
cuda_driver.cpp fix: load the CUDA driver at run time so the library starts without it 2026-10-11 12:51:59 +02:00
cuda_driver.h fix: load the CUDA driver at run time so the library starts without it 2026-10-11 12:51:59 +02:00
ggml_extend.cpp chore: resolve MSVC warnings in ggml extensions 2026-10-06 20:10:36 +08:00
ggml_extend.h fix: scale Qwen Image 2.1 VAE convolutions (#2054) 2026-09-25 15:52:35 +08:00
ggml_extend_backend.cpp fix: load the CUDA driver at run time so the library starts without it 2026-10-11 12:51:59 +02:00
ggml_extend_backend.h feat: log why a GPU backend module could not be used 2026-10-11 05:52:43 +02:00
ggml_graph_cut.cpp feat: support building with upstream ggml (#1999) 2026-09-19 22:25:01 +08:00
ggml_graph_cut.h perf: reduce CPU overhead in graph execution and sampling (#1997) 2026-09-19 18:32:58 +08:00
ggml_runner.cpp feat: report why a call failed and expose system memory 2026-10-11 07:09:28 +02:00
ggml_runner.h feat: add configurable Qwen cache types and early cache scheduling (#2045) 2026-09-25 01:51:01 +08:00
ggml_tensor_utils.cpp refactor: split ggml extensions and move implementations to cpp files (#1945) 2026-09-07 23:34:45 +08:00
ggml_tensor_utils.h refactor: split ggml extensions and move implementations to cpp files (#1945) 2026-09-07 23:34:45 +08:00
last_error.cpp feat: report why a call failed and expose system memory 2026-10-11 07:09:28 +02:00
last_error.h feat: report why a call failed and expose system memory 2026-10-11 07:09:28 +02:00
layer_split_partition.cpp feat: add verbose logging and log-level selection (#1941) 2026-09-06 23:14:03 +08:00
layer_split_partition.h feat: drive layer split from graph-cut segments (#1762) 2026-07-07 23:16:52 +08:00
memory_watchdog.cpp feat: apply --memory-guard to CPU backends using system RAM 2026-10-11 04:51:58 +02:00
memory_watchdog.h feat: apply --memory-guard to CPU backends using system RAM 2026-10-11 04:51:58 +02:00
ordered_map.hpp refactor: unify model source and weight lifecycle management (#1956) 2026-09-10 23:53:48 +08:00
parallel.cpp perf: parallelize host tensor elementwise and broadcast ops (#1998) 2026-09-19 21:46:16 +08:00
parallel.h perf: parallelize host tensor elementwise and broadcast ops (#1998) 2026-09-19 21:46:16 +08:00
pe_imports.cpp feat: log why a GPU backend module could not be used 2026-10-11 05:52:43 +02:00
pe_imports.h feat: log why a GPU backend module could not be used 2026-10-11 05:52:43 +02:00
regex.cpp feat: support external Hugging Face tokenizer JSON files (#1973) 2026-09-15 00:27:39 +08:00
regex.h feat: support external Hugging Face tokenizer JSON files (#1973) 2026-09-15 00:27:39 +08:00
rng.hpp feat: support Brownian tree noise in all noise injection samplers (#1899) 2026-09-15 02:37:31 +08:00
rng_mt19937.hpp feat: support Brownian tree noise in all noise injection samplers (#1899) 2026-09-15 02:37:31 +08:00
rng_philox.hpp perf: reduce CPU overhead in graph execution and sampling (#1997) 2026-09-19 18:32:58 +08:00
runner_cache.cpp feat: add Qwen Image 2.1 prefix KV cache (#2035) 2026-09-23 23:08:21 +08:00
runner_cache.h feat: add Qwen Image 2.1 prefix KV cache (#2035) 2026-09-23 23:08:21 +08:00
segment_graph_bindings.cpp refactor: unify runner lifecycles and weight residency (#1940) 2026-09-06 22:30:45 +08:00
segment_graph_bindings.h refactor: unify runner lifecycles and weight residency (#1940) 2026-09-06 22:30:45 +08:00
segment_weight_pipeline.cpp refactor: unify runner lifecycles and weight residency (#1940) 2026-09-06 22:30:45 +08:00
segment_weight_pipeline.h refactor: unify runner lifecycles and weight residency (#1940) 2026-09-06 22:30:45 +08:00
system_memory.cpp feat: report why a call failed and expose system memory 2026-10-11 07:09:28 +02:00
system_memory.h feat: report why a call failed and expose system memory 2026-10-11 07:09:28 +02:00
tensor.hpp perf: parallelize host tensor elementwise and broadcast ops (#1998) 2026-09-19 21:46:16 +08:00
tensor_ggml.hpp refactor: unify runner lifecycles and weight residency (#1940) 2026-09-06 22:30:45 +08:00
util.cpp feat: report why a call failed and expose system memory 2026-10-11 07:09:28 +02:00
util.h refactor: escape newlines in prompt logs and clarify source separators (#2106) 2026-10-06 19:51:12 +08:00