submission 515731
weyj4 · python · License unknown
Use it
Vendorable · source mirrored · license unknownView source →
No package. Vendor the mirrored source: 28 lines, June 9 Researcher Reciprocity License v1.0.
submission.py
curl "https://kernelindex.com/api/v1/implementations/kernelbot-vectoradd-v2-515731?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:22cdae98032dbbf9695e295ee8df63efb1ee249960dea392e840a9224e896ee1
license declaredunknown
license concludedunknown
authorsweyj4
imported2026-08-15
Kernel source
submission.py28 lines
#!POPCORN leaderboard vectoradd_v2
#!POPCORN gpu A100
import subprocess
import sys
subprocess.check_call([sys.executable, "-m", "pip", "install", "numba"])
import numba
from numba import cuda
import math
import torch
@cuda.jit
def vec_add_fp16_kernel(A, B, C, SIZE):
idx = cuda.threadIdx.x + cuda.blockIdx.x * cuda.blockDim.x
if idx < SIZE:
C[idx] = A[idx] + B[idx]
def custom_kernel(data):
A, B, C = data
SIZE = A.numel()
A_flat = cuda.as_cuda_array(A.view(-1))
B_flat = cuda.as_cuda_array(B.view(-1))
C_flat = cuda.as_cuda_array(C.view(-1))
threads_per_block = 1024
blocks = math.ceil(SIZE / threads_per_block)
vec_add_fp16_kernel[blocks, threads_per_block](A_flat, B_flat, C_flat, SIZE)
return C
Source code from GPU Mode and the KernelBot dataset · June 9 Researcher Reciprocity License v1.0
Best evidence level for this revision: reported
JSON