torch.compile (inductor)
PyTorch · python · MIT
Kernel source · 40 lines ↓holds 2 records
Use it
Vendorable · source mirrored · MITView source →
No package. Vendor the mirrored source: 40 lines, MIT.
49_ConvTranspose3d_Softmax_Sigmoid.py
curl "https://kernelindex.com/api/v1/implementations/kernelbench-l2-49-convtranspose3d-softmax-sigmoid-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
Reported · How evidence levels are derived →
Source and license
sourceavailable
revision digestsha256:3ee932312dc951dfff3722a1fe83830e49aefb45bbbb24b02b2b160203b6413b
license declaredMIT
license concludedMIT
imported2026-08-26
Kernel source
49_ConvTranspose3d_Softmax_Sigmoid.py40 lines
import torch
import torch.nn as nn
class Model(nn.Module):
"""
Model that performs a 3D transposed convolution, applies Softmax and Sigmoid.
"""
def __init__(self, in_channels, out_channels, kernel_size, stride, padding, output_padding, bias=True):
super(Model, self).__init__()
self.conv_transpose = nn.ConvTranspose3d(in_channels, out_channels, kernel_size, stride=stride, padding=padding, output_padding=output_padding, bias=bias)
self.softmax = nn.Softmax(dim=1)
self.sigmoid = nn.Sigmoid()
def forward(self, x):
"""
Args:
x (torch.Tensor): Input tensor of shape (batch_size, in_channels, D, H, W).
Returns:
torch.Tensor: Output tensor of shape (batch_size, out_channels, D, H, W).
"""
x = self.conv_transpose(x)
x = self.softmax(x)
x = self.sigmoid(x)
return x
batch_size = 16
in_channels = 32
out_channels = 64
D, H, W = 16, 32, 32
kernel_size = 3
stride = 2
padding = 1
output_padding = 1
def get_inputs():
return [torch.rand(batch_size, in_channels, D, H, W)]
def get_init_inputs():
return [in_channels, out_channels, kernel_size, stride, padding, output_padding]scrolls · 40 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