remove unused ctx [pr] (#8751)

* remove unused ctx [pr]

* fix test
This commit is contained in:
George Hotz
2025-01-26 17:59:15 +09:00
committed by GitHub
parent 06b58aa7ec
commit b53fe7c2fc
2 changed files with 2 additions and 12 deletions

View File

@@ -33,7 +33,7 @@ class TestGC(unittest.TestCase):
base = tensors_allocated()
a = Tensor(np.zeros((4, 4), dtype=np.float32), requires_grad=True)
b = Tensor.rand(4, 4, requires_grad=True)
assert (tensors_allocated()-base == 5)
assert (tensors_allocated()-base == 4)
(a*b).mean().backward()
assert (tensors_allocated()-base == 6)
del b