{"id":28720111,"url":"https://github.com/owensgroup/mvgpubtree","last_synced_at":"2025-06-15T06:06:57.641Z","repository":{"id":40737384,"uuid":"461804064","full_name":"owensgroup/MVGpuBTree","owner":"owensgroup","description":"GPU B-Tree with support for versioning (snapshots).","archived":false,"fork":false,"pushed_at":"2023-02-26T07:24:30.000Z","size":4343,"stargazers_count":13,"open_issues_count":1,"forks_count":0,"subscribers_count":17,"default_branch":"main","last_synced_at":"2023-02-26T23:22:38.985Z","etag":null,"topics":["b-tree","concurrent","cuda","gpu","snapshot","versioning"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/owensgroup.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-02-21T10:09:25.000Z","updated_at":"2023-02-26T10:16:48.000Z","dependencies_parsed_at":"2024-10-25T12:42:20.573Z","dependency_job_id":"8805aa4a-9fb4-42c6-82e5-49e08acc7281","html_url":"https://github.com/owensgroup/MVGpuBTree","commit_stats":null,"previous_names":[],"tags_count":1,"template":null,"template_full_name":null,"purl":"pkg:github/owensgroup/MVGpuBTree","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/owensgroup%2FMVGpuBTree","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/owensgroup%2FMVGpuBTree/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/owensgroup%2FMVGpuBTree/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/owensgroup%2FMVGpuBTree/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/owensgroup","download_url":"https://codeload.github.com/owensgroup/MVGpuBTree/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/owensgroup%2FMVGpuBTree/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259929998,"owners_count":22933537,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["b-tree","concurrent","cuda","gpu","snapshot","versioning"],"created_at":"2025-06-15T06:06:56.961Z","updated_at":"2025-06-15T06:06:57.609Z","avatar_url":"https://github.com/owensgroup.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# [Fully Concurrent GPU Multiversion B-Tree](https://dl.acm.org/doi/10.1145/3559009.3569681)\n\n\n\u003ctable\u003e\u003ctr\u003e\n\u003cth\u003e\u003cb\u003e\u003ca href=\"https://github.com/owensgroup/MVGpuBTree/tree/main/test\"\u003eExamples/Tests\u003c/a\u003e\u003c/b\u003e\u003c/th\u003e\n\u003cth\u003e\u003cb\u003e\u003ca href=\"https://github.com/owensgroup/MVGpuBTree/tree/main/benchmarks\"\u003eBenchmarks\u003c/a\u003e\u003c/b\u003e\u003c/th\u003e\n\u003cth\u003e\u003cb\u003e\u003ca href=\"apis.md\"\u003eAPIs\u003c/a\u003e\u003c/b\u003e\u003c/th\u003e\n\u003cth\u003e\u003cb\u003e\u003ca href=\"reproduce.md\"\u003eReproduce\u003c/a\u003e\u003c/b\u003e\u003c/th\u003e\n\u003c/tr\u003e\u003c/table\u003e\n\n\n![Multiversion B-Tree](/docs/vbtree-nobg.png)\n\n\nA fully concurrent GPU B-Tree that supports versioning (snapshots) and linearizable multipoint queries. Using our data structure and the tools we provide, you can launch one (or more) kernels where inside each kernel, you concurrently perform queries (e.g., point or range queries) and mutations (e.g., insert or update).\n\n\nFor more information, please check our PACT 2022 paper:\n\n[**A GPU Multiversion B-Tree**](https://dl.acm.org/doi/10.1145/3559009.3569681)\u003cbr\u003e\n*[Muhammad A. Awad](https://maawad.github.io/), [Serban D. Porumbescu](https://web.cs.ucdavis.edu/~porumbes/), and [John D. Owens](https://www.ece.ucdavis.edu/~jowens/)*\n\nThe repository also contains:\n1. [An implementation of our epoch-based memory reclamation strategy](https://github.com/owensgroup/MVGpuBTree/blob/main/include/memory_reclaimer.hpp)\n2. [SlabAlloc memory allocator redesigned to allow building more complex allocators via composition](https://github.com/owensgroup/MVGpuBTree/blob/main/include/slab_alloc.hpp)\n3. [Improved implementation of our B-Tree (reference B-Tree that doesn't support snapshots)](https://github.com/owensgroup/MVGpuBTree/blob/main/include/gpu_blink_tree.hpp)[^1].\n\n### Our vision\n\nGPU data structures such as the multiversion GPU B-Tree and other data structures we developed[^1][^2] should facilitate using them in the following concise and elegant manner:\n\n```c++\n#include\u003cgpu_versioned_blink_tree.hpp\u003e\n#include\u003cthrust/device_vector.hpp\u003e\n#include\u003cthrust/for_each.hpp\u003e\n\nint main(){\n\n using key_t = uint32_t; using value_t = uint32_t;\n using tree_t = GpuBTree::gpu_versioned_blink_tree\u003ckey_t, value_t\u003e;\n \n tree_t vtree(....); // call the data structure constructor \n thrust::device_vector\u003ckey_t\u003e keys(....); // initialize keys\n \n // solve a problem and do concurrent operations in a fully concurrent manner\n thrust::for_each(keys.begin(), keys.end(), [vtree](auto key){ \n  // perform operations in a tile-synchronous way\n  auto block = cooperative_groups::this_thread_block();\n  auto tile = cooperative_groups::tiled_partition\u003ctree_t::branching_factor\u003e(block);\n  // ... problem-specific code\n  auto value = ...;\n  vtree.cooperative_insert(key, value, tile, ...); // insert\n  // ... maybe more problem-specific application code\n  auto snapshot_id = vtree.take_snapshot(); // take snapshot\n  // ... maybe even more problem-specific code\n  auto found_value = vtree.cooperative_find(key, tile, snapshot_id, ...); // query\n  // ... maybe even more problem-specific code\n });\n}\n```\n\nThe previous example illustrates our vision for using GPU data structures. To a large extent, we can do most of these operations using current CUDA/C++ abstractions and compilers; however, some of the APIs, such as memory allocators and reclaimers (especially on-device ones), still lack adequate support and standardization. BGHT[^2] provides the same device-side APIs and will require almost zero modifications to run the example snippet above.\n\n\n\n## Requirements and limitations\nPlease create an issue if you face challenges with any of the following limitations and requirements.\n### Requirements\n* C++17/CUDA C++17\n* NVIDIA Volta GPU or later microarchitectures\n* CMake 3.18 or later\n* CUDA 12.0 or later\n* GPU with 20 GiBs or higher to run the benchmarks\n\n### Limitations\n* Keys and values must have a type of unsigned 32-bit\n* Snapshot are limited to a maximum of 2^32 - 1 (can be extended to 2^64-1 easily)\n\n## Reproducing the paper results\nTo reproduce the results, follow the following [steps](reproduce.md). Our [PACT 2022 paper](https://dl.acm.org/doi/10.1145/3559009.3569681) was awarded the [Results Reproduced v1.1](https://www.acm.org/publications/policies/artifact-review-and-badging-current) badge. If you find any mismatch (either faster or slower) between the results in the paper, please create an issue, and we will investigate the performance changes.\n\n## Questions and bug report\nPlease create an issue. We will welcome any contributions that improve the usability and quality of our repository.\n\n## BibTeX\n\nThe code in this repository is based on our Multiversion GPU B-Tree and GPU B-Tree publications:\n\n```bibtex\n@InProceedings{   Awad:2022:AGM,\n  author        = {Muhammad A. Awad and Serban D. Porumbescu and John D.\n                  Owens},\n  title         = {A {GPU} Multiversion {B}-Tree},\n  booktitle     = {Proceedings of the International Conference on Parallel\n                  Architectures and Compilation Techniques},\n  series        = {PACT 2022},\n  year          = 2022,\n  month         = oct,\n  code          = {https://github.com/owensgroup/MVGpuBTree},\n  doi           = {10.1145/3559009.3569681},\n  url           = {https://escholarship.org/uc/item/4mz5t5b7},\n  ucdcite       = {a146}\n}\n```\n```bibtex\n@InProceedings{   Awad:2019:EAH,\n  author        = {Muhammad A. Awad and Saman Ashkiani and Rob Johnson and\n                  Mart\\'{\\i}n Farach-Colton and John D. Owens},\n  title         = {Engineering a High-Performance {GPU} {B}-Tree},\n  booktitle     = {Proceedings of the 24th ACM SIGPLAN Symposium on\n                  Principles and Practice of Parallel Programming},\n  series        = {PPoPP 2019},\n  year          = 2019,\n  month         = feb,\n  pages         = {145--157},\n  acceptance    = {29 of 152 submissions, 19.1\\%},\n  doi           = {10.1145/3293883.3295706},\n  acmauthorize  = {https://dl.acm.org/doi/10.1145/3293883.3295706?cid=81100458295},\n  url           = {https://escholarship.org/uc/item/1ph2x5td},\n  code          = {https://github.com/owensgroup/GpuBTree},\n  ucdcite       = {a127}\n}\n```\n\n[^1]: [Awad et al., Engineering a high-performance GPU B-Tree](https://escholarship.org/uc/item/1ph2x5td), https://github.com/owensgroup/GpuBTree\n[^2]: [Awad et al., Analyzing and Implementing GPU Hash Tables](https://escholarship.org/uc/item/6cb1q6rz), https://github.com/owensgroup/BGHT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fowensgroup%2Fmvgpubtree","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fowensgroup%2Fmvgpubtree","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fowensgroup%2Fmvgpubtree/lists"}