Skip to content

Commit 325974f

Browse files
committed
fix sort: remove calls to _unwrap_if_constexpr to be compatible with triton 3.1
1 parent 77b1f38 commit 325974f

1 file changed

Lines changed: 0 additions & 5 deletions

File tree

src/flag_gems/ops/sort.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import torch
44
import triton
55
import triton.language as tl
6-
from triton.language.core import _unwrap_if_constexpr
76

87
from ..runtime import torch_device_fn
98
from ..utils import libentry
@@ -14,20 +13,16 @@
1413

1514
@tl.constexpr
1615
def get_int_t(num_bits: tl.constexpr, signed: tl.constexpr) -> tl.dtype:
17-
num_bits = _unwrap_if_constexpr(num_bits)
18-
signed = _unwrap_if_constexpr(signed)
1916
return tl.core.get_int_dtype(num_bits, signed)
2017

2118

2219
@tl.constexpr
2320
def one_zeros(num_bits: tl.constexpr) -> int:
24-
num_bits = _unwrap_if_constexpr(num_bits)
2521
return 1 << (num_bits - 1)
2622

2723

2824
@tl.constexpr
2925
def zero_ones(num_bits: tl.constexpr) -> int:
30-
num_bits = _unwrap_if_constexpr(num_bits)
3126
return (1 << (num_bits - 1)) - 1
3227

3328

0 commit comments

Comments
 (0)