Skip to content
KernelIndex
Search⌘K

submission 66740

kaide_max · python · License unknown

Use it

Vendorable · source mirrored · license unknownView source →

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

grayscale.py
curl "https://kernelindex.com/api/v1/implementations/kernelbot-grayscale-v2-66740?include=source"
interfacepython
Compatibility
measured onNVIDIA B200
declared hardwareNVIDIA B200
architecturessm_100
dtypesfp32

Benchmark evidence

1 measurement across 1 GPU, fastest first.

Operation / workload
Hardware
Latency
Rank
Observed
RGB to grayscalesuite of 6 cases
NVIDIA B200
5.14ms
#72 of 84
2025-11-05

Reported · How evidence levels are derived →

Source and license

sourceavailable
revision digestsha256:fbbcc93c4f45204b67301b745478d96a6019bbc2a68ea0ed4139724e509aecd7
license declaredunknown
license concludedunknown
authorskaide_max
imported2026-08-15

Kernel source

grayscale.py9 lines
import torch

def custom_kernel(input):
    # Unpack if tuple (CLI spec)
    input_tensor = input[0] if isinstance(input, tuple) else input
    coeffs = torch.tensor([0.299, 0.587, 0.114], device=input_tensor.device, dtype=input_tensor.dtype)
    gray = torch.sum(input_tensor * coeffs.view(1, 1, 3), dim=2)  # Fused weighted sum
    return gray

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

Best evidence level for this revision: reported

JSON