MCPcopy Create free account
hub / github.com/FlashSampling/FlashSampling / argsort_asc_kernel

Function argsort_asc_kernel

tests/test_tl_argsort.py:20–26  ·  view source on GitHub ↗
(x_ptr, out_vals_ptr, out_ids_ptr, N: tl.constexpr)

Source from the content-addressed store, hash-verified

18
19@triton.jit
20def argsort_asc_kernel(x_ptr, out_vals_ptr, out_ids_ptr, N: tl.constexpr): # noqa: N803
21 offs = tl.arange(0, N)
22 x = tl.load(x_ptr + offs)
23 ids = offs.to(tl.int32)
24 sorted_x, sorted_ids = argsort(x, ids, descending=False)
25 tl.store(out_vals_ptr + offs, sorted_x)
26 tl.store(out_ids_ptr + offs, sorted_ids)
27
28
29@triton.jit

Callers

nothing calls this directly

Calls 1

argsortFunction · 0.90

Tested by

no test coverage detected