torch.compile (inductor)
PyTorch · python · MIT
Use it
Vendorable · source mirrored · MITView source →
No package. Vendor the mirrored source: 51 lines, MIT.
68_conv_transposed_3D__square_input__asymmetric_kernel.py
curl "https://kernelindex.com/api/v1/implementations/kernelbench-l1-68-conv-transposed-3d-square-input-asymmetric-kernel-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
conv transposed 3D square input asymmetric kernelfp32 · [16, 32, 64, 64, 64]
NVIDIA H100
11.9ms±0.06
#1= of 2
2026-03-05
conv transposed 3D square input asymmetric kernelfp32 · [16, 32, 64, 64, 64]
NVIDIA H100
36.9ms±0.03
#2 of 2
2026-03-05
Reported · How evidence levels are derived →
Source and license
sourceavailable
revision digestsha256:808dec321a86ab8a5d050272310d64793a08c8e3d2096e8a87f0fb2eba869dc1
license declaredMIT
license concludedMIT
imported2026-08-26
Kernel source
68_conv_transposed_3D__square_input__asymmetric_kernel.py51 lines
import torch
import torch.nn as nn
class Model(nn.Module):
"""
Performs a transposed 3D convolution with a square input and an asymmetric kernel.
Args:
in_channels (int): Number of channels in the input tensor.
out_channels (int): Number of channels produced by the convolution.
kernel_size (tuple): Size of the convolution kernel (kernel_depth, kernel_width, kernel_height),
where kernel_width == kernel_height.
stride (tuple, optional): Stride of the convolution. Defaults to (1, 1, 1).
padding (tuple, optional): Padding applied to the input. Defaults to (0, 0, 0).
output_padding (tuple, 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 transposed 3D convolution.
Args:
x (torch.Tensor): Input tensor of shape (batch_size, in_channels, depth, width, height).
Returns:
torch.Tensor: Output tensor of shape (batch_size, out_channels, depth_out, width_out, height_out).
"""
return self.conv_transpose3d(x)
# Test code
batch_size = 16
in_channels = 32
out_channels = 64
kernel_depth = 3
kernel_width = 5
kernel_height = 5
depth = 64
width = 64
height = 64
def get_inputs():
x = torch.rand(batch_size, in_channels, depth, width, height)
return [x]
def get_init_inputs():
return [in_channels, out_channels, (kernel_depth, kernel_width, kernel_height)] # Provide in_channels, out_channels, kernel_size for initializationscrolls · 51 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