smaller tests are faster tests [pr] (#10704)

* remove del spam from CI

* more

* preconstruct default buffer spec

* ignore those errors

* check exception

* more exception check

* skip stuff

* smaller tests mean faster tests

* a few more
This commit is contained in:
George Hotz
2025-06-08 10:54:19 -07:00
committed by GitHub
parent 67a1c92fc0
commit 4e2c3560b4
6 changed files with 19 additions and 17 deletions

View File

@@ -301,11 +301,11 @@ class TestRandomness(unittest.TestCase):
lambda x: np.random.uniform(-1, 1, size=x) * math.sqrt(6 / (x[0] + math.prod(x[1:])))))
def test_kaiming_uniform(self):
for shape in [(256, 128, 3, 3), (80, 44), (3, 55, 35)]:
for shape in [(32, 128, 3, 3), (80, 44), (3, 55, 35)]:
self.assertTrue(equal_distribution(Tensor.kaiming_uniform, lambda x: torch.nn.init.kaiming_uniform_(torch.empty(x)), shape=shape))
def test_kaiming_normal(self):
for shape in [(256, 128, 3, 3), (80, 44), (3, 55, 35)]:
for shape in [(32, 128, 3, 3), (80, 44), (3, 55, 35)]:
self.assertTrue(equal_distribution(Tensor.kaiming_normal, lambda x: torch.nn.init.kaiming_normal_(torch.empty(x)), shape=shape))
def test_multinomial(self):