forked from tinygrad/tinygrad
limit UOps.ALU min/max to non-float only (#7336)
does this impact anything? some inf is incorrect now
This commit is contained in:
+1
-1
@@ -377,7 +377,7 @@ class UOp(MathTrait, metaclass=UOpMetaClass):
|
||||
if self.op is UOps.SPECIAL: return 0, self.arg[1]-1 if isinstance(self.arg[1], int) else dtypes.max(self.dtype)
|
||||
if self.op is UOps.CONST: return self.arg, self.arg
|
||||
if self.op is UOps.VCONST: return (min(self.arg), max(self.arg))
|
||||
if self.op is UOps.ALU:
|
||||
if self.op is UOps.ALU and not dtypes.is_float(self.dtype):
|
||||
s0,s1,s2 = [cast(UOp, self.src[i] if i < len(self.src) else None) for i in range(3)]
|
||||
if self.arg is BinaryOps.ADD: return s0.vmin+s1.vmin, s0.vmax+s1.vmax
|
||||
if self.arg is BinaryOps.MUL:
|
||||
|
||||
Reference in New Issue
Block a user