@@ -125,12 +125,13 @@ extern "C" {
125125 // get ith C string from array with given key_id
126126 GGML_API const char * gguf_get_arr_str (const struct gguf_context * ctx , int64_t key_id , size_t i );
127127
128- GGML_API int64_t gguf_get_n_tensors (const struct gguf_context * ctx );
129- GGML_API int64_t gguf_find_tensor (const struct gguf_context * ctx , const char * name ); // returns -1 if the tensor is not found
130- GGML_API size_t gguf_get_tensor_offset (const struct gguf_context * ctx , int64_t tensor_id );
131- GGML_API const char * gguf_get_tensor_name (const struct gguf_context * ctx , int64_t tensor_id );
132- GGML_API enum ggml_type gguf_get_tensor_type (const struct gguf_context * ctx , int64_t tensor_id );
133- GGML_API size_t gguf_get_tensor_size (const struct gguf_context * ctx , int64_t tensor_id );
128+ GGML_API int64_t gguf_get_n_tensors (const struct gguf_context * ctx );
129+ GGML_API int64_t gguf_find_tensor (const struct gguf_context * ctx , const char * name ); // returns -1 if the tensor is not found
130+ GGML_API size_t gguf_get_tensor_offset (const struct gguf_context * ctx , int64_t tensor_id );
131+ GGML_API const char * gguf_get_tensor_name (const struct gguf_context * ctx , int64_t tensor_id );
132+ GGML_API const int64_t * gguf_get_tensor_ne (const struct gguf_context * ctx , int64_t tensor_id ); // returns ne, an array of GGML_MAX_DIMS elements; ne[dim] is 1 for dim >= n_dims
133+ GGML_API enum ggml_type gguf_get_tensor_type (const struct gguf_context * ctx , int64_t tensor_id );
134+ GGML_API size_t gguf_get_tensor_size (const struct gguf_context * ctx , int64_t tensor_id );
134135
135136 // removes key if it exists, returns id that the key had prior to removal (-1 if it didn't exist)
136137 GGML_API int64_t gguf_remove_key (struct gguf_context * ctx , const char * key );
0 commit comments