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

Function ggml_get_first_tensor

subprojects/llama.cpp/ggml/src/ggml.c:1873–1887  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1871}
1872
1873struct ggml_tensor * ggml_get_first_tensor(const struct ggml_context * ctx) {
1874 struct ggml_object * obj = ctx->objects_begin;
1875
1876 char * const mem_buffer = ctx->mem_buffer;
1877
1878 while (obj != NULL) {
1879 if (obj->type == GGML_OBJECT_TYPE_TENSOR) {
1880 return (struct ggml_tensor *)(mem_buffer + obj->offs);
1881 }
1882
1883 obj = obj->next;
1884 }
1885
1886 return NULL;
1887}
1888
1889struct ggml_tensor * ggml_get_next_tensor(const struct ggml_context * ctx, struct ggml_tensor * tensor) {
1890 struct ggml_object * obj = (struct ggml_object *) ((char *)tensor - GGML_OBJECT_SIZE);

Callers 15

file_inputMethod · 0.85
load_imatrixFunction · 0.85
load_imatrixMethod · 0.85
load_tensorsMethod · 0.85
llama_kv_cacheMethod · 0.85
llama_model_loaderMethod · 0.85
get_mapping_rangeMethod · 0.85
load_all_dataMethod · 0.85
assign_namesFunction · 0.85
check_max_sizeFunction · 0.85
initialize_tensorsMethod · 0.85

Calls

no outgoing calls

Tested by 15

assign_namesFunction · 0.68
check_max_sizeFunction · 0.68
initialize_tensorsMethod · 0.68
evalMethod · 0.68
eval_gradMethod · 0.68
initialize_tensorsMethod · 0.68
initialize_tensorsMethod · 0.68
initialize_tensorsMethod · 0.68
initialize_tensorsMethod · 0.68
initialize_tensorsMethod · 0.68
initialize_tensorsMethod · 0.68
initialize_tensorsMethod · 0.68