MCPcopy Create free account
hub / github.com/0xShug0/audio.cpp / gguf_set_tensor_data

Function gguf_set_tensor_data

external/ggml/src/gguf.cpp:1274–1281  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1272}
1273
1274void gguf_set_tensor_data(struct gguf_context * ctx, const char * name, const void * data) {
1275 const int64_t tensor_id = gguf_find_tensor(ctx, name);
1276 if (tensor_id < 0) {
1277 GGML_ABORT("tensor not found: %s", name);
1278 }
1279
1280 ctx->info[tensor_id].t.data = (void *)(uintptr_t)data; // double cast suppresses warning about casting away const
1281}
1282
1283struct gguf_writer_base {
1284 size_t written_bytes {0u};

Callers

nothing calls this directly

Calls 1

gguf_find_tensorFunction · 0.85

Tested by

no test coverage detected