| 1147 | } |
| 1148 | |
| 1149 | void 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 | |
| 1158 | struct gguf_writer { |
| 1159 | std::vector<int8_t> & buf; |
no test coverage detected