summaryrefslogtreecommitdiff
path: root/ggml.c
diff options
context:
space:
mode:
authorStephan Walter <stephan@walter.name>2023-03-17 17:47:35 +0000
committerGitHub <noreply@github.com>2023-03-17 19:47:35 +0200
commit367946c668757532deed929e1d78673c6ac6bcb8 (patch)
tree55245c6c86103db1777b3dcd0831dbd72184a3c2 /ggml.c
parent6b0df5ccf360fe5c015f6607f0375bfc6849005e (diff)
Don't tell users to use a bad number of threads (#243)
The readme tells people to use the command line option "-t 8", causing 8 threads to be started. On systems with fewer than 8 cores, this causes a significant slowdown. Remove the option from the example command lines and use /proc/cpuinfo on Linux to determine a sensible default.
Diffstat (limited to 'ggml.c')
-rw-r--r--ggml.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/ggml.c b/ggml.c
index c4f83891..4fb83adb 100644
--- a/ggml.c
+++ b/ggml.c
@@ -9318,10 +9318,6 @@ static thread_ret_t ggml_graph_compute_thread(void * data) {
}
void ggml_graph_compute(struct ggml_context * ctx, struct ggml_cgraph * cgraph) {
- if (cgraph->n_threads <= 0) {
- cgraph->n_threads = 8;
- }
-
const int n_threads = cgraph->n_threads;
struct ggml_compute_state_shared state_shared = {