submission 516101
Weyland Joyner · python · License unknown
Use it
Vendorable · source mirrored · license unknownView source →
No package. Vendor the mirrored source: 44 lines, June 9 Researcher Reciprocity License v1.0.
submission.py
curl "https://kernelindex.com/api/v1/implementations/kernelbot-grayscale-v2-516101?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
Reported · How evidence levels are derived →
Source and license
sourceavailable
revision digestsha256:ba2815dcc70f21db92cbe83bc3cc9466ee33c5b3bf773db09d071e305fa86b05
license declaredunknown
license concludedunknown
authorsWeyland Joyner
imported2026-08-15
Kernel source
submission.py44 lines
#!POPCORN leaderboard grayscale_v2
#!POPCORN gpu A100
import torch
import triton
import triton.language as tl
@triton.jit
def grayscale_kernel(
input_ptr,
output_ptr,
H,
W,
BLOCK: tl.constexpr
):
pid = tl.program_id(0)
pixel_idx = pid * BLOCK + tl.arange(0, BLOCK)
mask = pixel_idx < H * W
base = pixel_idx * 3
R = tl.load(input_ptr + base + 0, mask=mask, other=0.0)
G = tl.load(input_ptr + base + 1, mask=mask, other=0.0)
B = tl.load(input_ptr + base + 2, mask=mask, other=0.0)
gray = 0.2989 * R + 0.5870 * G + 0.1140 * B
tl.store(output_ptr + pixel_idx, gray, mask=mask)
def custom_kernel(data):
input_tensor, output_tensor = data
H, W, _ = input_tensor.shape
N = H * W
BLOCK = 1024
grid = (triton.cdiv(N, BLOCK),)
grayscale_kernel[grid](
input_tensor,
output_tensor,
H,
W,
BLOCK=BLOCK
)
return output_tensor
scrolls · 44 lines total
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 516094.
Best evidence level for this revision: reported
JSON