submission 673007
Elán Zainos Corona · python · License unknown
Use it
Vendorable · source mirrored · license unknownView source →
No package. Vendor the mirrored source: 34 lines, June 9 Researcher Reciprocity License v1.0.
Mcd1.1.py
curl "https://kernelindex.com/api/v1/implementations/kernelbot-histogram-v2-673007?include=source"interfacepython
Compatibility
measured onNVIDIA B200
declared hardwareNVIDIA B200
architecturessm_100
dtypesuint8
Benchmark evidence
1 measurement across 1 GPU, fastest first.
Reported · How evidence levels are derived →
Source and license
sourceavailable
revision digestsha256:028937d42d5bfaffca8aabdcf8dfc8b55d9c44c7762b6ecebcae408c67f98561
license declaredunknown
license concludedunknown
authorsElán Zainos Corona
imported2026-08-15
Techniques
Extracted from the mirrored source by pattern, never inferred. Each row cites its line.
num-warps = 8
num_warps=8 # Maximiza ocupación en B200Kernel source
Mcd1.1.py34 lines
# -*- coding: utf-8 -*-
import torch
import triton
import triton.language as tl
@triton.jit
def _mcd_kernel(input_ptr, output_ptr, size, BLOCK_SIZE: tl.constexpr):
pid = tl.program_id(0)
# 1. Carga de datos contiguos para maximizar ancho de banda
offsets = pid * BLOCK_SIZE + tl.arange(0, BLOCK_SIZE)
mask = offsets < size
data = tl.load(input_ptr + offsets, mask=mask, other=0)
# 2. Atómico Global Directo
# En Blackwell, el motor de coherencia L2 agrupa estos atómicos
# automáticamente si el puntero base (output_ptr) es el mismo.
tl.atomic_add(output_ptr + data, 1, mask=mask)
def custom_kernel(data):
input_tensor, output = data[0], data[1]
size = input_tensor.numel()
output.zero_()
# BLOCK_SIZE de 512 o 1024 para equilibrar hilos por SM
BLOCK_SIZE = 1024
grid = (triton.cdiv(size, BLOCK_SIZE),)
_mcd_kernel[grid](
input_tensor, output, size,
BLOCK_SIZE=BLOCK_SIZE,
num_warps=8 # Maximiza ocupación en B200
)
return output
scrolls · 34 lines total
Source code from GPU Mode and the KernelBot dataset · June 9 Researcher Reciprocity License v1.0
Best evidence level for this revision: reported
JSON