Skip to content

Commit 480a067

Browse files
committed
gguf : add gguf_get_tensor_name()
1 parent f72dfbf commit 480a067

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

ggml.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18741,6 +18741,10 @@ size_t gguf_get_tensor_offset(struct gguf_context * ctx, int i) {
1874118741
return ctx->infos[i].offset;
1874218742
}
1874318743

18744+
char * gguf_get_tensor_name(struct gguf_context * ctx, int i) {
18745+
return ctx->infos[i].name.data;
18746+
}
18747+
1874418748
////////////////////////////////////////////////////////////////////////////////
1874518749

1874618750
int ggml_cpu_has_avx(void) {

ggml.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1653,6 +1653,7 @@ extern "C" {
16531653

16541654
GGML_API int gguf_get_n_tensors (struct gguf_context * ctx);
16551655
GGML_API size_t gguf_get_tensor_offset(struct gguf_context * ctx, int i);
1656+
GGML_API char * gguf_get_tensor_name (struct gguf_context * ctx, int i);
16561657

16571658
//
16581659
// system info

0 commit comments

Comments
 (0)