omnimalloc 0.4.0__tar.gz → 0.6.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (230) hide show
  1. {omnimalloc-0.4.0 → omnimalloc-0.6.0}/.gitignore +4 -0
  2. {omnimalloc-0.4.0 → omnimalloc-0.6.0}/.pre-commit-config.yaml +2 -0
  3. {omnimalloc-0.4.0 → omnimalloc-0.6.0}/CMakeLists.txt +31 -3
  4. {omnimalloc-0.4.0 → omnimalloc-0.6.0}/PKG-INFO +71 -5
  5. omnimalloc-0.6.0/README.md +102 -0
  6. omnimalloc-0.6.0/assets/allocation_dark.svg +4453 -0
  7. omnimalloc-0.6.0/assets/allocation_light.svg +4453 -0
  8. omnimalloc-0.6.0/assets/hero_dark.svg +2779 -0
  9. omnimalloc-0.6.0/assets/hero_light.svg +2779 -0
  10. omnimalloc-0.6.0/assets/quality_dark.svg +2757 -0
  11. omnimalloc-0.6.0/assets/quality_light.svg +2757 -0
  12. omnimalloc-0.6.0/assets/scaling_dark.svg +2409 -0
  13. omnimalloc-0.6.0/assets/scaling_light.svg +2409 -0
  14. omnimalloc-0.6.0/examples/01_basic.py +26 -0
  15. omnimalloc-0.6.0/examples/02_plotting.py +29 -0
  16. omnimalloc-0.6.0/examples/03_allocators.py +43 -0
  17. omnimalloc-0.6.0/examples/04_sources.py +39 -0
  18. omnimalloc-0.6.0/examples/05_benchmark.py +57 -0
  19. {omnimalloc-0.4.0 → omnimalloc-0.6.0}/pyproject.toml +11 -4
  20. omnimalloc-0.6.0/scripts/benchmark_allocation.py +363 -0
  21. omnimalloc-0.6.0/scripts/benchmark_pressure.py +494 -0
  22. omnimalloc-0.6.0/scripts/generate_readme_assets.py +692 -0
  23. omnimalloc-0.6.0/scripts/stress_omni.py +292 -0
  24. omnimalloc-0.6.0/src/cpp/allocators/best_fit.cpp +46 -0
  25. omnimalloc-0.6.0/src/cpp/allocators/best_fit.hpp +20 -0
  26. omnimalloc-0.6.0/src/cpp/allocators/first_fit.cpp +322 -0
  27. omnimalloc-0.6.0/src/cpp/allocators/first_fit.hpp +114 -0
  28. omnimalloc-0.6.0/src/cpp/allocators/local_search.cpp +77 -0
  29. omnimalloc-0.6.0/src/cpp/allocators/local_search.hpp +45 -0
  30. omnimalloc-0.6.0/src/cpp/allocators/omni.cpp +46 -0
  31. omnimalloc-0.6.0/src/cpp/allocators/omni.hpp +25 -0
  32. omnimalloc-0.6.0/src/cpp/allocators/simulated_annealing.cpp +85 -0
  33. omnimalloc-0.6.0/src/cpp/allocators/simulated_annealing.hpp +42 -0
  34. omnimalloc-0.6.0/src/cpp/allocators/supermalloc.cpp +1035 -0
  35. omnimalloc-0.6.0/src/cpp/allocators/supermalloc.hpp +233 -0
  36. omnimalloc-0.6.0/src/cpp/allocators/tabu_search.cpp +120 -0
  37. omnimalloc-0.6.0/src/cpp/allocators/tabu_search.hpp +42 -0
  38. omnimalloc-0.6.0/src/cpp/allocators/telamalloc.cpp +334 -0
  39. omnimalloc-0.6.0/src/cpp/allocators/telamalloc.hpp +46 -0
  40. omnimalloc-0.6.0/src/cpp/analysis/antichain.cpp +318 -0
  41. omnimalloc-0.6.0/src/cpp/analysis/antichain.hpp +44 -0
  42. omnimalloc-0.6.0/src/cpp/analysis/clock.hpp +375 -0
  43. omnimalloc-0.6.0/src/cpp/analysis/closure.cpp +194 -0
  44. omnimalloc-0.6.0/src/cpp/analysis/closure.hpp +41 -0
  45. omnimalloc-0.6.0/src/cpp/analysis/conflicts.cpp +164 -0
  46. omnimalloc-0.6.0/src/cpp/analysis/conflicts.hpp +57 -0
  47. omnimalloc-0.6.0/src/cpp/analysis/linearize.cpp +218 -0
  48. omnimalloc-0.6.0/src/cpp/analysis/linearize.hpp +33 -0
  49. omnimalloc-0.6.0/src/cpp/analysis/placement.cpp +120 -0
  50. omnimalloc-0.6.0/src/cpp/analysis/placement.hpp +22 -0
  51. omnimalloc-0.6.0/src/cpp/bindings.cpp +244 -0
  52. omnimalloc-0.6.0/src/cpp/common/deadline.hpp +45 -0
  53. omnimalloc-0.6.0/src/cpp/common/parallel.hpp +74 -0
  54. omnimalloc-0.6.0/src/cpp/primitives/allocation.cpp +182 -0
  55. omnimalloc-0.6.0/src/cpp/primitives/allocation.hpp +163 -0
  56. omnimalloc-0.6.0/src/cpp/primitives/allocation_kind.hpp +47 -0
  57. {omnimalloc-0.4.0 → omnimalloc-0.6.0}/src/cpp/primitives/id_type.hpp +0 -6
  58. {omnimalloc-0.4.0 → omnimalloc-0.6.0}/src/python/omnimalloc/__init__.py +9 -4
  59. omnimalloc-0.6.0/src/python/omnimalloc/_allocate.py +39 -0
  60. omnimalloc-0.6.0/src/python/omnimalloc/_cpp.pyi +137 -0
  61. {omnimalloc-0.4.0 → omnimalloc-0.6.0}/src/python/omnimalloc/allocators/__init__.py +11 -10
  62. omnimalloc-0.6.0/src/python/omnimalloc/allocators/base.py +63 -0
  63. omnimalloc-0.6.0/src/python/omnimalloc/allocators/best_fit.py +23 -0
  64. omnimalloc-0.6.0/src/python/omnimalloc/allocators/genetic.py +175 -0
  65. omnimalloc-0.6.0/src/python/omnimalloc/allocators/greedy.py +94 -0
  66. omnimalloc-0.6.0/src/python/omnimalloc/allocators/greedy_base.py +94 -0
  67. omnimalloc-0.6.0/src/python/omnimalloc/allocators/hillclimb.py +167 -0
  68. omnimalloc-0.6.0/src/python/omnimalloc/allocators/minimalloc.py +80 -0
  69. {omnimalloc-0.4.0 → omnimalloc-0.6.0}/src/python/omnimalloc/allocators/naive.py +5 -5
  70. omnimalloc-0.6.0/src/python/omnimalloc/allocators/omni.py +31 -0
  71. omnimalloc-0.6.0/src/python/omnimalloc/allocators/random.py +41 -0
  72. omnimalloc-0.6.0/src/python/omnimalloc/allocators/simulated_annealing.py +63 -0
  73. omnimalloc-0.6.0/src/python/omnimalloc/allocators/supermalloc.py +171 -0
  74. omnimalloc-0.6.0/src/python/omnimalloc/allocators/tabu_search.py +61 -0
  75. omnimalloc-0.6.0/src/python/omnimalloc/allocators/telamalloc.py +59 -0
  76. omnimalloc-0.6.0/src/python/omnimalloc/allocators/utils.py +15 -0
  77. omnimalloc-0.6.0/src/python/omnimalloc/analysis/__init__.py +17 -0
  78. omnimalloc-0.6.0/src/python/omnimalloc/analysis/_conflicts.py +46 -0
  79. omnimalloc-0.6.0/src/python/omnimalloc/analysis/_pressure.py +131 -0
  80. omnimalloc-0.6.0/src/python/omnimalloc/analysis/clock.py +24 -0
  81. omnimalloc-0.6.0/src/python/omnimalloc/analysis/linearize.py +34 -0
  82. {omnimalloc-0.4.0 → omnimalloc-0.6.0}/src/python/omnimalloc/benchmark/__init__.py +4 -3
  83. {omnimalloc-0.4.0 → omnimalloc-0.6.0}/src/python/omnimalloc/benchmark/benchmark.py +61 -59
  84. {omnimalloc-0.4.0 → omnimalloc-0.6.0}/src/python/omnimalloc/benchmark/converters/model.py +17 -8
  85. {omnimalloc-0.4.0 → omnimalloc-0.6.0}/src/python/omnimalloc/benchmark/converters/onnx.py +22 -14
  86. {omnimalloc-0.4.0 → omnimalloc-0.6.0}/src/python/omnimalloc/benchmark/results/campaign.py +1 -1
  87. {omnimalloc-0.4.0 → omnimalloc-0.6.0}/src/python/omnimalloc/benchmark/results/export.py +4 -29
  88. {omnimalloc-0.4.0 → omnimalloc-0.6.0}/src/python/omnimalloc/benchmark/results/report.py +0 -8
  89. {omnimalloc-0.4.0 → omnimalloc-0.6.0}/src/python/omnimalloc/benchmark/results/result.py +2 -4
  90. {omnimalloc-0.4.0 → omnimalloc-0.6.0}/src/python/omnimalloc/benchmark/results/utils.py +2 -0
  91. {omnimalloc-0.4.0 → omnimalloc-0.6.0}/src/python/omnimalloc/benchmark/results/visualize.py +28 -32
  92. {omnimalloc-0.4.0 → omnimalloc-0.6.0}/src/python/omnimalloc/benchmark/sources/__init__.py +6 -4
  93. {omnimalloc-0.4.0 → omnimalloc-0.6.0}/src/python/omnimalloc/benchmark/sources/base.py +8 -2
  94. omnimalloc-0.6.0/src/python/omnimalloc/benchmark/sources/concurrent_tiling.py +116 -0
  95. {omnimalloc-0.4.0 → omnimalloc-0.6.0}/src/python/omnimalloc/benchmark/sources/generator.py +17 -16
  96. {omnimalloc-0.4.0 → omnimalloc-0.6.0}/src/python/omnimalloc/benchmark/sources/huggingface.py +9 -14
  97. {omnimalloc-0.4.0 → omnimalloc-0.6.0}/src/python/omnimalloc/benchmark/sources/minimalloc.py +4 -60
  98. omnimalloc-0.6.0/src/python/omnimalloc/benchmark/sources/pinwheel.py +62 -0
  99. omnimalloc-0.6.0/src/python/omnimalloc/benchmark/sources/sync_patterns.py +184 -0
  100. omnimalloc-0.6.0/src/python/omnimalloc/benchmark/sources/tiling.py +73 -0
  101. omnimalloc-0.6.0/src/python/omnimalloc/benchmark/sources/tiling_base.py +128 -0
  102. omnimalloc-0.6.0/src/python/omnimalloc/benchmark/sources/utils.py +15 -0
  103. {omnimalloc-0.4.0 → omnimalloc-0.6.0}/src/python/omnimalloc/benchmark/timer.py +4 -4
  104. omnimalloc-0.6.0/src/python/omnimalloc/benchmark/utils.py +31 -0
  105. {omnimalloc-0.4.0 → omnimalloc-0.6.0}/src/python/omnimalloc/common/__init__.py +0 -1
  106. omnimalloc-0.6.0/src/python/omnimalloc/common/constants.py +35 -0
  107. omnimalloc-0.6.0/src/python/omnimalloc/common/deadline.py +36 -0
  108. {omnimalloc-0.4.0 → omnimalloc-0.6.0}/src/python/omnimalloc/common/optional.py +1 -5
  109. omnimalloc-0.6.0/src/python/omnimalloc/common/parallel.py +20 -0
  110. {omnimalloc-0.4.0 → omnimalloc-0.6.0}/src/python/omnimalloc/common/registry.py +40 -4
  111. omnimalloc-0.6.0/src/python/omnimalloc/common/validation.py +15 -0
  112. omnimalloc-0.6.0/src/python/omnimalloc/io.py +104 -0
  113. {omnimalloc-0.4.0 → omnimalloc-0.6.0}/src/python/omnimalloc/primitives/__init__.py +3 -1
  114. omnimalloc-0.6.0/src/python/omnimalloc/primitives/allocation.py +21 -0
  115. {omnimalloc-0.4.0 → omnimalloc-0.6.0}/src/python/omnimalloc/primitives/memory.py +12 -21
  116. {omnimalloc-0.4.0 → omnimalloc-0.6.0}/src/python/omnimalloc/primitives/pool.py +24 -19
  117. omnimalloc-0.6.0/src/python/omnimalloc/primitives/utils.py +13 -0
  118. omnimalloc-0.6.0/src/python/omnimalloc/validate.py +93 -0
  119. omnimalloc-0.6.0/src/python/omnimalloc/visualize.py +603 -0
  120. {omnimalloc-0.4.0 → omnimalloc-0.6.0}/tests/conftest.py +9 -0
  121. {omnimalloc-0.4.0 → omnimalloc-0.6.0}/tests/integration/test_allocators_on_sources.py +77 -33
  122. {omnimalloc-0.4.0 → omnimalloc-0.6.0}/tests/integration/test_examples.py +2 -2
  123. omnimalloc-0.6.0/tests/integration/test_omni_torture.py +460 -0
  124. omnimalloc-0.6.0/tests/integration/test_supermalloc.py +51 -0
  125. omnimalloc-0.6.0/tests/unit/allocators/test_best_fit.py +101 -0
  126. omnimalloc-0.6.0/tests/unit/allocators/test_genetic.py +116 -0
  127. {omnimalloc-0.4.0 → omnimalloc-0.6.0}/tests/unit/allocators/test_greedy.py +213 -5
  128. omnimalloc-0.6.0/tests/unit/allocators/test_hillclimb.py +127 -0
  129. omnimalloc-0.6.0/tests/unit/allocators/test_minimalloc.py +74 -0
  130. omnimalloc-0.6.0/tests/unit/allocators/test_naive.py +49 -0
  131. omnimalloc-0.6.0/tests/unit/allocators/test_omni.py +175 -0
  132. omnimalloc-0.6.0/tests/unit/allocators/test_random.py +72 -0
  133. omnimalloc-0.6.0/tests/unit/allocators/test_simulated_annealing.py +125 -0
  134. omnimalloc-0.6.0/tests/unit/allocators/test_supermalloc.py +167 -0
  135. omnimalloc-0.6.0/tests/unit/allocators/test_tabu_search.py +132 -0
  136. omnimalloc-0.6.0/tests/unit/allocators/test_telamalloc.py +150 -0
  137. omnimalloc-0.6.0/tests/unit/allocators/test_vector_time.py +233 -0
  138. omnimalloc-0.6.0/tests/unit/analysis/test_conflicts.py +154 -0
  139. omnimalloc-0.6.0/tests/unit/analysis/test_linearize.py +197 -0
  140. omnimalloc-0.6.0/tests/unit/analysis/test_pressure.py +450 -0
  141. omnimalloc-0.6.0/tests/unit/analysis/test_vector_conflict_properties.py +212 -0
  142. {omnimalloc-0.4.0 → omnimalloc-0.6.0}/tests/unit/benchmark/converters/test_model.py +169 -101
  143. {omnimalloc-0.4.0 → omnimalloc-0.6.0}/tests/unit/benchmark/converters/test_onnx.py +46 -19
  144. {omnimalloc-0.4.0 → omnimalloc-0.6.0}/tests/unit/benchmark/results/test_campaign.py +7 -6
  145. {omnimalloc-0.4.0 → omnimalloc-0.6.0}/tests/unit/benchmark/results/test_export.py +3 -3
  146. {omnimalloc-0.4.0 → omnimalloc-0.6.0}/tests/unit/benchmark/results/test_report.py +7 -7
  147. {omnimalloc-0.4.0 → omnimalloc-0.6.0}/tests/unit/benchmark/results/test_result.py +7 -6
  148. {omnimalloc-0.4.0 → omnimalloc-0.6.0}/tests/unit/benchmark/results/test_visualize.py +26 -2
  149. {omnimalloc-0.4.0 → omnimalloc-0.6.0}/tests/unit/benchmark/sources/test_base.py +22 -10
  150. omnimalloc-0.6.0/tests/unit/benchmark/sources/test_concurrent_tiling.py +147 -0
  151. {omnimalloc-0.4.0 → omnimalloc-0.6.0}/tests/unit/benchmark/sources/test_generator.py +9 -9
  152. {omnimalloc-0.4.0 → omnimalloc-0.6.0}/tests/unit/benchmark/sources/test_huggingface.py +3 -3
  153. {omnimalloc-0.4.0 → omnimalloc-0.6.0}/tests/unit/benchmark/sources/test_minimalloc.py +3 -4
  154. omnimalloc-0.6.0/tests/unit/benchmark/sources/test_pinwheel.py +123 -0
  155. omnimalloc-0.6.0/tests/unit/benchmark/sources/test_sync_patterns.py +119 -0
  156. omnimalloc-0.6.0/tests/unit/benchmark/sources/test_tiling.py +133 -0
  157. omnimalloc-0.6.0/tests/unit/benchmark/test_benchmark.py +144 -0
  158. {omnimalloc-0.4.0 → omnimalloc-0.6.0}/tests/unit/benchmark/test_timer.py +11 -4
  159. omnimalloc-0.6.0/tests/unit/common/test_deadline.py +64 -0
  160. {omnimalloc-0.4.0 → omnimalloc-0.6.0}/tests/unit/common/test_registry.py +80 -15
  161. {omnimalloc-0.4.0 → omnimalloc-0.6.0}/tests/unit/primitives/test_allocation.py +56 -29
  162. omnimalloc-0.6.0/tests/unit/primitives/test_allocation_vector.py +138 -0
  163. omnimalloc-0.6.0/tests/unit/primitives/test_allocationkind.py +37 -0
  164. {omnimalloc-0.4.0 → omnimalloc-0.6.0}/tests/unit/primitives/test_memory.py +29 -88
  165. {omnimalloc-0.4.0 → omnimalloc-0.6.0}/tests/unit/primitives/test_pool.py +26 -24
  166. {omnimalloc-0.4.0 → omnimalloc-0.6.0}/tests/unit/primitives/test_system.py +7 -7
  167. omnimalloc-0.6.0/tests/unit/primitives/test_utils.py +24 -0
  168. {omnimalloc-0.4.0 → omnimalloc-0.6.0}/tests/unit/test_allocate.py +32 -34
  169. omnimalloc-0.6.0/tests/unit/test_io.py +182 -0
  170. {omnimalloc-0.4.0 → omnimalloc-0.6.0}/tests/unit/test_validate.py +79 -83
  171. omnimalloc-0.6.0/tests/unit/test_visualize.py +582 -0
  172. {omnimalloc-0.4.0 → omnimalloc-0.6.0}/uv.lock +24 -1
  173. omnimalloc-0.4.0/README.md +0 -36
  174. omnimalloc-0.4.0/examples/01_basic.py +0 -20
  175. omnimalloc-0.4.0/examples/02_plotting.py +0 -23
  176. omnimalloc-0.4.0/examples/03_allocators.py +0 -39
  177. omnimalloc-0.4.0/examples/04_sources.py +0 -36
  178. omnimalloc-0.4.0/examples/05_benchmark.py +0 -41
  179. omnimalloc-0.4.0/src/cpp/allocators/greedy.cpp +0 -105
  180. omnimalloc-0.4.0/src/cpp/allocators/greedy.hpp +0 -45
  181. omnimalloc-0.4.0/src/cpp/bindings.cpp +0 -92
  182. omnimalloc-0.4.0/src/cpp/primitives/allocation.cpp +0 -95
  183. omnimalloc-0.4.0/src/cpp/primitives/allocation.hpp +0 -75
  184. omnimalloc-0.4.0/src/cpp/primitives/buffer_kind.hpp +0 -46
  185. omnimalloc-0.4.0/src/python/omnimalloc/_cpp.pyi +0 -85
  186. omnimalloc-0.4.0/src/python/omnimalloc/allocate.py +0 -49
  187. omnimalloc-0.4.0/src/python/omnimalloc/allocators/base.py +0 -26
  188. omnimalloc-0.4.0/src/python/omnimalloc/allocators/genetic.py +0 -187
  189. omnimalloc-0.4.0/src/python/omnimalloc/allocators/greedy.py +0 -121
  190. omnimalloc-0.4.0/src/python/omnimalloc/allocators/greedy_cpp.py +0 -80
  191. omnimalloc-0.4.0/src/python/omnimalloc/allocators/hillclimb.py +0 -215
  192. omnimalloc-0.4.0/src/python/omnimalloc/allocators/minimalloc.py +0 -109
  193. omnimalloc-0.4.0/src/python/omnimalloc/allocators/random.py +0 -52
  194. omnimalloc-0.4.0/src/python/omnimalloc/allocators/utils.py +0 -26
  195. omnimalloc-0.4.0/src/python/omnimalloc/benchmark/sources/utils.py +0 -26
  196. omnimalloc-0.4.0/src/python/omnimalloc/common/units.py +0 -18
  197. omnimalloc-0.4.0/src/python/omnimalloc/primitives/allocation.py +0 -11
  198. omnimalloc-0.4.0/src/python/omnimalloc/primitives/utils.py +0 -39
  199. omnimalloc-0.4.0/src/python/omnimalloc/validate.py +0 -96
  200. omnimalloc-0.4.0/src/python/omnimalloc/visualize.py +0 -390
  201. omnimalloc-0.4.0/tests/unit/allocators/test_greedy_cpp.py +0 -345
  202. omnimalloc-0.4.0/tests/unit/allocators/test_naive.py +0 -3
  203. omnimalloc-0.4.0/tests/unit/benchmark/test_benchmark.py +0 -76
  204. omnimalloc-0.4.0/tests/unit/primitives/test_bufferkind.py +0 -199
  205. omnimalloc-0.4.0/tests/unit/primitives/test_utils.py +0 -50
  206. omnimalloc-0.4.0/tests/unit/test_visualize.py +0 -271
  207. {omnimalloc-0.4.0 → omnimalloc-0.6.0}/.clang-format +0 -0
  208. {omnimalloc-0.4.0 → omnimalloc-0.6.0}/.clang-tidy +0 -0
  209. {omnimalloc-0.4.0 → omnimalloc-0.6.0}/.python-version +0 -0
  210. {omnimalloc-0.4.0 → omnimalloc-0.6.0}/LICENSE +0 -0
  211. {omnimalloc-0.4.0 → omnimalloc-0.6.0}/examples/README.md +0 -0
  212. {omnimalloc-0.4.0 → omnimalloc-0.6.0}/src/cpp/primitives/hash_utils.hpp +0 -0
  213. {omnimalloc-0.4.0 → omnimalloc-0.6.0}/src/python/omnimalloc/benchmark/converters/__init__.py +0 -0
  214. {omnimalloc-0.4.0 → omnimalloc-0.6.0}/src/python/omnimalloc/benchmark/results/__init__.py +0 -0
  215. {omnimalloc-0.4.0 → omnimalloc-0.6.0}/src/python/omnimalloc/common/directories.py +0 -0
  216. {omnimalloc-0.4.0 → omnimalloc-0.6.0}/src/python/omnimalloc/primitives/system.py +0 -0
  217. {omnimalloc-0.4.0 → omnimalloc-0.6.0}/src/python/omnimalloc/py.typed +0 -0
  218. {omnimalloc-0.4.0 → omnimalloc-0.6.0}/tests/__init__.py +0 -0
  219. {omnimalloc-0.4.0 → omnimalloc-0.6.0}/tests/integration/__init__.py +0 -0
  220. {omnimalloc-0.4.0 → omnimalloc-0.6.0}/tests/integration/test_notebooks.py +0 -0
  221. {omnimalloc-0.4.0 → omnimalloc-0.6.0}/tests/unit/__init__.py +0 -0
  222. {omnimalloc-0.4.0 → omnimalloc-0.6.0}/tests/unit/allocators/__init__.py +0 -0
  223. {omnimalloc-0.4.0/tests/unit/benchmark → omnimalloc-0.6.0/tests/unit/analysis}/__init__.py +0 -0
  224. {omnimalloc-0.4.0/tests/unit/benchmark/converters → omnimalloc-0.6.0/tests/unit/benchmark}/__init__.py +0 -0
  225. {omnimalloc-0.4.0/tests/unit/benchmark/results → omnimalloc-0.6.0/tests/unit/benchmark/converters}/__init__.py +0 -0
  226. {omnimalloc-0.4.0/tests/unit/benchmark/sources → omnimalloc-0.6.0/tests/unit/benchmark/results}/__init__.py +0 -0
  227. {omnimalloc-0.4.0/tests/unit/common → omnimalloc-0.6.0/tests/unit/benchmark/sources}/__init__.py +0 -0
  228. {omnimalloc-0.4.0/tests/unit/primitives → omnimalloc-0.6.0/tests/unit/common}/__init__.py +0 -0
  229. {omnimalloc-0.4.0 → omnimalloc-0.6.0}/tests/unit/common/test_directories.py +0 -0
  230. /omnimalloc-0.4.0/src/python/omnimalloc/benchmark/utils.py → /omnimalloc-0.6.0/tests/unit/primitives/__init__.py +0 -0
