PyTorch eager
PyTorch · python · MIT
Use it
Vendorable · source mirrored · MITView source →
No package. Vendor the mirrored source: 35 lines, MIT.
100_ConvTranspose3d_Clamp_Min_Divide.py
curl "https://kernelindex.com/api/v1/implementations/kernelbench-l2-100-convtranspose3d-clamp-min-divide-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
Reported · How evidence levels are derived →
Source and license
sourceavailable
revision digestsha256:8d6f2d3b632e210f679296ce0b8e10f1f1dcc49d4da1f2a7f94d7a233a03a6ab
license declaredMIT
license concludedMIT
imported2026-08-26
Kernel source
100_ConvTranspose3d_Clamp_Min_Divide.py35 lines
import torch
import torch.nn as nn
class Model(nn.Module):
"""
A model that performs a transposed 3D convolution, clamps the output to a minimum value,
and then divides the result by a constant.
"""
def __init__(self, in_channels, out_channels, kernel_size, stride, padding, min_value, divisor):
super(Model, self).__init__()
self.conv_transpose = nn.ConvTranspose3d(in_channels, out_channels, kernel_size, stride=stride, padding=padding)
self.min_value = min_value
self.divisor = divisor
def forward(self, x):
x = self.conv_transpose(x)
x = torch.clamp(x, min=self.min_value)
x = x / self.divisor
return x
batch_size = 16
in_channels = 64
out_channels = 128
depth, height, width = 24, 48, 48
kernel_size = 3
stride = 2
padding = 1
min_value = -1.0
divisor = 2.0
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, min_value, divisor]scrolls · 35 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