ALT: ggml/src/ggml-backend-reg.cpp: Fix backend dl object path concatenation

newfstatat(AT_FDCWD, "./libggml-cuda.so", 0x7ffee8977f00, 0) = -1 ENOENT (No such file or directory)
  newfstatat(AT_FDCWD, "/usr/srclibggml-cuda.so", 0x7ffee8977f00, 0) = -1 ENOENT (No such file or directory)

Signed-off-by: Vitaly Chikunov <vt@altlinux.org>
This commit is contained in:
Vitaly Chikunov 2025-03-08 21:50:13 +03:00
parent 69115aa6a5
commit 6c883bac1f

View file

@ -537,7 +537,7 @@ static ggml_backend_reg_t ggml_backend_load_best(const char * name, bool silent,
// try to load the base backend
for (const auto & search_path : search_paths) {
fs::path filename = backend_filename_prefix().native() + name_path.native() + backend_filename_extension().native();
fs::path path = search_path.native() + filename.native();
fs::path path = search_path / filename;
if (fs::exists(path)) {
return get_reg().load_backend(path, silent);
}