Skip to content
KernelIndex
Search⌘K

submission 515187

dexhunter · python · License unknown

Use it

Vendorable · source mirrored · license unknownView source →

No package. Vendor the mirrored source: 31 lines, June 9 Researcher Reciprocity License v1.0.

submission.py
curl "https://kernelindex.com/api/v1/implementations/kernelbot-conv2d-v2-515187?include=source"
interfacepython
Compatibility
measured onNVIDIA L4
declared hardwareNVIDIA L4
architecturessm_89
dtypesfp32

Benchmark evidence

1 measurement across 1 GPU, fastest first.

Operation / workload
Hardware
Latency
Rank
Observed
2D convolutionsuite of 5 cases
NVIDIA L4
245.5ms
#3 of 21
2026-03-07

Reported · How evidence levels are derived →

Source and license

sourceavailable
revision digestsha256:a86b2a3e6404ef1cd2edbe4c6708364df6fd4d8e046f4a25a0b773b56e3f0692
license declaredunknown
license concludedunknown
authorsdexhunter
imported2026-08-15

Kernel source

submission.py31 lines
#!POPCORN leaderboard conv2d_v2
#!POPCORN gpu L4

from task import input_t, output_t
import torch
import torch.nn.functional as F


def custom_kernel(data: input_t) -> output_t:
    """
    Implementation of 2D convolution using PyTorch with no padding and no striding.
    Args:
        data: Tuple of (input tensor, kernel tensor)
        spec: Convolution specifications
    Returns:
        Output tensor after convolution
    """
    input_tensor, kernel, output = data

    # Avoid TensorFloat-32 accumulation drift vs. reference implementation.
    prev_matmul_tf32 = torch.backends.cuda.matmul.allow_tf32
    prev_cudnn_tf32 = torch.backends.cudnn.allow_tf32
    torch.backends.cuda.matmul.allow_tf32 = False
    torch.backends.cudnn.allow_tf32 = False
    try:
        output[...] = F.conv2d(input_tensor, kernel, stride=1, padding=0)
    finally:
        torch.backends.cuda.matmul.allow_tf32 = prev_matmul_tf32
        torch.backends.cudnn.allow_tf32 = prev_cudnn_tf32
    return output
scrolls · 31 lines total

Source code from GPU Mode and the KernelBot dataset · June 9 Researcher Reciprocity License v1.0

Best evidence level for this revision: reported

JSON