Upgrade init_tensor API to return a ggml_status#11854
Upgrade init_tensor API to return a ggml_status#11854slaren merged 2 commits intoggml-org:masterfrom
Conversation
150ffe8 to
d12a712
Compare
|
@slaren review please. Tks. |
d12a712 to
1205554
Compare
|
Tks @slaren |
e2486eb to
51a0f6c
Compare
graehl
left a comment
There was a problem hiding this comment.
ok, so ggml_backend_*_buffer_init_tensor can only return success for most backends but since it's called through the interface init_tensor pointer they still need to return success. was the plan to eventually make cuda_init_tensor sometimes return an error?
|
Tks @graehl
Yes but that a another PR in the ggml repo |
|
@slaren reready for review please. Best. |
matiaslin
left a comment
There was a problem hiding this comment.
Good step forward towards the goal of returning an error instead of crashing.
|
@ggerganov review please |
There was a problem hiding this comment.
This will leak memory if it fails.
51a0f6c to
1bae362
Compare
To prepare for an 'abort-free' ggml (ggml not to abort on OOMs but return a OOM status), as agreeed with Diego in the ggml repo, upgrade the init_tensor() and view_init() APIs to return a ggml_status.
1bae362 to
aa12f29
Compare
|
@ggerganov I now have to retouch my PR in ggml. Could you please trigger a sync of ggml from llamacpp to the ggml repo? |
|
@WilliamTambellini Should be good now. |
* Upgrade init_tensor API to return a ggml_status To prepare for an 'abort-free' ggml (ggml not to abort on OOMs but return a OOM status), as agreeed with Diego in the ggml repo, upgrade the init_tensor() and view_init() APIs to return a ggml_status. * misc fixes --------- Co-authored-by: slaren <slarengh@gmail.com>
* Upgrade init_tensor API to return a ggml_status To prepare for an 'abort-free' ggml (ggml not to abort on OOMs but return a OOM status), as agreeed with Diego in the ggml repo, upgrade the init_tensor() and view_init() APIs to return a ggml_status. * misc fixes --------- Co-authored-by: slaren <slarengh@gmail.com>
To prepare for an 'abort-free' ggml, as agreeed with Diego in the ggml repo, upgrade the backend init_tensor APIs to return a ggml_status.
Make sure to read the contributing guidelines before submitting a PR