Skip to content

feat: add batchnorm kernel#19

Open
0xrushi wants to merge 5 commits intotriton-lang:mainfrom
0xrushi:dev1
Open

feat: add batchnorm kernel#19
0xrushi wants to merge 5 commits intotriton-lang:mainfrom
0xrushi:dev1

Conversation

@0xrushi
Copy link
Copy Markdown

@0xrushi 0xrushi commented Sep 21, 2025

❯ python main.py batchnorm_benchmark --benchmark=True
Running BatchNorm benchmark: 512x2048, use_triton=True
Output shape: torch.Size([512, 2048]), dtype: torch.float32
Benchmark results
                             kernel_path  non_triton    triton  non_triton-triton
kernel                                                                           
batchnorm_benchmark  batchnorm_benchmark     0.00917  0.000153           0.009017

==================================
❯ python main.py batchnorm_benchmark --benchmark=True --batch_size=1024 --channels=4096
Running BatchNorm benchmark: 1024x4096, use_triton=True
Output shape: torch.Size([1024, 4096]), dtype: torch.float32
Benchmark results
                             kernel_path  non_triton    triton  non_triton-triton
kernel                                                                           
batchnorm_benchmark  batchnorm_benchmark    0.008819  0.000216           0.008603

==================================

Copy link
Copy Markdown
Collaborator

@adamomainz adamomainz left a comment

Choose a reason for hiding this comment

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

This really seems more suited for tritonbench
https://github.com/meta-pytorch/tritonbench

If you move it there I would be happy to review

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