mirror of
https://github.com/tinygrad/tinygrad.git
synced 2026-04-29 03:00:14 -04:00
little symbolic changes [pr] (#6849)
* little symbolic changes [pr] * symbolic needs resolve too * no resolve * less change
This commit is contained in:
@@ -39,6 +39,10 @@ class TestUOpResolve(unittest.TestCase):
|
||||
u = UOp.const(dtypes.int, 4) > 7
|
||||
self.assertFalse(u)
|
||||
|
||||
def test_ssimplify(self):
|
||||
self.assertEqual((8 % UOp.const(dtypes.int, 4)).ssimplify(), 0)
|
||||
self.assertEqual((8 * UOp.const(dtypes.int, 4)).ssimplify(), 32)
|
||||
|
||||
def test_ambiguous_less_than(self):
|
||||
u = UOp.define_var("i", dtypes.pyint, 1, 10)
|
||||
self.assertTrue(resolve(u < 4))
|
||||
|
||||
Reference in New Issue
Block a user