@@ -53,6 +53,10 @@ htmlcov/
53
53
  *.gcov.json.gz
54
54
  **/artifacts/
55
55
 
56
+ # Benchmark script outputs (scripts/*.py --out)
57
+ benchmark_results_*/
58
+ stress_results_*/
59
+
56
60
  # OS
57
61
  .DS_Store
58
62
  Thumbs.db
@@ -6,6 +6,8 @@ repos:
6
6
  rev: v6.0.0
7
7
  hooks:
8
8
  - id: trailing-whitespace
9
+ # matplotlib-generated README figures contain trailing whitespace
10
+ exclude: '^assets/.*\.svg$'
9
11
  - id: end-of-file-fixer
10
12
  - id: mixed-line-ending
11
13
  - id: check-yaml
@@ -1,7 +1,14 @@
1
1
  cmake_minimum_required(VERSION 3.18...3.30)
2
+
3
+ # Version is sourced from setuptools-scm via scikit-build-core (git tags). This
4
+ # fallback only applies for standalone CMake calls, not using the build backend.
5
+ if(NOT DEFINED SKBUILD_PROJECT_VERSION)
6
+ set(SKBUILD_PROJECT_VERSION "0.0.0")
7
+ endif()
8
+
2
9
  project(
3
10
  OmniMalloc
4
- VERSION 0.4.0 # Also update pyproject.toml
11
+ VERSION ${SKBUILD_PROJECT_VERSION}
5
12
  LANGUAGES CXX)
