Skip to content
KernelIndex
Search⌘K

submission 37985

Sahith · python · License unknown

Use it

Vendorable · source mirrored · license unknownView source →

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

submission_pytorch.py
curl "https://kernelindex.com/api/v1/implementations/kernelbot-vectoradd-v2-37985?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
FP16 vector additionsuite of 5 cases
NVIDIA A100
953.0µs
#32= of 87
2025-09-13

Reported · How evidence levels are derived →

Source and license

sourceavailable
revision digestsha256:ad0fcce18eb6dda09c2cc40d7024e46c83e174477de03cec7dd0b021cf004552
license declaredunknown
license concludedunknown
authorsSahith
imported2026-08-15

Kernel source

submission_pytorch.py26 lines
import torch
from torch.utils.cpp_extension import load_inline
from typing import List
from task import input_t, output_t


def custom_kernel(data: input_t) -> output_t:
    """
    Custom implementation of vector addition using CUDA.
    Args:
        inputs: List of pairs of tensors [A, B] to be added.
    Returns:
        Tensor containing element-wise sum.
    """
    A, B, C = data

    assert A.is_cuda and B.is_cuda, "Input tensors must be on GPU"
    assert A.shape == B.shape, "Input tensors must have the same shape"
    assert A.dtype == torch.float16 and B.dtype == torch.float16, "Input tensors must be float16"
    
    # Simply reuse the existing add function we already defined
    # This avoids the compilation issues with the inline kernel
    C = A + B
    return C
    #return add(A, B)

Source code from GPU Mode and the KernelBot dataset · June 9 Researcher Reciprocity License v1.0

Best evidence level for this revision: reported

JSON