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

Function ggml_get_tensor

ggml.c:3092–3109  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3090}
3091
3092struct ggml_tensor * ggml_get_tensor(struct ggml_context * ctx, const char * name) {
3093 struct ggml_object * obj = ctx->objects_begin;
3094
3095 char * const mem_buffer = ctx->mem_buffer;
3096
3097 while (obj != NULL) {
3098 if (obj->type == GGML_OBJECT_TENSOR) {
3099 struct ggml_tensor * cur = (struct ggml_tensor *)(mem_buffer + obj->offs);
3100 if (strcmp(cur->name, name) == 0) {
3101 return cur;
3102 }
3103 }
3104
3105 obj = obj->next;
3106 }
3107
3108 return NULL;
3109}
3110
3111////////////////////////////////////////////////////////////////////////////////
3112

Callers 14

llama_model_loaderMethod · 0.70
get_tensor_metaMethod · 0.70
create_tensorMethod · 0.70
load_all_dataMethod · 0.70
llm_load_tensorsFunction · 0.70
llama_get_model_tensorFunction · 0.70
copy_tensor_by_nameFunction · 0.50
apply_loraFunction · 0.50
export_loraFunction · 0.50
get_tensorFunction · 0.50
clip_model_loadFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected