use const_like in uop zero folding [pr] (#8470)

This commit is contained in:
qazal
2025-01-02 19:05:09 +02:00
committed by GitHub
parent 6fa38367bf
commit 08c9d980dc
2 changed files with 2 additions and 4 deletions

View File

@@ -2054,14 +2054,12 @@ class TestBigGraph(unittest.TestCase):
assert UPat(Ops.CONST, arg=0).match(sink, {}), f"expected {sink} to collapse to a const 0"
assert sink.shape == a.shape
@unittest.expectedFailure
def test_const_folding_ne(self):
a = Tensor([1])
sink = tensor_rewrite(a != a)
assert UPat(Ops.CONST, arg=False).match(sink, {}), f"expected {sink} to collapse to a const False"
assert sink.shape == a.shape
@unittest.expectedFailure
def test_const_folding_lt(self):
a = Tensor([1])
sink = tensor_rewrite(a < a)