Skip to content
KernelIndex
Search⌘K

submission 66371

0x6c69676874 · python · License unknown

Use it

Vendorable · source mirrored · license unknownView source →

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

submission_triton.py
curl "https://kernelindex.com/api/v1/implementations/kernelbot-vectoradd-v2-66371?include=source"
interfacepython
Compatibility
measured onNVIDIA B200
declared hardwareNVIDIA B200
architecturessm_100
dtypesfp16

Benchmark evidence

1 measurement across 1 GPU, fastest first.

Operation / workload
Hardware
Latency
Rank
Observed
FP16 vector additionsuite of 5 cases
NVIDIA B200
295.3µs
#59 of 66
2025-10-30

Reported · How evidence levels are derived →

Source and license

sourceavailable
revision digestsha256:aa4a4a08c563b22a2e5d3aedb7e80f30adb498947cee6fd893f494dde55337df
license declaredunknown
license concludedunknown
authors0x6c69676874
imported2026-08-15

Kernel source

submission_triton.py39 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, M, N,
    BLOCK_SIZE: tl.constexpr,
):
    row_idx = tl.program_id(0) * BLOCK_SIZE + tl.arange(0, BLOCK_SIZE)
    col_idx = tl.program_id(1) * BLOCK_SIZE + tl.arange(0, BLOCK_SIZE)
    
    mask_row = row_idx < M
    mask_col = col_idx < N

    A = tl.load(A_ptr + row_idx[:, None] * N + col_idx[None, :], mask=mask_row[:, None] & mask_col[None, :], other=0.0)
    B = tl.load(B_ptr + row_idx[:, None] * N + col_idx[None, :], mask=mask_row[:, None] & mask_col[None, :], other=0.0)

    C = A + B
    tl.store(C_ptr + row_idx[:, None] * N + col_idx[None, :], C, mask=mask_row[:, None] & mask_col[None, :])

def custom_kernel(data: input_t) -> output_t:
    A, B, C = data
    M, N = A.shape

    BLOCK_SIZE = 32
    grid = (triton.cdiv(M, BLOCK_SIZE), triton.cdiv(N, BLOCK_SIZE))

    add_kernel[grid](
        A, B, C, M, N,
        BLOCK_SIZE=BLOCK_SIZE,
    )

    return C
scrolls · 39 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