Skip to content

Conversation

iliailmer
Copy link

@iliailmer iliailmer commented Oct 12, 2025

This PR adds Metal-based implementation of CONV_TRANSPOSE_2D operation (#14909)

TODO:

  • Tests

@iliailmer iliailmer marked this pull request as ready for review October 12, 2025 20:17
@iliailmer iliailmer requested a review from ggerganov as a code owner October 12, 2025 20:17
@github-actions github-actions bot added ggml changes relating to the ggml tensor library for machine learning Apple Metal https://en.wikipedia.org/wiki/Metal_(API) labels Oct 12, 2025
Copy link
Member

@ggerganov ggerganov left a comment

Choose a reason for hiding this comment

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

Add the necessary requirements for the input tensors here:

case GGML_OP_CONV_TRANSPOSE_1D:
case GGML_OP_CONV_TRANSPOSE_2D:
return true;

For example, the implementation assumes that src0 and src1 are contiguous.

@iliailmer iliailmer changed the title Add metal conv transpose 2d Add CONV_TRANSPOSE_2D for Metal Oct 13, 2025
@iliailmer iliailmer changed the title Add CONV_TRANSPOSE_2D for Metal Add CONV_TRANSPOSE_2D for Metal Oct 13, 2025
@iliailmer
Copy link
Author

Added the checks for type, and is_contiguous checks as well.

@iliailmer iliailmer requested a review from ggerganov October 14, 2025 00:23
Copy link
Member

@ggerganov ggerganov left a comment

Choose a reason for hiding this comment

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

I wonder if it would be more efficient to have KH x KW threads in each threadgroup, instead of just 1.

Would you like to try that in this PR or in a follow-up PR?

Co-authored-by: Georgi Gerganov <[email protected]>
@iliailmer
Copy link
Author

yeah, let me try it out in this one. i should be able to do it by the end of the week or so

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Apple Metal https://en.wikipedia.org/wiki/Metal_(API) ggml changes relating to the ggml tensor library for machine learning

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants