]> git.djapps.eu Git - pkg/ggml/sources/ggml/commit
ggml : add callback to abort ggml_graph_compute() (#328)
authorArjun <redacted>
Tue, 11 Jul 2023 19:11:45 +0000 (00:41 +0530)
committerGitHub <redacted>
Tue, 11 Jul 2023 19:11:45 +0000 (22:11 +0300)
commitaded8980a10b5eed59d5608bf8cb9032b40df7ce
tree116d5790d78178443eb42d7da93a2e58a6296d44
parentf5165d0392da6013160971534a5cc60643fa2d37
ggml : add callback to abort ggml_graph_compute() (#328)

* mechanism to abort ggml_graph_compute

* use pthread_cancel

* forgot to commit ggml.h

* static always_false()

Co-authored-by: Georgi Gerganov <redacted>
* accept callback data

* proper function prototype

* return exit status

* remove pthread_cancel and join every thread

* put abort_callback onto cplan

* cplan abort_callback in ggml.c

* make sure all threads abort

---------

Co-authored-by: Georgi Gerganov <redacted>
include/ggml/ggml.h
src/ggml.c