Skip to content

Commit fb49268

Browse files
committed
fix: set global flag for Metal usage in ggml_backend_reg_layla
1 parent d2ff79f commit fb49268

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

ggml/src/ggml-backend-reg.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,9 @@ int is_i8mm_supported()
338338
}
339339

340340
void ggml_backend_reg_layla(bool useVulkan, bool useOpenCL, bool useHexagon, bool useMetal) {
341+
// set the global flag for Metal usage first
342+
_useMetal = useMetal;
343+
341344
if(useVulkan) {
342345
get_reg().load_backend("libggml-vulkan.so", false);
343346
}
@@ -350,8 +353,6 @@ void ggml_backend_reg_layla(bool useVulkan, bool useOpenCL, bool useHexagon, boo
350353
get_reg().load_backend("libggml-hexagon.so", false);
351354
}
352355

353-
_useMetal = useMetal;
354-
355356
// load cpu backend depending on feature detection
356357
if(is_i8mm_supported()) {
357358
get_reg().load_backend("libggml-blas.so", false);

ggml/src/kompute

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Subproject commit 4565194ed7c32d1d2efa32ceab4d3c6cae006306

0 commit comments

Comments
 (0)