Skip to content
KernelIndex
Search⌘K

submission 512759

mreso · python · License unknown

Use it

Vendorable · source mirrored · license unknownView source →

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

submission_sort_v2.py
curl "https://kernelindex.com/api/v1/implementations/kernelbot-sort-v2-512759?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
Sortsuite of 5 cases
NVIDIA B200
5.60ms
#17 of 23
2026-03-04

Reported · How evidence levels are derived →

Source and license

sourceavailable
revision digestsha256:41ebb959f14b46e479d3f590263ab67893442816a0b6b02349cf7601221da115
license declaredunknown
license concludedunknown
authorsmreso
imported2026-08-15

Kernel source

submission_sort_v2.py20 lines
# submission_sort_v2.py
# Sort a 1D float32 tensor in ascending order.
# Interface: custom_kernel((input_tensor, output_tensor)) -> output
#   input_tensor:  (size,) float32 on CUDA
#   output_tensor: (size,) float32 pre-allocated
#
# Strategy: delegate to torch.sort (cuDNN/CUB radix sort internally).
# A pure-Triton radix sort requires a stable scatter phase that is complex
# to implement correctly; torch.sort provides a correct, highly-optimised
# baseline.  Replacing with a custom Triton radix sort is a future step.

import torch
from task import input_t, output_t


def custom_kernel(data: input_t) -> output_t:
    x, out = data
    out.copy_(torch.sort(x)[0])
    return out

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

Best evidence level for this revision: reported

JSON