MCPcopy
hub / github.com/tinygrad/tinygrad / _alloc

Function _alloc

test/null/test_viz.py:630–633  ·  view source on GitHub ↗
(b:int)

Source from the content-addressed store, hash-verified

628 self.assertListEqual(layout[2:], ["TEST:1", "TEST:1 N1", "TEST:1 N2", "TEST:1:ENGINE:0", "TEST:1:ENGINE:0 N1", "TEST:2 N1"])
629
630def _alloc(b:int):
631 a = Tensor.empty(b, device="NULL", dtype=dtypes.char)
632 a.uop.buffer.allocate()
633 return a
634
635class TestVizMemoryLayout(unittest.TestCase):
636 def test_double_alloc(self):

Callers 4

test_double_allocMethod · 0.85
test_del_onceMethod · 0.85
test_alloc_freeMethod · 0.85
test_free_lastMethod · 0.85

Calls 2

allocateMethod · 0.80
emptyMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…