pyclblast


Namepyclblast JSON
Version 1.4.0 PyPI version JSON
download
home_page
SummaryPython bindings for CLBlast, the tuned OpenCL BLAS library
upload_time2024-02-27 19:01:41
maintainer
docs_urlNone
author
requires_python
licenseApache Software License
keywords opencl blas clblast gemm matrix-multiplication
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
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](https://github.com/CNugteren/CLBlast) and [the CLBlast website](https://cnugteren.github.io/clblast) for more information about CLBlast.


Prerequisites
-------------

Non-Python requirements:

* OpenCL
* [CLBlast](https://github.com/CNugteren/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](https://github.com/CNugteren/CLBlast) documentation or check out the PyCLBlast samples provided in the `samples` subfolder.

For developers, install CLBlast and [cython](https://cython.org/) (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_ROOT` that holds the path to the CLBLast root directory.
* Define the `cmake` variables `CMAKE_PREFIX_PATH` or the `CLBLAST_ROOT` variable 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_DIR` that holds the path to the directory where either of the `CLBlastConfig.cmake` or `clblast-config.cmake` files 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](https://packaging.python.org/tutorials/packaging-projects/), 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

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "pyclblast",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "OpenCL BLAS CLBlast GEMM matrix-multiplication",
    "author": "",
    "author_email": "Cedric Nugteren <web@cedricnugteren.nl>",
    "download_url": "https://files.pythonhosted.org/packages/39/f8/4ba993bb0dbe9f0041386bc716a4e8dd4711ea765294d24945593a556da9/pyclblast-1.4.0.tar.gz",
    "platform": null,
    "description": "\nPyCLBlast: Python wrappers for the tuned OpenCL BLAS library CLBlast\n================\n\nThis 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.\n\nSee [the CLBlast repository](https://github.com/CNugteren/CLBlast) and [the CLBlast website](https://cnugteren.github.io/clblast) for more information about CLBlast.\n\n\nPrerequisites\n-------------\n\nNon-Python requirements:\n\n* OpenCL\n* [CLBlast](https://github.com/CNugteren/CLBlast)\n\n\nGetting started\n-------------\n\nAfter installing OpenCL and CLBlast, simply use pip to install PyCLBlast, e.g.:\n\n    pip install --user pyclblast\n\nTo start using the library, browse the [CLBlast](https://github.com/CNugteren/CLBlast) documentation or check out the PyCLBlast samples provided in the `samples` subfolder.\n\nFor developers, install CLBlast and [cython](https://cython.org/) (e.g. in a Python3 virtualenv):\n\n    pip install Cython\n\nAnd then compile the bindings from this location using pip:\n\n    pip install .\n\n\nDetecting CLBlast\n-------------\n\nThe 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:\n\n* Add the CLBLast root directory to the environment path.\n* Create the environment variable `CLBLAST_ROOT` that holds the path to the CLBLast root directory.\n* Define the `cmake` variables `CMAKE_PREFIX_PATH` or the `CLBLAST_ROOT` variable that point to the CLBlast root directory, as: \n\n        pip install . -C skbuild.cmake.args=\"-DCMAKE_PREFIX_PATH=/root/path/to/clblast\"\n\n* Create the environment variable `CLBlast_DIR` that holds the path to the directory where either of the `CLBlastConfig.cmake` or `clblast-config.cmake` files reside.\n\nNote that the aforementioned environment variables should be set only during the installation of PyCLBlast and can be unset during normal use.\n\n\nTesting PyCLBlast\n-------------\n\nThe 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:\n\n    python -m unittest discover\n\n\nHow to release a new version on PyPi\n-------------\n\nFollowing [the guide](https://packaging.python.org/tutorials/packaging-projects/), in essence doing (after changing the version number in `setup.py`):\n\n    python3 -m build\n    python3 -m twine upload --repository pypi dist/pyclblast-1.4.0.tar.gz\n    # use '__token__' as username and supply the token from your PyPi account\n",
    "bugtrack_url": null,
    "license": "Apache Software License",
    "summary": "Python bindings for CLBlast, the tuned OpenCL BLAS library",
    "version": "1.4.0",
    "project_urls": {
        "Homepage": "https://github.com/CNugteren/CLBlast/blob/master/src/pyclblast"
    },
    "split_keywords": [
        "opencl",
        "blas",
        "clblast",
        "gemm",
        "matrix-multiplication"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "39f84ba993bb0dbe9f0041386bc716a4e8dd4711ea765294d24945593a556da9",
                "md5": "6834d5dd38948ecafb24e00f22ede05f",
                "sha256": "1763d699b2dbe6fbde83c041d272cb5811a12def79d2b7a28d38e3706ef98463"
            },
            "downloads": -1,
            "filename": "pyclblast-1.4.0.tar.gz",
            "has_sig": false,
            "md5_digest": "6834d5dd38948ecafb24e00f22ede05f",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 1163606,
            "upload_time": "2024-02-27T19:01:41",
            "upload_time_iso_8601": "2024-02-27T19:01:41.674194Z",
            "url": "https://files.pythonhosted.org/packages/39/f8/4ba993bb0dbe9f0041386bc716a4e8dd4711ea765294d24945593a556da9/pyclblast-1.4.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-02-27 19:01:41",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "CNugteren",
    "github_project": "CLBlast",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "appveyor": true,
    "lcname": "pyclblast"
}
        
Elapsed time: 0.20946s