Replies: 2 comments 1 reply
-
|
Also is a bit fragile (if order of fields changes). Don't remember is C++ allows C99 { .field = value, ...} initialization. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Maybe this is what you misunderstand - the See the examples for more info. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
llama_batch_initdoes not indicate success of failure on malloc() which makes it difficult (but not impossible) to have graceful exit (or continue) on OOM.llama_batch_initalways initializes.n_tokensto zero not passedn_tokens_allocwhich forces caller to dobatch.n_tokens = n_tokens_alloc;malloc()succeed in the loop and some fail and returnnullptrin random order. It results inllama_batch_freeleaking memory stoppingfreetoo early.The code above forces called who want to check llama_batch before using it to do something like
Beta Was this translation helpful? Give feedback.
All reactions