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

Function _bitonic_merge

src/fused_mm_sampling/tl_argsort.py:55–62  ·  view source on GitHub ↗
(x, ids, stage: core.constexpr, order: core.constexpr, n_dims: core.constexpr)

Source from the content-addressed store, hash-verified

53
54@triton.jit
55def _bitonic_merge(x, ids, stage: core.constexpr, order: core.constexpr, n_dims: core.constexpr):
56 if order == 2:
57 flip = _indicator(n_dims, stage)
58 else:
59 flip = order
60 for i in core.static_range(stage):
61 x, ids = _compare_and_swap(x, ids, flip, stage - 1 - i, n_dims)
62 return x, ids
63
64
65@triton.jit

Callers 1

argsortFunction · 0.85

Calls 2

_indicatorFunction · 0.85
_compare_and_swapFunction · 0.85

Tested by

no test coverage detected