submission 772830
injury8736 · python · License unknown
Use it
Vendorable · source mirrored · license unknownView source →
No package. Vendor the mirrored source: 47 lines, June 9 Researcher Reciprocity License v1.0.
submission.py
curl "https://kernelindex.com/api/v1/implementations/kernelbot-vectoradd-v2-772830?include=source"interfacepython
Compatibility
measured onNVIDIA A100
declared hardwareNVIDIA A100
architecturessm_80
dtypesfp16
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:716dd193af33231db8812db72c0ff09bd276eb55b377b041c38c259f28f3cd1e
license declaredunknown
license concludedunknown
authorsinjury8736
imported2026-08-15
Techniques
Extracted from the mirrored source by pattern, never inferred. Each row cites its line.
autotune
@triton.autotune(num-warps = 4
triton.Config({"BLOCK_SIZE": 256}, num_warps=4, num_stages=2),stages = 2
triton.Config({"BLOCK_SIZE": 256}, num_warps=4, num_stages=2),Kernel source
submission.py47 lines
#!POPCORN leaderboard vectoradd_v2
#!POPCORN gpu A100
import triton
import triton.language as tl
from task import input_t, output_t
@triton.autotune(
configs=[
triton.Config({"BLOCK_SIZE": 256}, num_warps=4, num_stages=2),
triton.Config({"BLOCK_SIZE": 512}, num_warps=4, num_stages=2),
triton.Config({"BLOCK_SIZE": 1024}, num_warps=8, num_stages=3),
],
key=["n_elements"],
)
@triton.jit
def add_kernel(a_ptr, b_ptr, out_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
# Load (coalesced)
a = tl.load(a_ptr + offsets, mask=mask, other=0.0)
b = tl.load(b_ptr + offsets, mask=mask, other=0.0)
out = a + b
tl.store(out_ptr + offsets, out, mask=mask)
def custom_kernel(data: input_t) -> output_t:
A, B, output = data
n_elements = A.numel()
grid = lambda meta: (triton.cdiv(n_elements, meta["BLOCK_SIZE"]),)
add_kernel[grid](
A,
B,
output,
n_elements,
)
return output
scrolls · 47 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