Skip to content
KernelIndex
Search⌘K

submission 545125

rajesh0042 · python · License unknown

Use it

Vendorable · source mirrored · license unknownView source →

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

sort_v2.py
curl "https://kernelindex.com/api/v1/implementations/kernelbot-sort-v2-545125?include=source"
interfacepython
Compatibility
measured onNVIDIA H100
declared hardwareNVIDIA H100
architecturessm_90
dtypesfp32

Benchmark evidence

1 measurement across 1 GPU, fastest first.

Operation / workload
Hardware
Latency
Rank
Observed
Sortsuite of 5 cases
NVIDIA H100
6.32ms
#11 of 26
2026-03-13

Reported · How evidence levels are derived →

Source and license

sourceavailable
revision digestsha256:ab54b978436503f1e1441a172e6e7d8fe8099285651baf72c53b67175e19a2b8
license declaredunknown
license concludedunknown
authorsrajesh0042
imported2026-08-15

Kernel source

sort_v2.py17 lines
import os
os.environ["CUBLAS_WORKSPACE_CONFIG"] = ":4096:8"

import torch
from task import input_t, output_t

# Pre-allocate index buffer for sort
_idx_cache = {}

def custom_kernel(data: input_t) -> output_t:
    data, output = data
    n = data.numel()
    if n not in _idx_cache or _idx_cache[n].device != data.device:
        _idx_cache[n] = torch.empty(n, device=data.device, dtype=torch.int64)
    torch.sort(data, out=(output, _idx_cache[n]))
    return output

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 545120.

Best evidence level for this revision: reported

JSON