mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-11-23 18:33:51 +08:00
e20fa4e313
version: sunnypilot v2026.003.000 (feature-branch)
date: 2026-11-21T03:18:39
master commit: 0e583a9c1b
14 lines
478 B
Python
14 lines
478 B
Python
import unittest
|
|
from tinygrad import Tensor, Variable
|
|
|
|
class TestTensorVariable(unittest.TestCase):
|
|
def test_symbolic_chunk_error_on_symbolic_dim(self):
|
|
# chunk should fail when trying to split along a symbolic dimension
|
|
vv = Variable("a", 1, 10).bind(4)
|
|
t = Tensor.ones(10, 8).contiguous()[:vv, :] # shape (vv, 8)
|
|
with self.assertRaises(AssertionError):
|
|
t.chunk(2, dim=0) # can't split along symbolic dim
|
|
|
|
if __name__ == '__main__':
|
|
unittest.main()
|