PyTorch eager
PyTorch · python · MIT
Use it
Vendorable · source mirrored · MITView source →
No package. Vendor the mirrored source: 38 lines, MIT.
74_ConvTranspose3d_LeakyReLU_Multiply_LeakyReLU_Max.py
curl "https://kernelindex.com/api/v1/implementations/kernelbench-l2-74-convtranspose3d-leakyrelu-multiply-leakyrelu-max-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
ConvTranspose3d LeakyReLU Multiply LeakyReLU Maxfp32 · [16, 16, 16, 32, 32]
NVIDIA H100
1.47ms±0.00
#2 of 2
2026-03-05
ConvTranspose3d LeakyReLU Multiply LeakyReLU Maxfp32 · [16, 16, 16, 32, 32]
NVIDIA H100
2.17ms±0.00
#2 of 2
2026-03-05
Reported · How evidence levels are derived →
Source and license
sourceavailable
revision digestsha256:d513780568b6bb9573f1ed0f6e548b1edc642ddc6c238099d70a1d018b9f2350
license declaredMIT
license concludedMIT
imported2026-08-26
Kernel source
74_ConvTranspose3d_LeakyReLU_Multiply_LeakyReLU_Max.py38 lines
import torch
import torch.nn as nn
class Model(nn.Module):
"""
Model that performs a 3D transposed convolution, applies LeakyReLU, multiplies by a learnable parameter,
applies LeakyReLU again, and performs a max pooling operation.
"""
def __init__(self, in_channels, out_channels, kernel_size, stride, padding, output_padding, multiplier_shape):
super(Model, self).__init__()
self.conv_transpose = nn.ConvTranspose3d(in_channels, out_channels, kernel_size, stride=stride, padding=padding, output_padding=output_padding)
self.multiplier = nn.Parameter(torch.randn(multiplier_shape))
self.leaky_relu = nn.LeakyReLU(negative_slope=0.2)
self.max_pool = nn.MaxPool3d(kernel_size=2)
def forward(self, x):
x = self.conv_transpose(x)
x = self.leaky_relu(x)
x = x * self.multiplier
x = self.leaky_relu(x)
x = self.max_pool(x)
return x
batch_size = 16
in_channels = 16
out_channels = 32
depth, height, width = 16, 32, 32
kernel_size = 3
stride = 2
padding = 1
output_padding = 1
multiplier_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, output_padding, multiplier_shape]scrolls · 38 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