@@ -729,8 +729,8 @@ extern "C" {
729729 GGML_API struct ggml_tensor * ggml_view_tensor (struct ggml_context * ctx , struct ggml_tensor * src );
730730
731731 // Context tensor enumeration and lookup
732- GGML_API struct ggml_tensor * ggml_get_first_tensor (struct ggml_context * ctx );
733- GGML_API struct ggml_tensor * ggml_get_next_tensor (struct ggml_context * ctx , struct ggml_tensor * tensor );
732+ GGML_API struct ggml_tensor * ggml_get_first_tensor (const struct ggml_context * ctx );
733+ GGML_API struct ggml_tensor * ggml_get_next_tensor (const struct ggml_context * ctx , struct ggml_tensor * tensor );
734734 GGML_API struct ggml_tensor * ggml_get_tensor (struct ggml_context * ctx , const char * name );
735735
736736 GGML_API struct ggml_tensor * ggml_set_zero (struct ggml_tensor * tensor );
@@ -2123,10 +2123,11 @@ extern "C" {
21232123 GGML_API const void * gguf_get_arr_data (const struct gguf_context * ctx , int key_id );
21242124 GGML_API const char * gguf_get_arr_str (const struct gguf_context * ctx , int key_id , int i );
21252125
2126- GGML_API int gguf_get_n_tensors (const struct gguf_context * ctx );
2127- GGML_API int gguf_find_tensor (const struct gguf_context * ctx , const char * name );
2128- GGML_API size_t gguf_get_tensor_offset (const struct gguf_context * ctx , int i );
2129- GGML_API char * gguf_get_tensor_name (const struct gguf_context * ctx , int i );
2126+ GGML_API int gguf_get_n_tensors (const struct gguf_context * ctx );
2127+ GGML_API int gguf_find_tensor (const struct gguf_context * ctx , const char * name );
2128+ GGML_API size_t gguf_get_tensor_offset (const struct gguf_context * ctx , int i );
2129+ GGML_API char * gguf_get_tensor_name (const struct gguf_context * ctx , int i );
2130+ GGML_API enum ggml_type gguf_get_tensor_type (const struct gguf_context * ctx , int i );
21302131
21312132 // overrides existing values or adds a new one
21322133 GGML_API void gguf_set_val_u8 (struct gguf_context * ctx , const char * key , uint8_t val );
0 commit comments