ggml: add names to tensors (#1268)

* ggml: add names to tensors

* minor improvements to dot file formatting
This commit is contained in:
slaren 2023-05-02 16:03:00 +02:00 committed by GitHub
parent f4cef87edf
commit 2d099e5193
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 68 additions and 20 deletions

8
ggml.h
View file

@ -350,7 +350,10 @@ extern "C" {
int64_t perf_time_us;
void * data;
char padding[8];
char name[32];
char padding[8]; // TODO: remove and add padding to name?
};
// computation graph
@ -473,6 +476,9 @@ extern "C" {
GGML_API void * ggml_get_data (const struct ggml_tensor * tensor);
GGML_API float * ggml_get_data_f32(const struct ggml_tensor * tensor);
GGML_API const char * ggml_get_name(const struct ggml_tensor * tensor);
GGML_API void ggml_set_name(struct ggml_tensor * tensor, const char * name);
//
// operations on tensors with backpropagation
//