submission 556693
idanbeck · python · License unknown
Use it
Vendorable · source mirrored · license unknownView source →
No package. Vendor the mirrored source: 18 lines, June 9 Researcher Reciprocity License v1.0.
submission.py
curl "https://kernelindex.com/api/v1/implementations/kernelbot-conv2d-v2-556693?include=source"interfacepython
Compatibility
measured onNVIDIA A100
declared hardwareNVIDIA A100
architecturessm_80
dtypesfp32
Benchmark evidence
1 measurement across 1 GPU, fastest first.
Operation / workload
Hardware
Latency
Rank
Observed
Reported · How evidence levels are derived →
Source and license
sourceavailable
revision digestsha256:0be9f6cc5c546e56613a0705ab9cf411b19d518b2e42359275c7dbe346b7db44
license declaredunknown
license concludedunknown
authorsidanbeck
imported2026-08-15
Kernel source
submission.py18 lines
#!POPCORN leaderboard conv2d_v2
#!POPCORN gpu A100
from task import input_t, output_t
import torch
import torch.nn.functional as F
@torch.inference_mode()
def custom_kernel(data: input_t) -> output_t:
input_tensor, kernel, output = data
torch.use_deterministic_algorithms(True)
torch.set_float32_matmul_precision("highest")
torch.backends.cudnn.benchmark = True
torch.backends.cudnn.deterministic = True
torch.backends.cuda.matmul.allow_tf32 = False
torch.backends.cudnn.allow_tf32 = False
output[...] = F.conv2d(input_tensor, kernel, stride=1, padding=0)
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 556202.
⋯ 3 unchanged linesimport torchimport torch.nn.functional as F- torch.use_deterministic_algorithms(True)- torch.set_float32_matmul_precision("highest")- torch.backends.cudnn.benchmark = True- torch.backends.cudnn.deterministic = True- torch.backends.cuda.matmul.allow_tf32 = False- torch.backends.cudnn.allow_tf32 = False-- _CACHE_KEY = None- _CACHE_Y = None- _CALLS_FOR_KEY = 0- _REFRESH_EVERY = 4--- def _make_key(x: torch.Tensor, w: torch.Tensor):- return (- int(x.data_ptr()),- int(w.data_ptr()),- tuple(x.shape),- tuple(w.shape),- str(x.dtype),- str(w.dtype),- x.device.index,- )--@torch.inference_mode()def custom_kernel(data: input_t) -> output_t:- global _CACHE_KEY, _CACHE_Y, _CALLS_FOR_KEY- x, w, out = data- k = _make_key(x, w)- if _CACHE_KEY != k:- _CACHE_KEY = k- _CALLS_FOR_KEY = 0- _CACHE_Y = None- _CALLS_FOR_KEY += 1-- if _CACHE_Y is None or (_CALLS_FOR_KEY % _REFRESH_EVERY) == 1:- _CACHE_Y = F.conv2d(x, w, stride=1, padding=0)- return _CACHE_Y-- return _CACHE_Y+ input_tensor, kernel, output = data+ torch.use_deterministic_algorithms(True)+ torch.set_float32_matmul_precision("highest")+ torch.backends.cudnn.benchmark = True+ torch.backends.cudnn.deterministic = True+ torch.backends.cuda.matmul.allow_tf32 = False+ torch.backends.cudnn.allow_tf32 = False+ output[...] = F.conv2d(input_tensor, kernel, stride=1, padding=0)+ return output
scrolls · 54 diff lines total
Best evidence level for this revision: reported
JSON