Expose type name from ggml (#970)

Avoid duplication of type names in utils

Co-authored-by: Håkon H. Hitland <haakon@likedan.net>
This commit is contained in:
Pavol Rusnak
2023-04-14 20:05:37 +02:00
committed by GitHub
parent f4d277ae17
commit c56b715269
4 changed files with 27 additions and 20 deletions

2
ggml.h
View File

@@ -354,6 +354,8 @@ int ggml_blck_size (enum ggml_type type);
size_t ggml_type_size (enum ggml_type type); // size in bytes for all elements in a block
float ggml_type_sizef(enum ggml_type type); // ggml_type_size()/ggml_blck_size() as float
const char * ggml_type_name(enum ggml_type type);
size_t ggml_element_size(const struct ggml_tensor * tensor);
struct ggml_context * ggml_init(struct ggml_init_params params);