| 1272 | } |
| 1273 | |
| 1274 | void 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 | |
| 1283 | struct gguf_writer_base { |
| 1284 | size_t written_bytes {0u}; |
nothing calls this directly
no test coverage detected