PyCLBlast: Python wrappers for the tuned OpenCL BLAS library CLBlast
This Python package provides a straightforward wrapper for CLBast based on PyOpenCL. CLBlast is a modern, lightweight, performant and tunable OpenCL BLAS library written in C++11. It is designed to leverage the full performance potential of a wide variety of OpenCL devices from different vendors, including desktop and laptop GPUs, embedded GPUs, and other accelerators. CLBlast implements BLAS routines: basic linear algebra subprograms operating on vectors and matrices.
See the CLBlast repository and the CLBlast website for more information about CLBlast.
Prerequisites
Non-Python requirements:
- OpenCL
- CLBlast
Getting started
After installing OpenCL and CLBlast, simply use pip to install PyCLBlast, e.g.:
pip install --user pyclblast
To start using the library, browse the CLBlast documentation or check out the PyCLBlast samples provided in the samples subfolder.
For developers, install CLBlast and cython (e.g. in a Python3 virtualenv):
pip install Cython
And then compile the bindings from this location using pip:
pip install .
Detecting CLBlast
The CLBlast library should be present and detectable to your system, to successfully install the PyCLBlast bindings. In some systems, this is done automatically. But if the CLBlast library cannot be detected, the PyCLBlast installation will fail. To ensure detection, one can apply either of the following:
-
Add the CLBLast root directory to the environment path.
-
Create the environment variable
CLBLAST_ROOTthat holds the path to the CLBLast root directory. -
Define the
cmakevariablesCMAKE_PREFIX_PATHor theCLBLAST_ROOTvariable that point to the CLBlast root directory, as:pip install . -C skbuild.cmake.args="-DCMAKE_PREFIX_PATH=/root/path/to/clblast" -
Create the environment variable
CLBlast_DIRthat holds the path to the directory where either of theCLBlastConfig.cmakeorclblast-config.cmakefiles reside.
Note that the aforementioned environment variables should be set only during the installation of PyCLBlast and can be unset during normal use.
Testing PyCLBlast
The main exhaustive tests are the main CLBlast test binaries. Apart from that, you can also run the PyCLBlast smoke tests from the test subfolder, e.g. as follows:
python -m unittest discover
How to release a new version on PyPi
Following the guide, in essence doing (after changing the version number in setup.py):
python3 -m build
python3 -m twine upload --repository pypi dist/pyclblast-1.4.0.tar.gz
# use '__token__' as username and supply the token from your PyPi account
Metadata
Release files for pyclblast 1.4.0
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 | |
|---|---|---|---|---|
| pyclblast-1.4.0.tar.gz | 1.2 MB | Without provenance | Details |
Release files / pyclblast-1.4.0.tar.gz
| Download URL | pyclblast-1.4.0.tar.gz |
|---|---|
| Size | 1.2 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1763d699b2dbe6fbde83c041d272cb5811a12def79d2b7a28d38e3706ef98463
|
|
BLAKE2b-256 checksum How to use checksums |
39f84ba993bb0dbe9f0041386bc716a4e8dd4711ea765294d24945593a556da9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/51.3.3 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.3
|
Security for pyclblast 1.4.0
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A 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.