delete unused cast/bitcast lines from ops.py [pr] (#8651)

* move cast and bitcast out

* more deletion of bitcast arg

* fix test_bitcast_fuses

* update tests

* work
This commit is contained in:
qazal
2025-01-17 03:04:18 -05:00
committed by GitHub
parent 4f0d1b4759
commit 2b7db9b45d
7 changed files with 14 additions and 16 deletions

View File

@@ -1344,8 +1344,8 @@ class TestSchedule(unittest.TestCase):
def test_bitcast_fuses(self):
x = cast(UOp, Tensor.empty(1, dtype=dtypes.float32).realize().lazydata)
a = x.alu(Ops.EXP2).cast(dtypes.int32, True)
b = x.cast(dtypes.int32, True)
a = x.alu(Ops.EXP2).bitcast(dtypes.int32)
b = x.bitcast(dtypes.int32)
b = a.alu(Ops.ADD, b)
check_schedule(b, 1) # this should fuse when it makes sense