Skip to content
KernelIndex
Search⌘K

submission 66578

albert9823 · python · License unknown

Use it

Vendorable · source mirrored · license unknownView source →

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

submission.py
curl "https://kernelindex.com/api/v1/implementations/kernelbot-grayscale-v2-66578?include=source"
interfacepython
Compatibility
measured onNVIDIA A100
declared hardwareNVIDIA A100
architecturessm_80
dtypesfp32

Benchmark evidence

1 measurement across 1 GPU, fastest first.

Operation / workload
Hardware
Latency
Rank
Observed
RGB to grayscalesuite of 6 cases
NVIDIA A100
10.5ms
#80 of 137
2025-11-04

Reported · How evidence levels are derived →

Source and license

sourceavailable
revision digestsha256:b0700222df3b69171d4dfce7cd4e2a9944847c7a528750e53174ce52702719ab
license declaredunknown
license concludedunknown
authorsalbert9823
imported2026-08-15

Kernel source

submission.py19 lines
from task import input_t, output_t
import torch

def custom_kernel(data: input_t) -> output_t:
    # Unpack (input_rgb, output_gray)
    x, out = data  # x: (H, W, 3), out: (H, W)

    # Match device & dtype with input
    weights = torch.tensor(
        [0.2989, 0.5870, 0.1140],
        device=x.device,
        dtype=x.dtype
    )

    # Compute grayscale along the channel dim
    out[...] = torch.sum(x * weights, dim=-1)

    return out

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

Best evidence level for this revision: reported

JSON