We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6a7a034 commit 51c38a2Copy full SHA for 51c38a2
src/ggml-backend-reg.cpp
@@ -549,4 +549,9 @@ void ggml_backend_load_all_from_path(const char * dir_path) {
549
ggml_backend_load_best("opencl", silent, dir_path);
550
ggml_backend_load_best("musa", silent, dir_path);
551
ggml_backend_load_best("cpu", silent, dir_path);
552
+ // check the environment variable GGML_BACKEND_NAME to load an out-of-tree backend
553
+ const char * backend_name = std::getenv("GGML_BACKEND_NAME");
554
+ if (backend_name) {
555
+ ggml_backend_load_best(backend_name, silent, dir_path);
556
+ }
557
}
0 commit comments