8000 rpc : use backend registry, support dl backends by slaren · Pull Request #13304 · ggml-org/llama.cpp · GitHub
[go: up one dir, main page]

Skip to content

rpc : use backend registry, support dl backends #13304

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
May 4, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix includes
  • Loading branch information
slaren committed May 4, 2025
commit 460ef29a7916d3c50021e1281308904816e7e497
37 changes: 17 additions & 20 deletions ggml/src/ggml-cpu/ggml-cpu.cpp
< 78F1 td id="diff-a477dcd253231ba10a0b8205e5146c7ec495379e23972705db78cc15db6bfa36L40" data-line-number="40" class="blob-num blob-num-context js-linkable-line-number">
Original file line number Diff line number Diff line change
Expand Up @@ -10,32 +10,27 @@
#include <string>
#include <vector>

#ifdef _WIN32
# include <windows.h>
#else
# include <sys/stat.h>
# include <unistd.h>
#endif

#ifdef GGML_USE_CPU_HBM
#include "ggml-cpu-hbm.h"
# include "ggml-cpu-hbm.h"
#endif

#ifdef GGML_USE_CPU_KLEIDIAI
#include "kleidiai/kleidiai.h"
#endif

#if defined(__APPLE__)
#include <sys/types.h>
#include <sys/sysctl.h>
# include "kleidiai/kleidiai.h"
#endif

#if defined(_WIN32)
#define WIN32_LEAN_AND_MEAN
#ifndef NOMINMAX
#define NOMINMAX
# define WIN32_LEAN_AND_MEAN
# ifndef NOMINMAX
# define NOMINMAX
# endif
# include <windows.h>
#else
# include <unistd.h>
#endif
#include <windows.h>

#if defined(__APPLE__)
# include <sys/sysctl.h>
# include <sys/types.h>
#endif

// ggml-backend interface
Expand Down Expand Up @@ -77,8 +72,10 @@ static ggml_backend_buffer_type_t * ggml_backend_cpu_device_get_extra_buffers_ty
}

static bool ggml_backend_cpu_is_extra_buffer_type(ggml_backend_buffer_type_t buft) {
for (auto extra : ggml_backend_cpu_get_extra_buffers_type()) {
if (extra && extra == buft) return true;
for (auto * extra : ggml_backend_cpu_get_extra_buffers_type()) {
if (extra && extra == buft) {
return true;
}
}
return false;
}
Expand Down
Loading
0