arrayfire-binary-python-wrapper


Namearrayfire-binary-python-wrapper JSON
Version 0.8.0 PyPI version JSON
download
home_pageNone
SummaryArrayFire Python Wrapper
upload_time2025-10-10 02:53:16
maintainerNone
docs_urlNone
authorNone
requires_python>=3.10
licenseBSD 3-Clause License Copyright (c) 2023, ArrayFire Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
keywords arrayfire c python wrapper parallel computing gpu cpu opencl oneapi
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # arrayfire-binary-python-wrapper

<p align="center"><a href="http://arrayfire.com/"><img src="http://arrayfire.com/logos/arrayfire_logo_whitebkgnd.png" width="800"></a></p>

[ArrayFire](https://github.com/arrayfire/arrayfire) is a high performance library for parallel computing with an easy-to-use API. It enables users to write scientific computing code that is portable across CUDA, OpenCL and CPU devices.  

This project is a **work in progress**. This is meant to provide direct Python access for the ArrayFire C library by only wrapping the calls to the C/C++ ArrayFire Library. 
This allows the building of large binary wheels only when the underlying ArrayFire version is increased, and the [interface Python library `arrayfire-py`](https://github.com/arrayfire/arrayfire-py) can be developed independently. The package is **not intended** to be used directly and merely exposes the 
C functionality required by [`arrayfire-py`](https://github.com/arrayfire/arrayfire-py). This package can exist in two forms, with a bundled binary distribution, or merely as a loader that will load the ArrayFire library from a system or user level install.

# Project Details

The ArrayFire Python Project is separated into 3 different parts:
```
arrayfire-py -> arrayfire-binary-python-wrapper -> ArrayFire C Libraries
```
This means that arrayfire with python each of these parts is needed:
- [`arrayfire-py`](https://github.com/arrayfire/arrayfire-py) is the ***intended User Interface*** that provides a numpy-like layer to execute math and array operations with ArrayFire.
- [`arrayfire-binary-python-wrapper`](https://github.com/arrayfire/arrayfire-binary-python-wrapper) is the thin `binary` wrapper that provides rough direct access to the functions in the C library. Its purpose is to do the handling of finding the C libraries and handling the communication between Python and C datatypes. This package can exist in two forms, with a bundled binary distribution, or merely as a loader that will load the ArrayFire library from a system or user level install.
- [`ArrayFire C Libraries`](https://github.com/arrayfire/arrayfire) are the binaries obtained from compiling the [ArrayFire C/C++ Project](https://github.com/arrayfire/arrayfire)

# Installing

The arrayfire-binary-python-wrapper can be installed from a variety of sources. [Pre-built wheels](https://repo.arrayfire.com/python/wheels/3.10.0/) are available for a number of systems and toolkits. These will include a binary distribution of the ArrayFire libraries. Installing from PyPI directly will only include a wrapper-only, source distribution that will not contain binaries. In this case, wrapper-only installations will require a separate installation of the ArrayFire C/C++ libraries.
You can get the ArrayFire C/C++ library from the following sources:

- [Download and install binaries](https://arrayfire.com/download)
- [Build and install from source](https://github.com/arrayfire/arrayfire)


**Install the last stable version of the binary python wrapper:**
```sh
# install binary wrapper from PyPI without binaries
# assumes ArrayFire binaries will be installed on the system in some other manner
pip install arrayfire_binary_python_wrapper 
```

**Install a pre-built wheel:**
```sh
# install binary wrapper with the 3.10 ArrayFire binaries pre-built and included
pip install arrayfire-binary-python-wrapper -f https://repo.arrayfire.com/python/wheels/3.10.0/
```

# Building
The arrayfire-binary-python-wrapper can build wheels in packaged-binary or in system-wrapper modes.
[scikit-build-core](https://github.com/scikit-build/scikit-build-core) is used to provide the python build backend.
The minimal, wrapper-only mode that relies on a system install will be built by default though the regular python build process. For example:
```
python -m pip install -r dev-requirements.txt
python -m build --wheel
```
Building a full pre-packaged local binary is an involved process that will require referencing the regular ArrayFire [build](https://github.com/arrayfire/arrayfire/wiki/Build-Instructions-for-Linux) [procedures](https://github.com/arrayfire/arrayfire/wiki/Build-Instructions-for-Windows).

Besides the regular ArrayFire CMake configuration, building the binaries is an opt-in process that is set by an environment variable `AF_BUILD_LOCAL_LIBS=1`. Once that environment variable is set, scikit-build-core will take care of cloning ArrayFire, building, and including the necessary binaries. You may require specifying certain locations of external packages using `CMAKE_ARGS` to pass them to cmake. We recommend looking at our [docker build](https://github.com/arrayfire/arrayfire-docker/blob/afwheel310/arrayfire/scripts/build_wheel.sh) procedure to build this wheel if you wish to replicate it yourself.


# Contributing

The community of ArrayFire developers invites you to build with us if you are
interested and able to write top-performing tensor functions. Together we can
fulfill [The ArrayFire
Mission](https://github.com/arrayfire/arrayfire/wiki/The-ArrayFire-Mission-Statement)
for fast scientific computing for all.

Contributions of any kind are welcome! Please refer to [the
wiki](https://github.com/arrayfire/arrayfire/wiki) and our [Code of
Conduct](33) to learn more about how you can get involved with the ArrayFire
Community through
[Sponsorship](https://github.com/arrayfire/arrayfire/wiki/Sponsorship),
[Developer
Commits](https://github.com/arrayfire/arrayfire/wiki/Contributing-Code-to-ArrayFire),
or [Governance](https://github.com/arrayfire/arrayfire/wiki/Governance).

# Citations and Acknowledgements

If you redistribute ArrayFire, please follow the terms established in [the
license](LICENSE).

ArrayFire development is funded by AccelerEyes LLC and several third parties,
please see the list of [acknowledgements](ACKNOWLEDGEMENTS.md) for an
expression of our gratitude.

# Support and Contact Info

* [Slack Chat](https://join.slack.com/t/arrayfire-org/shared_invite/MjI4MjIzMDMzMTczLTE1MDI5ODg4NzYtN2QwNGE3ODA5OQ)
* [Google Groups](https://groups.google.com/forum/#!forum/arrayfire-users)
* ArrayFire Services:  [Consulting](http://arrayfire.com/consulting)  |  [Support](http://arrayfire.com/download)   |  [Training](http://arrayfire.com/training)

# Trademark Policy

The literal mark "ArrayFire" and ArrayFire logos are trademarks of AccelerEyes
LLC (dba ArrayFire). If you wish to use either of these marks in your own
project, please consult [ArrayFire's Trademark
Policy](http://arrayfire.com/trademark-policy/)

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "arrayfire-binary-python-wrapper",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": "ArrayFire <technical@arrayfire.com>",
    "keywords": "arrayfire, c, python, wrapper, parallel computing, gpu, cpu, opencl, oneapi",
    "author": null,
    "author_email": "ArrayFire <technical@arrayfire.com>, Anton Chernyatevich <chernyatevich.a@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/af/68/cfbfb195bbdb216d300951a4f24fd21a9bdfa317a8acaee05f03f5eb9087/arrayfire_binary_python_wrapper-0.8.0.tar.gz",
    "platform": null,
    "description": "# arrayfire-binary-python-wrapper\n\n<p align=\"center\"><a href=\"http://arrayfire.com/\"><img src=\"http://arrayfire.com/logos/arrayfire_logo_whitebkgnd.png\" width=\"800\"></a></p>\n\n[ArrayFire](https://github.com/arrayfire/arrayfire) is a high performance library for parallel computing with an easy-to-use API. It enables users to write scientific computing code that is portable across CUDA, OpenCL and CPU devices.  \n\nThis project is a **work in progress**. This is meant to provide direct Python access for the ArrayFire C library by only wrapping the calls to the C/C++ ArrayFire Library. \nThis allows the building of large binary wheels only when the underlying ArrayFire version is increased, and the [interface Python library `arrayfire-py`](https://github.com/arrayfire/arrayfire-py) can be developed independently. The package is **not intended** to be used directly and merely exposes the \nC functionality required by [`arrayfire-py`](https://github.com/arrayfire/arrayfire-py). This package can exist in two forms, with a bundled binary distribution, or merely as a loader that will load the ArrayFire library from a system or user level install.\n\n# Project Details\n\nThe ArrayFire Python Project is separated into 3 different parts:\n```\narrayfire-py -> arrayfire-binary-python-wrapper -> ArrayFire C Libraries\n```\nThis means that arrayfire with python each of these parts is needed:\n- [`arrayfire-py`](https://github.com/arrayfire/arrayfire-py) is the ***intended User Interface*** that provides a numpy-like layer to execute math and array operations with ArrayFire.\n- [`arrayfire-binary-python-wrapper`](https://github.com/arrayfire/arrayfire-binary-python-wrapper) is the thin `binary` wrapper that provides rough direct access to the functions in the C library. Its purpose is to do the handling of finding the C libraries and handling the communication between Python and C datatypes. This package can exist in two forms, with a bundled binary distribution, or merely as a loader that will load the ArrayFire library from a system or user level install.\n- [`ArrayFire C Libraries`](https://github.com/arrayfire/arrayfire) are the binaries obtained from compiling the [ArrayFire C/C++ Project](https://github.com/arrayfire/arrayfire)\n\n# Installing\n\nThe arrayfire-binary-python-wrapper can be installed from a variety of sources. [Pre-built wheels](https://repo.arrayfire.com/python/wheels/3.10.0/) are available for a number of systems and toolkits. These will include a binary distribution of the ArrayFire libraries. Installing from PyPI directly will only include a wrapper-only, source distribution that will not contain binaries. In this case, wrapper-only installations will require a separate installation of the ArrayFire C/C++ libraries.\nYou can get the ArrayFire C/C++ library from the following sources:\n\n- [Download and install binaries](https://arrayfire.com/download)\n- [Build and install from source](https://github.com/arrayfire/arrayfire)\n\n\n**Install the last stable version of the binary python wrapper:**\n```sh\n# install binary wrapper from PyPI without binaries\n# assumes ArrayFire binaries will be installed on the system in some other manner\npip install arrayfire_binary_python_wrapper \n```\n\n**Install a pre-built wheel:**\n```sh\n# install binary wrapper with the 3.10 ArrayFire binaries pre-built and included\npip install arrayfire-binary-python-wrapper -f https://repo.arrayfire.com/python/wheels/3.10.0/\n```\n\n# Building\nThe arrayfire-binary-python-wrapper can build wheels in packaged-binary or in system-wrapper modes.\n[scikit-build-core](https://github.com/scikit-build/scikit-build-core) is used to provide the python build backend.\nThe minimal, wrapper-only mode that relies on a system install will be built by default though the regular python build process. For example:\n```\npython -m pip install -r dev-requirements.txt\npython -m build --wheel\n```\nBuilding a full pre-packaged local binary is an involved process that will require referencing the regular ArrayFire [build](https://github.com/arrayfire/arrayfire/wiki/Build-Instructions-for-Linux) [procedures](https://github.com/arrayfire/arrayfire/wiki/Build-Instructions-for-Windows).\n\nBesides the regular ArrayFire CMake configuration, building the binaries is an opt-in process that is set by an environment variable `AF_BUILD_LOCAL_LIBS=1`. Once that environment variable is set, scikit-build-core will take care of cloning ArrayFire, building, and including the necessary binaries. You may require specifying certain locations of external packages using `CMAKE_ARGS` to pass them to cmake. We recommend looking at our [docker build](https://github.com/arrayfire/arrayfire-docker/blob/afwheel310/arrayfire/scripts/build_wheel.sh) procedure to build this wheel if you wish to replicate it yourself.\n\n\n# Contributing\n\nThe community of ArrayFire developers invites you to build with us if you are\ninterested and able to write top-performing tensor functions. Together we can\nfulfill [The ArrayFire\nMission](https://github.com/arrayfire/arrayfire/wiki/The-ArrayFire-Mission-Statement)\nfor fast scientific computing for all.\n\nContributions of any kind are welcome! Please refer to [the\nwiki](https://github.com/arrayfire/arrayfire/wiki) and our [Code of\nConduct](33) to learn more about how you can get involved with the ArrayFire\nCommunity through\n[Sponsorship](https://github.com/arrayfire/arrayfire/wiki/Sponsorship),\n[Developer\nCommits](https://github.com/arrayfire/arrayfire/wiki/Contributing-Code-to-ArrayFire),\nor [Governance](https://github.com/arrayfire/arrayfire/wiki/Governance).\n\n# Citations and Acknowledgements\n\nIf you redistribute ArrayFire, please follow the terms established in [the\nlicense](LICENSE).\n\nArrayFire development is funded by AccelerEyes LLC and several third parties,\nplease see the list of [acknowledgements](ACKNOWLEDGEMENTS.md) for an\nexpression of our gratitude.\n\n# Support and Contact Info\n\n* [Slack Chat](https://join.slack.com/t/arrayfire-org/shared_invite/MjI4MjIzMDMzMTczLTE1MDI5ODg4NzYtN2QwNGE3ODA5OQ)\n* [Google Groups](https://groups.google.com/forum/#!forum/arrayfire-users)\n* ArrayFire Services:  [Consulting](http://arrayfire.com/consulting)  |  [Support](http://arrayfire.com/download)   |  [Training](http://arrayfire.com/training)\n\n# Trademark Policy\n\nThe literal mark \"ArrayFire\" and ArrayFire logos are trademarks of AccelerEyes\nLLC (dba ArrayFire). If you wish to use either of these marks in your own\nproject, please consult [ArrayFire's Trademark\nPolicy](http://arrayfire.com/trademark-policy/)\n",
    "bugtrack_url": null,
    "license": "BSD 3-Clause License\n         \n         Copyright (c) 2023, ArrayFire\n         \n         Redistribution and use in source and binary forms, with or without\n         modification, are permitted provided that the following conditions are met:\n         \n         1. Redistributions of source code must retain the above copyright notice, this\n            list of conditions and the following disclaimer.\n         \n         2. Redistributions in binary form must reproduce the above copyright notice,\n            this list of conditions and the following disclaimer in the documentation\n            and/or other materials provided with the distribution.\n         \n         3. Neither the name of the copyright holder nor the names of its\n            contributors may be used to endorse or promote products derived from\n            this software without specific prior written permission.\n         \n         THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n         AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n         IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n         DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\n         FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n         DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n         SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n         CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n         OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n         OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n         ",
    "summary": "ArrayFire Python Wrapper",
    "version": "0.8.0",
    "project_urls": {
        "General Documentation": "https://arrayfire.org/docs/index.htm",
        "Website": "http://arrayfire.com"
    },
    "split_keywords": [
        "arrayfire",
        " c",
        " python",
        " wrapper",
        " parallel computing",
        " gpu",
        " cpu",
        " opencl",
        " oneapi"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "2aec556759eee767caad00d388a50ada897ca72553ec2b897d35469d57a8b9fe",
                "md5": "e9718688eb6d2be8a0c46f3be40cfad7",
                "sha256": "0ac6a6c50b9680b4f9bb60df9ec3c2d0cbf4fb10ed1d02c9b423c526ebc4650a"
            },
            "downloads": -1,
            "filename": "arrayfire_binary_python_wrapper-0.8.0-py3-none-win_amd64.whl",
            "has_sig": false,
            "md5_digest": "e9718688eb6d2be8a0c46f3be40cfad7",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 77727,
            "upload_time": "2025-10-10T02:53:14",
            "upload_time_iso_8601": "2025-10-10T02:53:14.974425Z",
            "url": "https://files.pythonhosted.org/packages/2a/ec/556759eee767caad00d388a50ada897ca72553ec2b897d35469d57a8b9fe/arrayfire_binary_python_wrapper-0.8.0-py3-none-win_amd64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "af68cfbfb195bbdb216d300951a4f24fd21a9bdfa317a8acaee05f03f5eb9087",
                "md5": "cdda56f942f59b2d89303db5ccea2ff2",
                "sha256": "dbd9e2a4e48b905143b0e4f995c349839c637f8c2441f1d633edbfc880f15a3d"
            },
            "downloads": -1,
            "filename": "arrayfire_binary_python_wrapper-0.8.0.tar.gz",
            "has_sig": false,
            "md5_digest": "cdda56f942f59b2d89303db5ccea2ff2",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 68712,
            "upload_time": "2025-10-10T02:53:16",
            "upload_time_iso_8601": "2025-10-10T02:53:16.815730Z",
            "url": "https://files.pythonhosted.org/packages/af/68/cfbfb195bbdb216d300951a4f24fd21a9bdfa317a8acaee05f03f5eb9087/arrayfire_binary_python_wrapper-0.8.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-10-10 02:53:16",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "arrayfire-binary-python-wrapper"
}
        
Elapsed time: 3.27690s