Skip to content
KernelIndex
Search⌘K

submission 545401

rajesh0042 · python · License unknown

Use it

Vendorable · source mirrored · license unknownView source →

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

conv2d_v4.py
curl "https://kernelindex.com/api/v1/implementations/kernelbot-conv2d-v2-545401?include=source"
interfacepython
Compatibility
measured onNVIDIA B200
declared hardwareNVIDIA B200
architecturessm_100
dtypesfp32

Benchmark evidence

1 measurement across 1 GPU, fastest first.

Operation / workload
Hardware
Latency
Rank
Observed
2D convolutionsuite of 5 cases
NVIDIA B200
6.52ms
#5 of 28
2026-03-13

Reported · How evidence levels are derived →

Source and license

sourceavailable
revision digestsha256:78b1670f19ca260b3328c481497911c203a980ab5f80dbe2550cc3b9d9942d06
license declaredunknown
license concludedunknown
authorsrajesh0042
imported2026-08-15

Kernel source

conv2d_v4.py21 lines
import os
os.environ["CUBLAS_WORKSPACE_CONFIG"] = ":4096:8"

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

# Key insight: deterministic=True is SLOW! The reference uses DeterministicContext
# to generate the reference output, but our check has rtol=1e-3, atol=1e-3
# Non-deterministic FP32 conv2d should be within that tolerance
torch.backends.cudnn.allow_tf32 = False
torch.backends.cuda.matmul.allow_tf32 = False
torch.backends.cudnn.deterministic = False  # FAST non-deterministic
torch.backends.cudnn.benchmark = True  # Auto-tune algorithm

def custom_kernel(data: input_t) -> output_t:
    input_tensor, kernel, output = data
    result = F.conv2d(input_tensor, kernel, stride=1, padding=0)
    output[...] = result
    return output

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

Changes from previous submission

Against this author's previous submission submission 545197.

⋯ 4 unchanged lines
import torch.nn.functional as F
from task import input_t, output_t
- # Deterministic for correctness, but with benchmark to find fastest algorithm
+ # Key insight: deterministic=True is SLOW! The reference uses DeterministicContext
+ # to generate the reference output, but our check has rtol=1e-3, atol=1e-3
+ # Non-deterministic FP32 conv2d should be within that tolerance
torch.backends.cudnn.allow_tf32 = False
torch.backends.cuda.matmul.allow_tf32 = False
- torch.backends.cudnn.deterministic = True
- torch.backends.cudnn.benchmark = True # Find fastest deterministic algo
+ torch.backends.cudnn.deterministic = False # FAST non-deterministic
+ torch.backends.cudnn.benchmark = True # Auto-tune algorithm
def custom_kernel(data: input_t) -> output_t:
input_tensor, kernel, output = data

Best evidence level for this revision: reported

JSON