MCPcopy Create free account
hub / github.com/Tiiny-AI/PowerInfer / resize

Method resize

llama.cpp:818–831  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

816 bool fallback = false;
817
818 void resize(size_t n) {
819 llama_host_free(data);
820
821 data = llama_host_malloc(n);
822 if (!data) {
823 fallback = true;
824 data = malloc(n);
825 } else {
826 fallback = false;
827 }
828
829 GGML_ASSERT(data);
830 size = n;
831 }
832
833 ~llama_buffer() {
834 if (data) {

Callers 15

llama_token_to_pieceFunction · 0.45
llama_kv_cache_initFunction · 0.45
llm_load_vocabFunction · 0.45
llm_load_tensorsFunction · 0.45
llama_decode_internalFunction · 0.45
shift_tokensMethod · 0.45
collapse_beamsMethod · 0.45

Calls 2

llama_host_freeFunction · 0.85
llama_host_mallocFunction · 0.85

Tested by 2

mainFunction · 0.36