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

Function gguf_set_tensor_data

subprojects/llama.cpp/ggml/src/gguf.cpp:1168–1175  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1166}
1167
1168void gguf_set_tensor_data(struct gguf_context * ctx, const char * name, const void * data) {
1169 const int64_t tensor_id = gguf_find_tensor(ctx, name);
1170 if (tensor_id < 0) {
1171 GGML_ABORT("tensor not found: %s", name);
1172 }
1173
1174 ctx->info[tensor_id].t.data = (void *)(uintptr_t)data; // double cast suppresses warning about casting away const
1175}
1176
1177struct gguf_writer_base {
1178 size_t written_bytes {0u};

Callers 1

Calls 1

gguf_find_tensorFunction · 0.85

Tested by

no test coverage detected