Port Hornet's binning block memory allocator to cuGraph#5555
Merged
Conversation
Contributor
Author
|
/ok to test c1d7e35 |
ChuckHastings
approved these changes
Jun 10, 2026
Contributor
Author
|
/ok to test 46aa306 |
Contributor
Author
|
/ok to test 8e0e92f |
Collaborator
|
/merge |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR ports Hornet’s dynamic graph memory allocator into cuGraph under cugraph/cpp/include/cugraph/dynamic/memory_manager. This is a first task to support vertex/edge insertions/deletions in cuGraph.
The allocator has three layers:
bit_tree_t— Host-side Vec-Tree bitmap (from Hornet). Tracks which fixed-size blocks are free inside one block array. insert() returns a block index; remove(block_index) frees it back.block_array_t— One GPU buffer (rmm::device_uvector for arithmetic types or cugraph::dataframe_buffer_t for cuda::std::tuple of arithmetic types) plus a bit_tree_t. The buffer holds the actual data; the bit tree hands out fixed-size blocks within it. insert()/remove() allocate and free blocks.block_array_manager_t— Maintain separate block array pools based on the requested block size. Block size in different pools are power of 2 numbers (2^0, 2^1, 2^2, ... ). Given a requested block size, it finds a non-full block array in the matching pool or creates a new one. insert() returns block_access_data_t (block_array_key, block_index, num_elements_per_block); remove() uses that handle to free the block.