Skip to content

Commit 56437f3

Browse files
threadpool: replace checks for compute_thread ret code with proper status check
1 parent a30c3d8 commit 56437f3

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

ggml/src/ggml.c

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19218,13 +19218,9 @@ static thread_ret_t ggml_graph_compute_secondary_thread(void* data) {
1921819218
if (state->pending) {
1921919219
state->pending = false;
1922019220

19221-
int64_t ret = (int64_t) ggml_graph_compute_thread(state);
19222-
if (ret == GGML_EXIT_ABORTED)
19223-
return (thread_ret_t) ret;
19224-
19225-
if (ret != GGML_EXIT_SUCCESS && ret != GGML_EXIT_ABORTED) {
19226-
fprintf(stderr, "ggml_graph_compute_thread exited with an unexpected error: %lld\n", (long long int) ret);
19227-
GGML_ASSERT(false);
19221+
ggml_graph_compute_thread(state);
19222+
if (state->threadpool->ec != GGML_STATUS_SUCCESS) {
19223+
break;
1922819224
}
1922919225
}
1923019226
}

0 commit comments

Comments
 (0)