Skip to content

Conversation

@jeffbolznv
Copy link
Collaborator

  • Account for batch dimension in flops calculation.
  • Fix how "_VEC" is detected for mat_mul_id.
  • Fix "n" dimension for mat_mul_id (in case of broadcasting).
  • Include a->type in name.

- Account for batch dimension in flops calculation.
- Fix how "_VEC" is detected for mat_mul_id.
- Fix "n" dimension for mat_mul_id (in case of broadcasting).
- Include a->type in name.
@jeffbolznv jeffbolznv requested a review from 0cc4m as a code owner August 11, 2025 16:10
@github-actions github-actions bot added Vulkan Issues specific to the Vulkan backend ggml changes relating to the ggml tensor library for machine learning labels Aug 11, 2025
const uint64_t batch = node->src[1]->ne[2] * node->src[1]->ne[3];
std::string name = ggml_op_name(node->op);
if ((node->op == GGML_OP_MUL_MAT && n == 1) ||
(node->op == GGML_OP_MUL_MAT_ID && node->src[2]->ne[1] == 1)) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Originally the MUL_MAT / MUL_MAT_VEC difference came from the shader path it used, so maybe it makes sense to use mul_mat_vec_max_cols here instead of 1.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah, good idea. I'll change it in the morning.

@jeffbolznv jeffbolznv merged commit 863d341 into ggml-org:master Aug 14, 2025
47 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ggml changes relating to the ggml tensor library for machine learning Vulkan Issues specific to the Vulkan backend

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants