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

Function gguf_set_tensor_data

smallthinker/ggml/src/gguf.cpp:1149–1156  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1147}
1148
1149void gguf_set_tensor_data(struct gguf_context * ctx, const char * name, const void * data) {
1150 const int64_t tensor_id = gguf_find_tensor(ctx, name);
1151 if (tensor_id < 0) {
1152 GGML_ABORT("tensor not found: %s", name);
1153 }
1154
1155 ctx->info[tensor_id].t.data = (void *)(uintptr_t)data; // double cast suppresses warning about casting away const
1156}
1157
1158struct gguf_writer {
1159 std::vector<int8_t> & buf;

Callers 1

Calls 1

gguf_find_tensorFunction · 0.70

Tested by

no test coverage detected