MCPcopy Create free account
hub / github.com/appdevforall/CodeOnTheGo / can_reuse

Method can_reuse

subprojects/llama.cpp/src/llama-graph.cpp:34–41  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32}
33
34bool llm_graph_input_embd::can_reuse(const llm_graph_params & params) {
35 bool res = true;
36
37 res &= (!params.ubatch.token) || (tokens && tokens->ne[0] == params.ubatch.n_tokens);
38 res &= (!params.ubatch.embd) || (embd && embd->ne[1] == params.ubatch.n_tokens);
39
40 return res;
41}
42
43void llm_graph_input_pos::set_input(const llama_ubatch * ubatch) {
44 if (ubatch->pos && pos) {

Callers 1

process_ubatchMethod · 0.45

Calls 10

get_n_rsMethod · 0.80
get_headMethod · 0.80
get_rs_zMethod · 0.80
get_n_kvMethod · 0.80
get_swaMethod · 0.80
allow_reuseMethod · 0.80
sizeMethod · 0.65
get_baseMethod · 0.45
get_attnMethod · 0.45
get_recrMethod · 0.45

Tested by

no test coverage detected