torch.compile (inductor)
PyTorch · python · MIT
Kernel source · 37 lines ↓holds 2 records
Use it
Vendorable · source mirrored · MITView source →
No package. Vendor the mirrored source: 37 lines, MIT.
72_ConvTranspose3d_BatchNorm_AvgPool_AvgPool.py
curl "https://kernelindex.com/api/v1/implementations/kernelbench-l2-72-convtranspose3d-batchnorm-avgpool-avgpool-torch-compile-inductor?include=source"interfacepython · torch_compile_inductor
symbolModel.forward
Compatibility
measured onNVIDIA H100
declared hardwaredeclared only
architectures—
dtypes
Benchmark evidence
2 measurements across 1 GPU, fastest first.
Operation / workload
Hardware
Latency
Rank
Observed
ConvTranspose3d BatchNorm AvgPool AvgPoolfp32 · [64, 3, 32, 32, 32]
NVIDIA H100
6.94ms±0.02
#1 of 2
2026-03-05
ConvTranspose3d BatchNorm AvgPool AvgPoolfp32 · [64, 3, 32, 32, 32]
NVIDIA H100
8.82ms±0.01
#1 of 2
2026-03-05
Reported · How evidence levels are derived →
Source and license
sourceavailable
revision digestsha256:757c81a32833b175c11718cd159f2d7c35b75fdbe93bbfde32fa007e55310714
license declaredMIT
license concludedMIT
imported2026-08-26
Kernel source
72_ConvTranspose3d_BatchNorm_AvgPool_AvgPool.py37 lines
import torch
import torch.nn as nn
class Model(nn.Module):
"""
A model that performs a 3D transposed convolution, followed by batch normalization,
two average pooling layers.
"""
def __init__(self, in_channels, out_channels, kernel_size, stride, padding, bias_shape):
super(Model, self).__init__()
self.conv_transpose = nn.ConvTranspose3d(in_channels, out_channels, kernel_size, stride=stride, padding=padding)
self.batch_norm = nn.BatchNorm3d(out_channels)
self.avg_pool1 = nn.AvgPool3d(kernel_size=2)
self.avg_pool2 = nn.AvgPool3d(kernel_size=2)
def forward(self, x):
x = self.conv_transpose(x)
x = self.batch_norm(x)
x = self.avg_pool1(x)
x = self.avg_pool2(x)
return x
batch_size = 64
in_channels = 3
out_channels = 16
depth, height, width = 32, 32, 32
kernel_size = 3
stride = 2
padding = 1
bias_shape = (out_channels, 1, 1, 1)
def get_inputs():
return [torch.rand(batch_size, in_channels, depth, height, width)]
def get_init_inputs():
return [in_channels, out_channels, kernel_size, stride, padding, bias_shape]scrolls · 37 lines total
Source code from KernelBench, © 2023 Anne Ouyang, Simon Guo, Azalia Mirhoseini (Scaling Intelligence Lab, Stanford University), MIT License · MIT
Best evidence level for this revision: reported
JSON