submission 512776
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-512776?include=source"interfacepython
Compatibility
measured onNVIDIA H100
declared hardwareNVIDIA H100
architecturessm_90
dtypesfp32
Benchmark evidence
1 measurement across 1 GPU, fastest first.
Reported · How evidence levels are derived →
Source and license
sourceavailable
revision digestsha256:ea7f8dc69f7aa2f8860a90ec1cb75861acb2b5c7ebffe9df091eb0abccaf94d3
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
Changes from previous submission
Against this author's previous submission submission 512759.
Best evidence level for this revision: reported
JSON