memplan into one buffer (#9526)

* new memplanner

* new should works

* fix

* VALIDATE_MEMORY_PLANNER

* hm?

* ugh

* fix alignment

* fix2

* rm

* tiny fixes

* test

* comments and fixes

* fix2

* liiiinetr

* t

* fix
This commit is contained in:
nimlgen
2025-03-27 01:46:50 +07:00
committed by GitHub
parent 8b717c345c
commit dc9da1d917
4 changed files with 50 additions and 26 deletions

View File

@@ -583,7 +583,9 @@ class TestJitFree(unittest.TestCase):
pre_free = GlobalCounters.mem_used
fxn.captured.free_intermediates()
savings_after_free = pre_free - GlobalCounters.mem_used
self.assertEqual(savings_after_free, 2024)
# Different allocator implementations have different savings.
self.assertEqual(savings_after_free, 8196 if hasattr(Device[Device.DEFAULT].allocator, '_offset') else 2024)
out = fxn(Tensor([11,1,2,3,4]))
self.assertEqual(out.item(), 13600)