Ship portable CPU dispatch and verified shared runtime dependencies
This commit is contained in:
1 parent
278b09f82c
commit
0bba1a0aa7
19 files changed
+675
-17
No files matched your search
@@ -0,0 +1,31 @@
|
||||
--- a/ggml/include/ggml-backend.h
|
||||
+++ b/ggml/include/ggml-backend.h
|
||||
@@ -260,6 +260,8 @@
|
||||
// Load all known backends from dynamic libraries
|
||||
GGML_API void ggml_backend_load_all(void);
|
||||
GGML_API void ggml_backend_load_all_from_path(const char * dir_path);
|
||||
+ // Searchi: explicit CPU-only startup, independent of per-DLL CRT environment state.
|
||||
+ GGML_API void ggml_backend_load_cpu_only_from_path(const char * dir_path);
|
||||
|
||||
//
|
||||
// Backend scheduler
|
||||
--- a/ggml/src/ggml-backend-reg.cpp
|
||||
+++ b/ggml/src/ggml-backend-reg.cpp
|
||||
@@ -575,6 +575,17 @@
|
||||
ggml_backend_load_all_from_path(nullptr);
|
||||
}
|
||||
|
||||
+void ggml_backend_load_cpu_only_from_path(const char * dir_path) {
|
||||
+#ifdef NDEBUG
|
||||
+ const bool silent = true;
|
||||
+#else
|
||||
+ const bool silent = false;
|
||||
+#endif
|
||||
+ // Do not inspect GPU backends or GGML_BACKEND_PATH. The caller supplies
|
||||
+ // the executable directory, so working-directory discovery is excluded.
|
||||
+ ggml_backend_load_best("cpu", silent, dir_path);
|
||||
+}
|
||||
+
|
||||
void ggml_backend_load_all_from_path(const char * dir_path) {
|
||||
#ifdef NDEBUG
|
||||
bool silent = true;
|
||||
Reference in new issue
Block a user