-
Notifications
You must be signed in to change notification settings - Fork 13.8k
ggml : minor naming changes #8433
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
Conversation
ggml-ci
ffabf83 to
8229ee5
Compare
| GGML_API GGML_CALL int ggml_blck_size(enum ggml_type type); | ||
| GGML_API GGML_CALL size_t ggml_type_size(enum ggml_type type); // size in bytes for all elements in a block | ||
| GGML_API GGML_CALL size_t ggml_row_size (enum ggml_type type, int64_t ne); // size in bytes for all elements in a row | ||
| GGML_API GGML_CALL int64_t ggml_blck_size(enum ggml_type type); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is more than just a name change but returning a larger integer should be safe I think.
ggml/src/ggml.c
Outdated
| if (ne % ggml_blck_size(info->type) != 0) { | ||
| fprintf(stderr, "%s: tensor '%s' of type %d (%s) number of elements (%" PRId64 ") is not a multiple of block size (%d)\n", | ||
| __func__, info->name.data, (int)info->type, ggml_type_name(info->type), ne, ggml_blck_size(info->type)); | ||
| __func__, info->name.data, (int) info->type, ggml_type_name(info->type), ne, (int) ggml_blck_size(info->type)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of casting to int I think it would be better to use the PRId64 macro like ne does.
ggml/src/ggml.c
Outdated
| enum ggml_type const kq_vec_dot_type = type_traits[k->type].vec_dot_type; | ||
| ggml_from_float_t const kq_from_float = type_traits[kq_vec_dot_type].from_float; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My personal opinion is that the old names were better because kq_ as a prefix is ambiguous but I don't really care either way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for taking a look - changed back to the original names
* ggml : minor naming changes ggml-ci * ggml : use PRId64 [no ci] * ggml : revert FA K/Q names
* ggml : minor naming changes ggml-ci * ggml : use PRId64 [no ci] * ggml : revert FA K/Q names
copilot:all