submission 695980
sky · python · License unknown
Use it
Vendorable · source mirrored · license unknownView source →
No package. Vendor the mirrored source: 44 lines, June 9 Researcher Reciprocity License v1.0.
submission.py
curl "https://kernelindex.com/api/v1/implementations/kernelbot-vectoradd-v2-695980?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:e2734eab4a11d9801fb0132e0cb80e76815ce09e7f1f5e86174e881b8b75ee59
license declaredunknown
license concludedunknown
authorssky
imported2026-08-15
Techniques
Extracted from the mirrored source by pattern, never inferred. Each row cites its line.
num-warps = 4
num_warps=4,stages = 2
num_stages=2,Kernel source
submission.py44 lines
import triton
import triton.language as tl
import torch
@triton.jit
def add_kernel(
A_ptr, B_ptr, C_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
tl.multiple_of(offsets, 16)
a = tl.load(A_ptr + offsets, mask=mask, eviction_policy='evict_last')
b = tl.load(B_ptr + offsets, mask=mask, eviction_policy='evict_last')
c = a + b
tl.store(C_ptr + offsets, c, mask=mask)
def custom_kernel(data):
A, B, C = data
n_elements = A.numel()
BLOCK_SIZE = 8192
grid = lambda meta: (triton.cdiv(n_elements, meta['BLOCK_SIZE']),)
add_kernel[grid](
A, B, C,
n_elements,
BLOCK_SIZE=BLOCK_SIZE,
num_warps=4,
num_stages=2,
)
return Cscrolls · 44 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