[Refactor] Remove dead code multiple places (#58002)

Signed-off-by: yewentao256 <zhyanwentao@126.com>
This commit is contained in:
Wentao Ye
2026-09-22 16:36:03 -04:00
committed by GitHub
parent 276db94fb2
commit fae5cbfc8b
12 changed files with 3 additions and 585 deletions
-15
View File
@@ -62,21 +62,6 @@ def apply_temperature(
)
@triton.jit
def tl_rand64(seed, offset, includes_zero: tl.constexpr):
lo, hi, _, _ = tl.randint4x(seed, offset)
lo = lo.to(tl.uint32, bitcast=True).to(tl.uint64)
hi = hi.to(tl.uint32, bitcast=True).to(tl.uint64)
r = (hi << 32) | lo
# 1 / 2**64
scale = 5.421010862427522170037e-20
u = r.to(tl.float64) * scale
if not includes_zero:
u = tl.maximum(u, 2.2250738585072014e-308) # float64 tiny
return u
@triton.jit
def tl_rand32(seed, offset, includes_zero: tl.constexpr):
u = tl.rand(seed, offset)