6
13
 
7
14
  set(CMAKE_CXX_STANDARD 20)
@@ -20,16 +27,37 @@ endif()
20
27
 
21
28
  find_package(Python 3.10 REQUIRED COMPONENTS Interpreter Development.Module)
22
29
 
30
+ set(THREADS_PREFER_PTHREAD_FLAG ON)
31
+ find_package(Threads REQUIRED)
32
+
23
33
  execute_process(
24
34
  COMMAND "${Python_EXECUTABLE}" -m nanobind --cmake_dir
25
35
  OUTPUT_STRIP_TRAILING_WHITESPACE
26
36
  OUTPUT_VARIABLE nanobind_ROOT)
27
37
  find_package(nanobind CONFIG REQUIRED)
28
38
 
29
- nanobind_add_module(_cpp NB_STATIC src/cpp/allocators/greedy.cpp
30
- src/cpp/primitives/allocation.cpp src/cpp/bindings.cpp)
39
+ nanobind_add_module(
40
+ _cpp
41
+ NB_STATIC
42
+ NOMINSIZE
43
+ src/cpp/allocators/best_fit.cpp
44
+ src/cpp/allocators/first_fit.cpp
45
+ src/cpp/allocators/local_search.cpp
46
+ src/cpp/allocators/omni.cpp
47
+ src/cpp/allocators/simulated_annealing.cpp
48
+ src/cpp/allocators/supermalloc.cpp
49
+ src/cpp/allocators/tabu_search.cpp
50
+ src/cpp/allocators/telamalloc.cpp
51
+ src/cpp/analysis/antichain.cpp
52
+ src/cpp/analysis/closure.cpp
53
+ src/cpp/analysis/conflicts.cpp
54
+ src/cpp/analysis/linearize.cpp
55
+ src/cpp/analysis/placement.cpp
56
+ src/cpp/primitives/allocation.cpp
57
+ src/cpp/bindings.cpp)
31
58
 
32
59
  target_include_directories(_cpp PRIVATE src/cpp)
60
+ target_link_libraries(_cpp PRIVATE Threads::Threads)
33
61
 
34
62
  if(ENABLE_CLANG_TIDY)
35
63
  set_target_properties(_cpp PROPERTIES CXX_CLANG_TIDY "${CLANG_TIDY_PROGRAM}")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: omnimalloc
3
- Version: 0.4.0
3
+ Version: 0.6.0
4
4
  Summary: Your one-stop shop for static memory allocation.
5
5
  Keywords: memory,allocation,allocator,static-allocation
6
6
  Author-Email: Fabian Peddinghaus <fabianpedd@gmail.com>
@@ -234,19 +234,85 @@ Requires-Dist: onnx>=1.19.0; extra == "all"
234
234
  Requires-Dist: tqdm>=4.66.0; extra == "all"
235
235
  Description-Content-Type: text/markdown
236
236
 
237
- # OmniMalloc
237
+ <h1 align="center">OmniMalloc</h1>
238
238
 
239
- Your one-stop shop for static memory allocation.
239
+ <p align="center">State-of-the-art static memory allocation for neural networks.</p>
240
+
241
+ <p align="center">
242
+ <a href="https://github.com/fpedd/omnimalloc/actions/workflows/checks.yml"><img src="https://img.shields.io/github/actions/workflow/status/fpedd/omnimalloc/checks.yml?branch=main&label=checks" alt="Checks"></a>
243
+ <a href="https://github.com/fpedd/omnimalloc/actions/workflows/build.yml"><img src="https://img.shields.io/github/actions/workflow/status/fpedd/omnimalloc/build.yml?branch=main&label=build" alt="Build"></a>
244
+ <a href="https://pypi.org/project/omnimalloc/"><img src="https://img.shields.io/pypi/v/omnimalloc" alt="PyPI"></a>
245
+ <a href="https://pypi.org/project/omnimalloc/"><img src="https://img.shields.io/pypi/pyversions/omnimalloc" alt="Python versions"></a>
246
+ <a href="https://github.com/fpedd/omnimalloc/blob/main/LICENSE"><img src="https://img.shields.io/pypi/l/omnimalloc" alt="License"></a>
247
+ </p>
248
+
249
+ OmniMalloc is a Python library for static memory allocation: given buffers
250
+ with known sizes and lifetimes, assign offsets so that peak memory is minimized.
251
+ This is the memory-planning step at the heart of ML compilers, embedded
252
+ runtimes, and accelerator toolchains.
253
+
254
+ It ships a collection of allocators and allocation algorithms behind one API,
255
+ implemented with an efficient C++ backend. This includes SuperMalloc, a new
256
+ allocator that outperforms the best open-source alternatives (see benchmarks
257
+ below). OmniMalloc also provides a rich benchmark harness and visualization
258
+ tools to develop and evaluate new allocation strategies.
240
259
 
241
260
  ## Installation
242
261
 
262
+ Install the latest release from PyPI:
263
+
243
264
  ```bash
244
265
  pip install omnimalloc
245
266
  ```
246
267
 
268
+ Or install the development version directly from GitHub:
269
+
270
+ ```bash
271
+ pip install git+https://github.com/fpedd/omnimalloc.git
272
+ ```
273
+
247
274
  ## Usage
248
275
 
249
- Please refer to [examples](examples/), in particular [examples/01_basic.py](examples/01_basic.py).
276
+ ```python
277
+ import omnimalloc as om
278
+
279
+ pool = om.Pool(id="pool", allocations=(
280
+ om.Allocation(id=0, size=64, start=0, end=10),
281
+ om.Allocation(id=1, size=64, start=12, end=20),
282
+ om.Allocation(id=2, size=32, start=5, end=15),
283
+ ))
284
+
285
+ pool = om.allocate(pool, allocator="supermalloc", validate=True)
286
+
287
+ print(pool.size) # 96
288
+ print([alloc.offset for alloc in pool.allocations]) # [0, 0, 64]
289
+ ```
290
+
291
+ On a real problem, the result looks like this: 308 buffers of an ML workload
292
+ packed with no wasted memory.
293
+
294
+ <p align="center">
295
+ <picture>
296
+ <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/fpedd/omnimalloc/main/assets/allocation_dark.svg">
297
+ <img src="https://raw.githubusercontent.com/fpedd/omnimalloc/main/assets/allocation_light.svg" alt="A solved allocation problem rendered as offset/time rectangles">
298
+ </picture>
299
+ </p>
300
+
301
+ See [examples](examples/) for allocator selection, visualization, custom
302
+ allocation sources, and benchmarking.
303
+
304
+ ## Benchmarks
305
+
306
+ <p align="center">
307
+ <picture>
308
+ <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/fpedd/omnimalloc/main/assets/hero_dark.svg">
309
+ <img src="https://raw.githubusercontent.com/fpedd/omnimalloc/main/assets/hero_light.svg" alt="Solution quality vs. solve time across allocators">
310
+ </picture>
311
+ </p>
312
+
313
+ All figures on this page are generated from a deterministic benchmark run by
314
+ [`scripts/generate_readme_assets.py`](scripts/generate_readme_assets.py).
315
+ Run your own campaigns with the [benchmark harness](examples/05_benchmark.py).
250
316
 
251
317
  ## Development
252
318
 
@@ -269,4 +335,4 @@ uv run pre-commit run --all-files
269
335
 
270
336
  ## License
271
337
 
272
- Copyright 2025 Fabian Peddinghaus. Licensed under Apache 2.0 License. See [LICENSE](LICENSE) for details.
338
+ Copyright 2025-2026 Fabian Peddinghaus. Licensed under Apache 2.0 License. See [LICENSE](LICENSE) for details.
@@ -0,0 +1,102 @@
1
+ <h1 align="center">OmniMalloc</h1>
2
+
3
+ <p align="center">State-of-the-art static memory allocation for neural networks.</p>
4
+
5
+ <p align="center">
6
+ <a href="https://github.com/fpedd/omnimalloc/actions/workflows/checks.yml"><img src="https://img.shields.io/github/actions/workflow/status/fpedd/omnimalloc/checks.yml?branch=main&label=checks" alt="Checks"></a>
7
+ <a href="https://github.com/fpedd/omnimalloc/actions/workflows/build.yml"><img src="https://img.shields.io/github/actions/workflow/status/fpedd/omnimalloc/build.yml?branch=main&label=build" alt="Build"></a>
8
+ <a href="https://pypi.org/project/omnimalloc/"><img src="https://img.shields.io/pypi/v/omnimalloc" alt="PyPI"></a>
9
+ <a href="https://pypi.org/project/omnimalloc/"><img src="https://img.shields.io/pypi/pyversions/omnimalloc" alt="Python versions"></a>
10
+ <a href="https://github.com/fpedd/omnimalloc/blob/main/LICENSE"><img src="https://img.shields.io/pypi/l/omnimalloc" alt="License"></a>
11
+ </p>
12
+
13
+ OmniMalloc is a Python library for static memory allocation: given buffers
14
+ with known sizes and lifetimes, assign offsets so that peak memory is minimized.
15
+ This is the memory-planning step at the heart of ML compilers, embedded
16
+ runtimes, and accelerator toolchains.
17
+
18
+ It ships a collection of allocators and allocation algorithms behind one API,
19
+ implemented with an efficient C++ backend. This includes SuperMalloc, a new
20
+ allocator that outperforms the best open-source alternatives (see benchmarks
21
+ below). OmniMalloc also provides a rich benchmark harness and visualization
22
+ tools to develop and evaluate new allocation strategies.
23
+
24
+ ## Installation
25
+
26
+ Install the latest release from PyPI:
27
+
28
+ ```bash
29
+ pip install omnimalloc
30
+ ```
31
+
32
+ Or install the development version directly from GitHub:
33
+
34
+ ```bash
35
+ pip install git+https://github.com/fpedd/omnimalloc.git
36
+ ```
37
+
38
+ ## Usage
39
+
40
+ ```python
41
+ import omnimalloc as om
42
+
43
+ pool = om.Pool(id="pool", allocations=(
44
+ om.Allocation(id=0, size=64, start=0, end=10),
45
+ om.Allocation(id=1, size=64, start=12, end=20),
46
+ om.Allocation(id=2, size=32, start=5, end=15),
47
+ ))
48
+
49
+ pool = om.allocate(pool, allocator="supermalloc", validate=True)
50
+
51
+ print(pool.size) # 96
52
+ print([alloc.offset for alloc in pool.allocations]) # [0, 0, 64]
53
+ ```
54
+
55
+ On a real problem, the result looks like this: 308 buffers of an ML workload
56
+ packed with no wasted memory.
57
+
58
+ <p align="center">
59
+ <picture>
60
+ <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/fpedd/omnimalloc/main/assets/allocation_dark.svg">
61
+ <img src="https://raw.githubusercontent.com/fpedd/omnimalloc/main/assets/allocation_light.svg" alt="A solved allocation problem rendered as offset/time rectangles">
62
+ </picture>
63
+ </p>
64
+
65
+ See [examples](examples/) for allocator selection, visualization, custom
66
+ allocation sources, and benchmarking.
67
+
68
+ ## Benchmarks
69
+
70
+ <p align="center">
71
+ <picture>
72
+ <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/fpedd/omnimalloc/main/assets/hero_dark.svg">
73
+ <img src="https://raw.githubusercontent.com/fpedd/omnimalloc/main/assets/hero_light.svg" alt="Solution quality vs. solve time across allocators">
74
+ </picture>
75
+ </p>
76
+
77
+ All figures on this page are generated from a deterministic benchmark run by
78
+ [`scripts/generate_readme_assets.py`](scripts/generate_readme_assets.py).
79
+ Run your own campaigns with the [benchmark harness](examples/05_benchmark.py).
80
+
81
+ ## Development
82
+
83
+ ```bash
84
+ # Initial setup
85
+ git clone git@github.com:fpedd/omnimalloc.git
86
+ cd omnimalloc
87
+ uv sync --all-extras --group dev
88
+
89
+ # Run tests, linting, type checking
90
+ uv run pytest
91
+ uv run ruff check --fix && uv run ruff format && uv run ty check
92
+
93
+ # Setup pre-commit hooks (run once)
94
+ uv run pre-commit install
95
+
96
+ # Run pre-commit checks manually
97
+ uv run pre-commit run --all-files
98
+ ```
99
+
100
+ ## License
101
+
102
+ Copyright 2025-2026 Fabian Peddinghaus. Licensed under Apache 2.0 License. See [LICENSE](LICENSE) for details.