We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3ee194f commit c66b7d2Copy full SHA for c66b7d2
ggml/src/ggml.c
@@ -22956,6 +22956,14 @@ void gguf_add_tensor(
22956
ctx->header.n_tensors++;
22957
}
22958
22959
+void gguf_set_tensor_ndim(struct gguf_context * ctx, const char * name, const int n_dim) {
22960
+ const int idx = gguf_find_tensor(ctx, name);
22961
+ if (idx < 0) {
22962
+ GGML_ABORT("tensor not found");
22963
+ }
22964
+ ctx->infos[idx].n_dims = n_dim;
22965
+}
22966
+
22967
void gguf_set_tensor_type(struct gguf_context * ctx, const char * name, enum ggml_type type) {
22968
const int idx = gguf_find_tensor(ctx, name);
22969
if (idx < 0) {
0 commit comments