Skip to content

Commit cdf20e8

Browse files
committed
HACK: ggml-backend-reg: allow disabling the Vulkan backend
1 parent da4bb3f commit cdf20e8

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

ggml/src/ggml-backend-reg.cpp

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -200,13 +200,12 @@ struct ggml_backend_registry {
200200
register_backend(ggml_backend_sycl_reg());
201201
#endif
202202
#ifdef GGML_USE_VULKAN
203-
/* HACK: when compiling the APIR frontend/backend
204-
* simultaneously, with vulkan, vulkan gets loaded in the
205-
* frontend side and the ggml-remotingfrontend receives
206-
* unknown VK buffers ... */
207-
#ifndef GGML_USE_REMOTINGBACKEND
208-
//register_backend(ggml_backend_vk_reg());
209-
#endif
203+
// Add runtime disable check
204+
if (getenv("GGML_DISABLE_VULKAN") == nullptr) {
205+
register_backend(ggml_backend_vk_reg());
206+
} else {
207+
GGML_LOG_DEBUG("Vulkan backend disabled by GGML_DISABLE_VULKAN environment variable");
208+
}
210209
#endif
211210
#ifdef GGML_USE_WEBGPU
212211
register_backend(ggml_backend_webgpu_reg());

0 commit comments

Comments
 (0)