|
66 | 66 | #include "ggml-kompute.h" |
67 | 67 | #endif |
68 | 68 |
|
| 69 | +#ifdef GGML_USE_ZDNN |
| 70 | +#include "ggml-zdnn.h" |
| 71 | +#endif |
| 72 | + |
69 | 73 | // disable C++17 deprecation warning for std::codecvt_utf8 |
70 | 74 | #if defined(__clang__) |
71 | 75 | # pragma clang diagnostic push |
@@ -180,6 +184,9 @@ struct ggml_backend_registry { |
180 | 184 | #ifdef GGML_USE_KOMPUTE |
181 | 185 | register_backend(ggml_backend_kompute_reg()); |
182 | 186 | #endif |
| 187 | +#ifdef GGML_USE_ZDNN |
| 188 | + register_backend(ggml_backend_zdnn_reg()); |
| 189 | +#endif |
183 | 190 | #ifdef GGML_USE_CPU |
184 | 191 | register_backend(ggml_backend_cpu_reg()); |
185 | 192 | #endif |
@@ -562,18 +569,19 @@ void ggml_backend_load_all_from_path(const char * dir_path) { |
562 | 569 | bool silent = false; |
563 | 570 | #endif |
564 | 571 |
|
565 | | - ggml_backend_load_best("blas", silent, dir_path); |
566 | | - ggml_backend_load_best("cann", silent, dir_path); |
567 | | - ggml_backend_load_best("cuda", silent, dir_path); |
568 | | - ggml_backend_load_best("hip", silent, dir_path); |
| 572 | + ggml_backend_load_best("blas" , silent, dir_path); |
| 573 | + ggml_backend_load_best("cann" , silent, dir_path); |
| 574 | + ggml_backend_load_best("cuda" , silent, dir_path); |
| 575 | + ggml_backend_load_best("hip" , silent, dir_path); |
569 | 576 | ggml_backend_load_best("kompute", silent, dir_path); |
570 | | - ggml_backend_load_best("metal", silent, dir_path); |
571 | | - ggml_backend_load_best("rpc", silent, dir_path); |
572 | | - ggml_backend_load_best("sycl", silent, dir_path); |
573 | | - ggml_backend_load_best("vulkan", silent, dir_path); |
574 | | - ggml_backend_load_best("opencl", silent, dir_path); |
575 | | - ggml_backend_load_best("musa", silent, dir_path); |
576 | | - ggml_backend_load_best("cpu", silent, dir_path); |
| 577 | + ggml_backend_load_best("metal" , silent, dir_path); |
| 578 | + ggml_backend_load_best("rpc" , silent, dir_path); |
| 579 | + ggml_backend_load_best("sycl" , silent, dir_path); |
| 580 | + ggml_backend_load_best("vulkan" , silent, dir_path); |
| 581 | + ggml_backend_load_best("opencl" , silent, dir_path); |
| 582 | + ggml_backend_load_best("musa" , silent, dir_path); |
| 583 | + ggml_backend_load_best("zdnn" , silent, dir_path); |
| 584 | + ggml_backend_load_best("cpu" , silent, dir_path); |
577 | 585 | // check the environment variable GGML_BACKEND_PATH to load an out-of-tree backend |
578 | 586 | const char * backend_path = std::getenv("GGML_BACKEND_PATH"); |
579 | 587 | if (backend_path) { |
|
0 commit comments