ggml-cpu : fix conv_transpose_2d for multiple batches#26132
Open
tekinertekin wants to merge 1 commit into
Open
ggml-cpu : fix conv_transpose_2d for multiple batches#26132tekinertekin wants to merge 1 commit into
tekinertekin wants to merge 1 commit into
Conversation
ggml_compute_forward_conv_transpose_2d_impl only computed the first batch (ne[3] of the destination); every batch after the first was left as zero. Both the src1 permutation and the main compute loop now iterate over the batch dimension, and the work buffer size in ggml_graph_plan is scaled by the src1 batch count so the extra permuted batches fit. A multi-batch test case is added to test-backend-ops. Fixes ggml-org/ggml#1448
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
ggml_compute_forward_conv_transpose_2d_implused to only calculate the first batch (ne[3]of the result), all batches after that remain to be zero. Both thesrc1permutation and the main compute loop will now iterate over the batches of the result dimension, and the work buffer allocated viaggml_graph_planwill be scaled with the src1 batch count to accommodate the permuted additional batches. Added an additional multi-batch test case to the test-backend-ops suite. Fixes ggml-org/ggml#1448Additional information
1 more test added. Tested locally and passed. Fixes ggml-org/ggml#1448
Requirements
AI helped develop and refine this fix, ported it into the tree, reproduced the bug, and ran the build and tests. I have reviewed and understood every line and I am fully responsible for the change.