mirror of
https://github.com/tinygrad/tinygrad.git
synced 2026-01-09 15:08:02 -05:00
no functions with same names in test/ (#1811)
This commit is contained in:
@@ -37,7 +37,6 @@ exclude = [
|
||||
"F541",
|
||||
"E722",
|
||||
"E731",
|
||||
"F811",
|
||||
"F821",
|
||||
"F841",
|
||||
]
|
||||
|
||||
@@ -183,7 +183,7 @@ class TestCacheCollector(unittest.TestCase):
|
||||
assert cache[0][1][0] == cache[3][1][0], "Output buffers from 1st and 4th should be the same"
|
||||
FAKE_GLOBAL_ALLOCATOR = None
|
||||
|
||||
def test_cache_collector_optimize_when_not_cached_anymore(self):
|
||||
def test_cache_collector_mark_output_buffer(self):
|
||||
global FAKE_GLOBAL_ALLOCATOR
|
||||
FAKE_GLOBAL_ALLOCATOR = FakeAllocator(256)
|
||||
output_buffer = FakeBuffer(240, dtypes.float32)
|
||||
@@ -201,7 +201,7 @@ class TestCacheCollector(unittest.TestCase):
|
||||
assert cache[1][1][2] == inps[1], "Input should be on its place."
|
||||
assert cache[-1][1][0] == out, "Output does not match."
|
||||
assert cache[0][1][0] != cache[3][1][0], "Cannot reuse 4th output buffer, it's an output buffer which might ovewrite itself"
|
||||
assert get_bufs_count(cache) == 7, "Should have 6 buffers in total"
|
||||
assert get_bufs_count(cache) == 7, "Should have 7 buffers in total"
|
||||
FAKE_GLOBAL_ALLOCATOR = None
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
Reference in New Issue
Block a user