submission 782547
Wojciech Krupiński · python · License unknown
Use it
Vendorable · source mirrored · license unknownView source →
No package. Vendor the mirrored source: 33 lines, June 9 Researcher Reciprocity License v1.0.
submission.py
curl "https://kernelindex.com/api/v1/implementations/kernelbot-vectorsum-v2-782547?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
Reported · How evidence levels are derived →
Source and license
sourceavailable
revision digestsha256:e99bd18eef2c087be6486b3f76200cfe7c3c3eb346af7631732759f607800cac
license declaredunknown
license concludedunknown
authorsWojciech Krupiński
imported2026-08-15
Techniques
Extracted from the mirrored source by pattern, never inferred. Each row cites its line.
num-warps = 2
NUM_WARPS = 2Kernel source
submission.py33 lines
#!POPCORN leaderboard vectorsum_v2
import torch
import triton
import triton.language as tl
from task import input_t, output_t
BLOCK_SIZE = 16384
NUM_WARPS = 2
@triton.jit
def sum_kernel(input_ptr, partials_ptr, n_elements, BLOCK_SIZE: tl.constexpr):
pid = tl.program_id(0)
offsets = pid * BLOCK_SIZE + tl.arange(0, BLOCK_SIZE)
mask = offsets < n_elements
x = tl.load(input_ptr + offsets, mask=mask, other=0.0)
x = x.to(tl.float64)
block_sum = tl.sum(x, axis=0)
tl.store(partials_ptr + pid, block_sum.to(tl.float32))
def custom_kernel(data: input_t) -> output_t:
input_tensor, _ = data
n_elements = input_tensor.numel()
num_blocks = triton.cdiv(n_elements, BLOCK_SIZE)
partials = torch.empty(num_blocks, device="cuda", dtype=torch.float32)
sum_kernel[(num_blocks,)](
input_tensor, partials, n_elements,
BLOCK_SIZE=BLOCK_SIZE, num_warps=NUM_WARPS,
)
return partials.to(torch.float64).sum().to(torch.float32)
scrolls · 33 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