Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ggml: add names to tensors #1268

Merged
merged 2 commits into from
May 2, 2023
Merged

ggml: add names to tensors #1268

merged 2 commits into from
May 2, 2023

Conversation

slaren
Copy link
Collaborator

@slaren slaren commented May 1, 2023

  • Adds a name field to ggml_tensor
  • Adds accessor functions ggml_get_name and ggml_set_name
    • While we normally don't use accessors, in this case it seemed necessary as the maximum length may change
  • Modifies ggml_graph_dump_dot to use the names in the graph
  • Modifies llama.cpp to add names to most tensors

Example graph (heavily inspired by #915 (comment)):

llama dot


char name[32];

char padding[8]; // TODO: remove and add padding to name?
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's keep it to remind us

@slaren slaren merged commit 2d099e5 into ggerganov:master May 2, 2023
@slaren slaren deleted the ggml-names branch May 2, 2023 14:03
DannyDaemonic pushed a commit to DannyDaemonic/llama.cpp that referenced this pull request May 2, 2023
* ggml: add names to tensors

* minor improvements to dot file formatting
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants