PyCL-GPU is a streamlined, Python-based framework for General-Purpose computing on Graphics Processing Units (GPGPU). It abstracts away the boilerplate of PyOpenCL, providing a clean, modular API for numerical and image processing tasks.
- Clean API: Manage GPU contexts, buffers, and kernels with minimal code.
- AMP Integrated: Includes the Adaptive Multiprocessing Pool (AMP) to orchestrate parallel GPU tasks across all available CPU cores.
- Speedmaxxing Methodology: High-velocity optimizations including FP16 vectorization, Memory Grip alignment, and Radix Reordering.
- Intelligent Routing: A* PCIe Data Routing to avoid hardware bus congestion.
- Cross-Platform: Works with any OpenCL-compliant hardware (NVIDIA, AMD, Intel).
The methodology and performance results of this framework are documented in the paper:
"Speedmaxxing: Direct Hardware Access and Optimization for GPGPU using PyCL-GPU" (Included as paper.pdf).
framework/: The core library (Context, Buffer, Program, Task management).amp/: Adaptive Multiprocessing Pool implementation.kernels/: OpenCL C kernel source files.main_dpj.py: Dot-Product Join + Radix Reordering demo.main_astar.py: A* PCIe Routing visualization demo.main_neural.py: Latency Predictor neural-driven scaling demo.main.py: General ensemble example using AMP.
- Install core dependencies:
pip install -r requirements.txt
- The
amplibrary is now bundled directly in thePyCL-GPU-mainfolder. No separate installation is required.
from framework.task import GeneralTask
# See main_simple.py for full contextfrom framework.task import MultiParallelTask
# Uses all CPU cores to feed the GPUPolyform Non-Commercial License 1.0.0. "Personal use, teaching, and research are allowed. For-profit business use requires a separate license."