Skip to content

Commit

Permalink
gguf : add gguf_get_tensor_name()
Browse files Browse the repository at this point in the history
  • Loading branch information
ggerganov committed Jul 26, 2023
1 parent f72dfbf commit 480a067
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ggml.c
Original file line number Diff line number Diff line change
Expand Up @@ -18741,6 +18741,10 @@ size_t gguf_get_tensor_offset(struct gguf_context * ctx, int i) {
return ctx->infos[i].offset;
}

char * gguf_get_tensor_name(struct gguf_context * ctx, int i) {
return ctx->infos[i].name.data;
}

////////////////////////////////////////////////////////////////////////////////

int ggml_cpu_has_avx(void) {
Expand Down
1 change: 1 addition & 0 deletions ggml.h
Original file line number Diff line number Diff line change
Expand Up @@ -1653,6 +1653,7 @@ extern "C" {

GGML_API int gguf_get_n_tensors (struct gguf_context * ctx);
GGML_API size_t gguf_get_tensor_offset(struct gguf_context * ctx, int i);
GGML_API char * gguf_get_tensor_name (struct gguf_context * ctx, int i);

//
// system info
Expand Down

0 comments on commit 480a067

Please sign in to comment.