PyTorch eager
PyTorch · python · MIT
Kernel source · 52 lines ↓holds 2 records
Use it
Vendorable · source mirrored · MITView source →
No package. Vendor the mirrored source: 52 lines, MIT.
72_conv_transposed_3D_asymmetric_input_asymmetric_kernel___strided_padded_grouped_.py
curl "https://kernelindex.com/api/v1/implementations/kernelbench-l1-72-conv-transposed-3d-asymmetric-input-asymmetric-kernel-strided-padded-grouped-torch?include=source"interfacepython · torch_eager
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
conv transposed 3D asymmetric input asymmetric kernel strided padded groupedfp32 · [8, 32, 12, 24, 48]
NVIDIA H100
2.82ms±0.00
#1 of 2
2026-03-05
conv transposed 3D asymmetric input asymmetric kernel strided padded groupedfp32 · [8, 32, 12, 24, 48]
NVIDIA H100
3.23ms±0.00
#1 of 2
2026-03-05
Reported · How evidence levels are derived →
Source and license
sourceavailable
revision digestsha256:84df77a5cf50dfbe3f57943be6c1f4eafa2043dc27ef5d3d68d20d9a382efeb7
license declaredMIT
license concludedMIT
imported2026-08-26
Kernel source
72_conv_transposed_3D_asymmetric_input_asymmetric_kernel___strided_padded_grouped_.py52 lines
import torch
import torch.nn as nn
class Model(nn.Module):
"""
Performs a 3D transposed convolution operation with asymmetric input and kernel, and optional stride.
Args:
in_channels (int): Number of channels in the input tensor.
out_channels (int): Number of channels produced by the convolution.
kernel_size (tuple of ints): Size of the convolution kernel in the form (kernel_size_depth, kernel_size_height, kernel_size_width).
stride (tuple of ints, optional): Stride of the convolution in the form (stride_depth, stride_height, stride_width). Defaults to (1, 1, 1).
padding (tuple of ints, optional): Padding applied to the input in the form (padding_depth, padding_height, padding_width). Defaults to (0, 0, 0).
output_padding (tuple of ints, optional): Additional size added to one side of the output shape. Defaults to (0, 0, 0).
groups (int, optional): Number of blocked connections from input channels to output channels. Defaults to 1.
bias (bool, optional): If `True`, adds a learnable bias to the output. Defaults to `False`.
"""
def __init__(self, in_channels: int, out_channels: int, kernel_size: tuple, stride: tuple = (1, 1, 1), padding: tuple = (0, 0, 0), output_padding: tuple = (0, 0, 0), groups: int = 1, bias: bool = False):
super(Model, self).__init__()
self.conv_transpose3d = nn.ConvTranspose3d(in_channels, out_channels, kernel_size, stride=stride, padding=padding, output_padding=output_padding, groups=groups, bias=bias)
def forward(self, x: torch.Tensor) -> torch.Tensor:
"""
Performs the 3D transposed convolution.
Args:
x (torch.Tensor): Input tensor of shape (batch_size, in_channels, depth, height, width).
Returns:
torch.Tensor: Output tensor of shape (batch_size, out_channels, depth_out, height_out, width_out).
"""
return self.conv_transpose3d(x)
# Test code
batch_size = 8
in_channels = 32
out_channels = 32
kernel_size = (3, 5, 7)
depth = 12
height = 24
width = 48
stride = (2, 2, 2)
padding = (1, 2, 3)
output_padding = (1, 1, 1)
groups = 4
def get_inputs():
x = torch.rand(batch_size, in_channels, depth, height, width)
return [x]
def get_init_inputs():
return [in_channels, out_channels, kernel_size, stride, padding, output_padding, groups]scrolls · 52 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