[FlagGems Operator Development Competition] Optimize conv_transpose2d forward - #2678
Closed
goldenfox2025 wants to merge 1 commit into
Closed
[FlagGems Operator Development Competition] Optimize conv_transpose2d forward#2678goldenfox2025 wants to merge 1 commit into
goldenfox2025 wants to merge 1 commit into
Conversation
goldenfox2025
requested review from
0x45f,
bin913,
douxetpur,
huangyiqun and
w1120029931-bit
as code owners
April 26, 2026 03:38
goldenfox2025
force-pushed
the
competition/conv-transpose2d
branch
3 times, most recently
from
April 26, 2026 07:42
4c874a9 to
4e12325
Compare
goldenfox2025
force-pushed
the
competition/conv-transpose2d
branch
from
April 26, 2026 08:12
4e12325 to
84b9d1d
Compare
Collaborator
|
Hi, thank you for your participation in the FlagOS Open Computing Competition 🙏 After review, we have chosen to move forward with a different implementation for this operator. As a result, this PR will be closed. We appreciate your time and contribution, and hope to see more of your submissions in the future. |
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.
Summary
This PR implements and optimizes the forward path of
torch.nn.functional.conv_transpose2din Triton.Supported API:
Supported dtypes:
torch.float16torch.float32torch.bfloat16Autograd behavior:
torch.no_grad()forward uses the optimized Triton implementation.conv_transpose2d.Implementation
The implementation uses three main computation strategies:
effective_kernel <= strideThere are several Triton wrapper entry points, but most of them share the same residue body. The split is intentional: it isolates autotune candidate pools by dtype and kernel-size bucket so one shape does not poison another shape's autotune result.
Residue autotune buckets:
Residue dispatch condition:
The stride3 large-output case is included because direct gather wastes substantial work on the expanded output grid. Small stride3 cases stay on direct/scatter paths to avoid the launch overhead of 9 residue kernels.
Scatter path condition:
This avoids atomics because neighboring input points do not overlap spatially under this condition.
Accuracy Validation
Command:
Result:
Test Coverage Checklist
Benchmark
Command:
Core benchmark shapes:
[16, 32, 24, 24][32, 12, 3, 3][16, 32, 24, 24][32, 12, 3, 3][32, 64, 64, 64][64, 32, 3, 3][32, 64, 128, 128][64, 32, 5, 5][4, 32, 128, 128][32, 32, 5, 5][16, 32, 24, 24][32, 12, 3, 3][16, 32, 24, 24][32, 12, 3, 3][8, 32, 32, 32][32, 32, 3, 3][4, 32, 32, 32][32, 32, 3, 3]Benchmark result:
16x32x24x24 / 32x12x3x316x32x24x24 / 32x12x3x332x64x64x64 / 64x32x3x332x64x128x128 / 64x32x5x54x32x128x128 / 32x32x5x516x32x24x24 / 32x12x3x316x32x24x24 / 32x12x3x38x32x32x32 / 32x32x3x34x32x32x32 / 32x32x3x316x32x24x24 / 32x12x3x316x32x24x24 / 32x12x3x332x64x64x64 / 64x32x3x332x64x128x128 / 64x32x5x54x32x128x128 / 32x32x5x516x32x24x24 / 32x12x3x316x32x24x24 / 32x12x3x38x32x32x32 / 32x32x3x34x32x32x32 / 32x32x3x316x32x24x24 / 32x12x3x316x32x24x24 / 32x12x3x332x64x64x64 / 64x32x3x332x64x128x128 / 64x32x5x54x32x128x128 / 32x32x5x516x32x24x24 / 32x12x3x316x32x24x24 / 32x12x3x38x32x32x32 / 32x32x3x34x32x32x32 / 32x32x3x3All core benchmark cases are above the competition threshold of
0.9x.Notes
torch.no_grad().