Skip to content

[Kernel] Add dilation, padding_mode and groups to convolution kernel. - #1032

Open
amd-nprotaso wants to merge 36 commits into
ROCm:mainfrom
amd-nprotaso:convolution
Open

[Kernel] Add dilation, padding_mode and groups to convolution kernel.#1032
amd-nprotaso wants to merge 36 commits into
ROCm:mainfrom
amd-nprotaso:convolution

Conversation

@amd-nprotaso

Copy link
Copy Markdown
Contributor

We want to cover all functionality of torch convolution kernel, so we add dilation, padding_mode and groups. Also tune scheduling of kernel to improve performance. In fp8 kernel there are only cosmetic changes, replace old llvm api to new fx operations.
Performance comparison base on Flux kernel calls:

Input Weight Stride Pad GFLOP Old ms New ms New/Old Old TF New TF Torch ms Old vs Torch New vs Torch
1,3,1024,1024 128,3,3,3 1,1 1,1 7.25 SKIP 0.1354 53.5 0.4002 2.95x
1,128,1024,1024 128,128,3,3 1,1 1,1 309.24 0.6887 0.5832 1.18x 449.0 530.2 0.9725 1.42x 1.67x
1,128,1025,1025 128,128,3,3 2,2 0,0 77.31 0.5989 0.2948 2.03x 129.1 262.2 0.5133 0.88x 1.74x
1,128,512,512 256,128,3,3 1,1 1,1 154.62 0.3241 0.2713 1.19x 477.1 569.9 0.4399 1.33x 1.62x
1,256,512,512 256,256,3,3 1,1 1,1 309.24 0.6053 0.4851 1.25x 510.9 637.5 0.6563 1.09x 1.35x
1,128,512,512 256,128,1,1 1,1 0,0 17.18 0.1195 0.1156 1.03x 143.8 148.6 0.1077 0.89x 0.93x
1,256,513,513 256,256,3,3 2,2 0,0 77.31 0.3566 0.1900 1.88x 216.8 406.9 0.2987 0.85x 1.57x
1,256,256,256 512,256,3,3 1,1 1,1 154.62 0.3001 0.2336 1.28x 515.2 661.9 0.2987 0.99x 1.28x
1,512,256,256 512,512,3,3 1,1 1,1 309.24 0.5575 0.4499 1.24x 554.7 687.4 0.5151 0.93x 1.14x
1,256,256,256 512,256,1,1 1,1 0,0 17.18 0.0622 0.0621 1.00x 276.2 276.7 0.0616 0.99x 0.99x
1,512,257,257 512,512,3,3 2,2 0,0 77.31 0.2759 0.1268 2.18x 280.2 609.7 0.1815 0.61x 1.43x
1,512,128,128 512,512,3,3 1,1 1,1 77.31 0.1302 0.1023 1.27x 593.8 755.7 0.1296 1.01x 1.27x

Comment thread kernels/conv/conv3d_implicit.py Outdated
Comment thread kernels/common/buffer_ops.py Outdated
@amd-nprotaso
amd-nprotaso requested a review from coderfeli August 21, 2026 15:13
@coderfeli
coderfeli requested a review from jli-melchior August 26, 2026 09:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants