Skip to content

Commit

Permalink
fix: fix metal build (#513)
Browse files Browse the repository at this point in the history
  • Loading branch information
stduhpf authored Dec 28, 2024
1 parent 8f4ab9a commit 0d9d665
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 7 deletions.
5 changes: 0 additions & 5 deletions ggml_extend.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1174,11 +1174,6 @@ struct GGMLRunner {
ggml_backend_cpu_set_n_threads(backend, n_threads);
}

#ifdef SD_USE_METAL
if (ggml_backend_is_metal(backend)) {
ggml_backend_metal_set_n_cb(backend, n_threads);
}
#endif
ggml_backend_graph_compute(backend, gf);
#ifdef GGML_PERF
ggml_graph_print(gf);
Expand Down
2 changes: 1 addition & 1 deletion stable-diffusion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ class StableDiffusionGGML {
#endif
#ifdef SD_USE_METAL
LOG_DEBUG("Using Metal backend");
ggml_backend_metal_log_set_callback(ggml_log_callback_default, nullptr);
ggml_log_set(ggml_log_callback_default, nullptr);
backend = ggml_backend_metal_init();
#endif
#ifdef SD_USE_VULKAN
Expand Down
2 changes: 1 addition & 1 deletion upscaler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ struct UpscalerGGML {
#endif
#ifdef SD_USE_METAL
LOG_DEBUG("Using Metal backend");
ggml_backend_metal_log_set_callback(ggml_log_callback_default, nullptr);
ggml_log_set(ggml_log_callback_default, nullptr);
backend = ggml_backend_metal_init();
#endif
#ifdef SD_USE_VULKAN
Expand Down

0 comments on commit 0d9d665

Please sign in to comment.