fix Tensor.pow folding for exponent 0 and 1 (#4025)

This commit is contained in:
chenyu
2024-03-31 19:57:23 -04:00
committed by GitHub
parent a4ae9352bd
commit 0e02d074bd
3 changed files with 3 additions and 7 deletions

View File

@@ -363,7 +363,7 @@ class TestSchedule(unittest.TestCase):
x = Tensor([1,2,3,4])
out = x ** Tensor(0)
# NOTE: this is ConstBuffer 0 + ConstBuffer 1
check_schedule(out, 1)
check_schedule(out, 0)
def test_zero_size(self):
x = Tensor.empty(2, 3, 0)