| 1166 | } |
| 1167 | |
| 1168 | void 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 | |
| 1177 | struct gguf_writer_base { |
| 1178 | size_t written_bytes {0u}; |
no test coverage detected