Skip to content
KernelIndex
Search⌘K

submission 551588

idanbeck · python · License unknown

Use it

Vendorable · source mirrored · license unknownView source →

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

submission.py
curl "https://kernelindex.com/api/v1/implementations/kernelbot-grayscale-v2-551588?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
3.81ms
#42 of 137
2026-03-14

Reported · How evidence levels are derived →

Source and license

sourceavailable
revision digestsha256:7f8efae6cae201692dc9e8ebb1b4a32409d11d21af708f7dd0b0c5ebf055317e
license declaredunknown
license concludedunknown
authorsidanbeck
imported2026-08-15

Techniques

Extracted from the mirrored source by pattern, never inferred. Each row cites its line.

autotunereturn torch.compile(f, fullgraph=False, mode="max-autotune-no-cudagraphs")

Kernel source

submission.py25 lines
#!POPCORN leaderboard grayscale_v2
#!POPCORN gpu A100
import torch
_F = None


def _build():
    def f(x):
        return x[..., 0] * 0.2989 + x[..., 1] * 0.5870 + x[..., 2] * 0.1140

    try:
        return torch.compile(f, fullgraph=False, mode="max-autotune-no-cudagraphs")
    except Exception:
        return f


@torch.inference_mode()
def custom_kernel(data):
    global _F
    rgb, out = data
    if _F is None:
        _F = _build()
    out[...] = _F(rgb)
    return out

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

Changes from previous submission

Against this author's previous submission submission 551567.

⋯ 8 unchanged lines
return x[..., 0] * 0.2989 + x[..., 1] * 0.5870 + x[..., 2] * 0.1140
try:
- return torch.compile(f, fullgraph=True, mode="max-autotune")
+ return torch.compile(f, fullgraph=False, mode="max-autotune-no-cudagraphs")
except Exception:
return f

Best evidence level for this revision: reported

JSON