mirror of
https://github.com/tinygrad/tinygrad.git
synced 2026-06-24 02:14:17 +00:00
delete extra cast (#14517)
This commit is contained in:
parent
9d1e9e643e
commit
af4c74bb41
1 changed files with 1 additions and 1 deletions
|
|
@ -44,7 +44,7 @@ def ldexp3k(d:UOp, e:UOp) -> UOp:
|
|||
dtype = {dtypes.float64: dtypes.int64, dtypes.float32: dtypes.int32, dtypes.float16: dtypes.int16}[d.dtype.scalar()].vec(d.dtype.count)
|
||||
m1 = d.bitcast(dtype)
|
||||
m2 = shl(e.cast(dtype), mantissa_bits(d.dtype))
|
||||
return (m1 + m2).bitcast(d.dtype).cast(d.dtype)
|
||||
return (m1 + m2).bitcast(d.dtype)
|
||||
|
||||
def ldexp2k(d:UOp, e:UOp) -> UOp:
|
||||
"""d*2^e. much faster than ldexp3k but risky. d > 0 and d is not denormal."""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue