Skip to content

Commit ce31887

Browse files
committed
Add multi-tier slab allocator for ROCm backend
Replace SmallSizePool with a generalized SlabAllocator containing 18 power-of-2 size class pools (8B through 1MB). Each pool pre-allocates slab pages and sub-allocates via O(1) free-list operations, eliminating hipExtMallocWithFlags calls for small/medium allocations during decode. - SizeClassPool: configurable block size, grow-on-demand slab pages - SlabAllocator: O(1) size-class dispatch via bit ops - Pre-allocates tiers 0-11 (8B-16KB) at startup (~5.8MB) - Applies hipMemAdvise/hipMemPrefetchAsync on slab pages - BufferCache still handles >1MB allocations
1 parent 251c8d8 commit ce31887

2 files changed

Lines changed: 336 additions & 135 deletions

File tree

0 commit comments

Comments
 (0)