Skip to content
KernelIndex
Search⌘K

submission 66933

cdtmc · python · License unknown

Use it

Vendorable · source mirrored · license unknownView source →

No package. Vendor the mirrored source: 27 lines, June 9 Researcher Reciprocity License v1.0.

submission_gpt.py
curl "https://kernelindex.com/api/v1/implementations/kernelbot-vectoradd-v2-66933?include=source"
interfacepython
Compatibility
measured onNVIDIA H100
declared hardwareNVIDIA H100
architecturessm_90
dtypesfp16

Benchmark evidence

1 measurement across 1 GPU, fastest first.

Operation / workload
Hardware
Latency
Rank
Observed
FP16 vector additionsuite of 5 cases
NVIDIA H100
526.3µs
#22 of 44
2025-11-05

Reported · How evidence levels are derived →

Source and license

sourceavailable
revision digestsha256:6e3b492fb2e47990322cf86158a6369b058b00616bf3c7d326efaab3bd548d55
license declaredunknown
license concludedunknown
authorscdtmc
imported2026-08-15

Kernel source

submission_gpt.py27 lines
#!POPCORN leaderboard vectoradd_v2

import torch
import triton
import triton.language as tl
from task import input_t, output_t


@triton.jit
def add_kernel(A_ptr, B_ptr, C_ptr, size, BLOCK_SIZE: tl.constexpr):
    pid = tl.program_id(0)
    offsets = pid * BLOCK_SIZE + tl.arange(0, BLOCK_SIZE)
    mask = offsets < size
    A = tl.load(A_ptr + offsets, mask=mask)
    B = tl.load(B_ptr + offsets, mask=mask)
    tl.store(C_ptr + offsets, A + B, mask=mask)


def custom_kernel(data: input_t) -> output_t:
    A, B, C = data
    A, B, C = A.contiguous(), B.contiguous(), C.contiguous()
    size = A.numel()
    BLOCK_SIZE = 1024
    grid = (triton.cdiv(size, BLOCK_SIZE),)
    add_kernel[grid](A, B, C, size, BLOCK_SIZE=BLOCK_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