Welcome to gplearn-CUDA!
gplearn-CUDA implements GPU-accelerated Genetic Programming in Python, with a scikit-learn inspired and compatible API.
This project is a high-performance extension of the original gplearn library developed by Trevor Stephens. It maintains all the original functionality while introducing massive parallelization via NVIDIA CUDA.
Overview
While Genetic Programming (GP) can be used to perform a very wide variety of tasks, gplearn-CUDA focuses on three scikit-learn style estimators: symbolic regression, binary classification, and symbolic feature generation.
These map directly to SymbolicRegressor, SymbolicClassifier, and SymbolicTransformer.
CUDA Acceleration
The core contribution of gplearn-CUDA is high-performance GPU acceleration via NVIDIA CUDA. By setting device='cuda', the library utilizes a custom virtual machine interpreter on the GPU to achieve 2x–4x speedups on massive datasets and large populations.
from gplearn.genetic import SymbolicRegressor
# Enable CUDA acceleration
est = SymbolicRegressor(device='cuda', population_size=5000)
est.fit(X, y)
Installation
gplearn-CUDA requires a recent version of scikit-learn. The CUDA acceleration is compatible with CUDA 11.2 through 13.x.
Plain pip install gplearn-CUDA remains CPU-only. To install the GPU-enabled version via pip, use one of the CUDA extras:
pip install "gplearn-CUDA[cuda13]"
The cuda extra is kept as a convenience alias for cuda13:
pip install "gplearn-CUDA[cuda]"
For other CUDA versions or Conda installation, please see the Installation Guide.
Python Compatibility
gplearn-CUDA currently requires Python 3.11 or newer because its core dependency scikit-learn>=1.8.0 requires that Python range.
Verified in this repository on Windows:
CPU path: Python 3.11, 3.12, 3.13, and 3.14
CUDA path: Python 3.12 and 3.14
On some Windows Python 3.14 environments, CuPy can import and JIT kernels successfully while optional BLAS backends such as cuBLAS still fail to load. When that happens, SymbolicTransformer(device='cuda') now falls back to a NumPy-based correlation step for hall-of-fame selection and emits a warning instead of aborting the fit.
License & Credits
gplearn-CUDA is released under the BSD 3-Clause License, following the licensing of the original project.
Original Author: Trevor Stephens (@trevorstephens)
CUDA Extension: LGA-Personal
For the latest development version, first get the source from github:
git clone https://github.com/LGA-Personal/gplearn-CUDA.git
Then navigate into the local directory and simply run:
pip install .
If you come across any issues in running or installing the package, please submit a bug report.
Metadata
Release files for gplearn-CUDA 0.4.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| gplearn_cuda-0.4.6.tar.gz | 2.2 MB | With provenance | Details for gplearn_cuda-0.4.6.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| gplearn_cuda-0.4.6-py3-none-any.whl | Python 3 | none | any | Details for gplearn_cuda-0.4.6-py3-none-any.whl |
Total release size: 2.3 MB
Release files / gplearn_cuda-0.4.6.tar.gz
| Download URL | gplearn_cuda-0.4.6.tar.gz |
|---|---|
| Size | 2.2 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b7d0555f32010f7ba59140b38a6871528c2a007a59522aee98810d62a907e8b8
|
|
BLAKE2b-256 checksum How to use checksums |
a5557980daa0e53695ee29dc793056f79613fcce28ae818d418a09e26a57a1bd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 6, 2026.
Transparency logRelease files / gplearn_cuda-0.4.6-py3-none-any.whl
| Download URL | gplearn_cuda-0.4.6-py3-none-any.whl |
|---|---|
| Size | 56.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6459ad3a02f0bae90781306db3cafb3e25a6d2589480e35bd873c5ff5fcafc8b
|
|
BLAKE2b-256 checksum How to use checksums |
230209d005dad56ed354a19eabfbef59b50eec06234104504da3fd818cd35693
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 6, 2026.
Transparency logSecurity for gplearn-CUDA 0.4.6
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for gplearn_cuda-0.4.6.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 6, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.