mirror of
https://github.com/ggml-org/llama.cpp.git
synced 2026-11-26 23:29:34 +00:00
This reverts commit 1f3ea67fbf.
This commit is contained in:
parent
acb269e511
commit
8d35ba4f7b
1 changed files with 2 additions and 11 deletions
|
|
@ -9,8 +9,6 @@
|
|||
#include "ggml-metal-ops.h"
|
||||
#include "ggml-metal-tuning.h"
|
||||
|
||||
#include <TargetConditionals.h>
|
||||
|
||||
#include <mutex>
|
||||
#include <string>
|
||||
|
||||
|
|
@ -655,13 +653,6 @@ static void ggml_backend_metal_graph_optimize(ggml_backend_t backend, ggml_cgrap
|
|||
ggml_metal_graph_optimize(ctx, cgraph);
|
||||
}
|
||||
|
||||
// iOS can stop a command buffer that runs for more than a few seconds, so split the graph into shorter ones there
|
||||
#if TARGET_OS_IPHONE
|
||||
#define GGML_METAL_DEFAULT_N_CB 8
|
||||
#else
|
||||
#define GGML_METAL_DEFAULT_N_CB 1
|
||||
#endif // TARGET_OS_IPHONE
|
||||
|
||||
static void ggml_backend_metal_set_n_cb(ggml_backend_t backend, int n_cb) {
|
||||
GGML_ASSERT(ggml_backend_is_metal(backend));
|
||||
|
||||
|
|
@ -713,7 +704,7 @@ ggml_backend_t ggml_backend_metal_init(void) {
|
|||
/* .context = */ ctx,
|
||||
};
|
||||
|
||||
ggml_backend_metal_set_n_cb(backend, GGML_METAL_DEFAULT_N_CB);
|
||||
ggml_backend_metal_set_n_cb(backend, 1);
|
||||
|
||||
return backend;
|
||||
}
|
||||
|
|
@ -809,7 +800,7 @@ static ggml_backend_t ggml_backend_metal_device_init_backend(ggml_backend_dev_t
|
|||
/* .context = */ ctx,
|
||||
};
|
||||
|
||||
ggml_backend_metal_set_n_cb(backend, GGML_METAL_DEFAULT_N_CB);
|
||||
ggml_backend_metal_set_n_cb(backend, 1);
|
||||
|
||||
return backend;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue