torch.compile (inductor)
PyTorch · python · MIT
Kernel source · 33 lines ↓holds 2 records
Use it
Vendorable · source mirrored · MITView source →
No package. Vendor the mirrored source: 33 lines, MIT.
7_Conv3d_ReLU_LeakyReLU_GELU_Sigmoid_BiasAdd.py
curl "https://kernelindex.com/api/v1/implementations/kernelbench-l2-7-conv3d-relu-leakyrelu-gelu-sigmoid-biasadd-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
Conv3d ReLU LeakyReLU GELU Sigmoid BiasAddfp32 · [64, 8, 32, 64, 64]
NVIDIA H100
3.01ms±0.02
#1 of 2
2026-03-05
Conv3d ReLU LeakyReLU GELU Sigmoid BiasAddfp32 · [64, 8, 32, 64, 64]
NVIDIA H100
8.68ms±0.03
#1 of 2
2026-03-05
Reported · How evidence levels are derived →
Source and license
sourceavailable
revision digestsha256:2f7f0451c1ac3cd105d3cc4f80cb1ac3387caa20f463a663c09a193d4b56d0c1
license declaredMIT
license concludedMIT
imported2026-08-26
Kernel source
7_Conv3d_ReLU_LeakyReLU_GELU_Sigmoid_BiasAdd.py33 lines
import torch
import torch.nn as nn
class Model(nn.Module):
"""
Model that performs a 3D convolution, applies ReLU, LeakyReLU, GELU, Sigmoid activations, and bias in sequence.
"""
def __init__(self, in_channels, out_channels, kernel_size, bias_shape):
super(Model, self).__init__()
self.conv = nn.Conv3d(in_channels, out_channels, kernel_size)
self.bias = nn.Parameter(torch.randn(bias_shape))
def forward(self, x):
x = self.conv(x)
x = torch.relu(x)
x = torch.nn.functional.leaky_relu(x, negative_slope=0.01)
x = torch.nn.functional.gelu(x)
x = torch.sigmoid(x)
x = x + self.bias
return x
batch_size = 64
in_channels = 8
out_channels = 32
depth, height, width = 32, 64, 64
kernel_size = 3
bias_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, bias_shape]scrolls · 33 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