Skip to content

Commit 860c9c6

Browse files
committed
gguf : add gguf_get_tensor_name()
1 parent 78b226a commit 860c9c6

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
@@ -18770,6 +18770,10 @@ size_t gguf_get_tensor_offset(struct gguf_context * ctx, int i) {
1877018770
return ctx->infos[i].offset;
1877118771
}
1877218772

18773+
char * gguf_get_tensor_name(struct gguf_context * ctx, int i) {
18774+
return ctx->infos[i].name.data;
18775+
}
18776+
1877318777
////////////////////////////////////////////////////////////////////////////////
1877418778

1877518779
int ggml_cpu_has_avx(void) {

ggml.h

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

16711671
GGML_API int gguf_get_n_tensors (struct gguf_context * ctx);
16721672
GGML_API size_t gguf_get_tensor_offset(struct gguf_context * ctx, int i);
1673+
GGML_API char * gguf_get_tensor_name (struct gguf_context * ctx, int i);
16731674

16741675
//
16751676
// system info

0 commit comments

Comments
 (0)