How mintii13/a_new_construction_method_for_bptree_with_gpgpu works
Project Type and Purpose
• This is a GPU-accelerated B⁺-tree construction toolkit/research prototype.
• It includes four construction methods: two CPU (top-down, bottom-up), one previous GPU, and one novel fully parallel GPU method.
• It is an open-source experimental tool, written in Python, leveraging CuPy and Numba/CUDA kernels.
File Structure
• Top-level directories:
• DataSet/ : raw input data
• Source/ : Python scripts implementing each algorithm
• In Source/:
• TopDownCPU.py
• BottomUpCPU.py
• PreviousGPU.py
• ProposedMethod.py
• No separate “frontend” or “backend” – this is a computational pipeline.
README for Architecture Insights
• Four methods are executed by separate scripts.
• The novel GPU method consists of two CUDA kernels:
a) Parallel 3D tree-array construction
b) Parallel 3D→2D conversion
• Dependencies: cupy, numpy, numba, Python standard libs.
Main Components
a. Data Sources
• Raw datasets (e.g., DataSet/DataSet.txt)
• External Google Drive link (for larger/multiple datasets)
b. Experiment Orchestrator
• Python “driver” scripts in Source/
• Loads input, chooses algorithm, records timings, writes CSV
c. CPU-based Modules
• TopDownCPU module
• BottomUpCPU module
• Each: sequential B⁺-tree insertion routines
d. GPU-based Modules
• PreviousGPU module: level-by-level parallelism
• ProposedMethod module:
• Kernel A: 3D tree construction
• Kernel B: 3D→2D conversion
• Underlying libraries: CuPy (for array ops), Numba/CUDA
e. Hardware Resources
• CPU (AMD Ryzen)
• GPU (NVIDIA RTX series)
f. Results & Visualization
• CSV or tables of timings
• Static images (flowcharts, tables) in Images/
• Potential plotting scripts
Relationships & Data Flows
• Input DataSet → Experiment Orchestrator (script)
• Orchestrator → (via Python)
• CPU module → build tree → return time
• GPU module → cupy array sort → kernel A → kernel B → return time
• Orchestrator → outputs CSV → plot generator → Images
Architectural Patterns & Design Principles
• Pipeline pattern: Data ingestion → Algorithm selection → Processing → Result collection
• Modular separation: each algorithm in its own module
• Data-parallel design inside GPU kernels
• Clear dependency layering:
• Top layer: Python scripts
• Middle layer: algorithm implementations (pure Python vs. CUDA kernels)
• Bottom layer: hardware (CPU cores, GPU cores)
Essential Elements to Capture
• Data ingestion path (DataSet → script)
• Four algorithmic branches (Top-Down CPU, Bottom-Up CPU, Previous GPU, Proposed GPU)
• Internal GPU pipeline (Sort → Kernel A → Kernel B)
• Time measurement & result export
• External dependencies (CuPy, Numba, CUDA Toolkit)
– Clearly separates CPU vs. GPU workflows
– Shows data flow from raw input to final performance charts
– Captures the two-kernel design of the proposed method
– Highlights the modular, research-tool nature of the codebase