ArrayFire Python Wrapper
Project description
arrayfire-binary-python-wrapper
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 can be developed independently. The package is not intended to be used directly and merely exposes the
C functionality required by 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-pyis the intended User Interface that provides a numpy-like layer to execute math and array operations with ArrayFire.arrayfire-binary-python-wrapperis the thinbinarywrapper 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 Librariesare the binaries obtained from compiling the ArrayFire C/C++ Project
Installing
The arrayfire-binary-python-wrapper can be installed from a variety of sources. Pre-built wheels 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:
Install the last stable version of the binary python wrapper:
# 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:
# 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 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 procedures.
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 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 for fast scientific computing for all.
Contributions of any kind are welcome! Please refer to the wiki and our Code of Conduct to learn more about how you can get involved with the ArrayFire Community through Sponsorship, Developer Commits, or Governance.
Citations and Acknowledgements
If you redistribute ArrayFire, please follow the terms established in the license.
ArrayFire development is funded by AccelerEyes LLC and several third parties, please see the list of acknowledgements for an expression of our gratitude.
Support and Contact Info
- Slack Chat
- Google Groups
- ArrayFire Services: Consulting | Support | 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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file arrayfire_binary_python_wrapper-0.8.0.tar.gz.
File metadata
- Download URL: arrayfire_binary_python_wrapper-0.8.0.tar.gz
- Upload date:
- Size: 68.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dbd9e2a4e48b905143b0e4f995c349839c637f8c2441f1d633edbfc880f15a3d
|
|
| MD5 |
cdda56f942f59b2d89303db5ccea2ff2
|
|
| BLAKE2b-256 |
af68cfbfb195bbdb216d300951a4f24fd21a9bdfa317a8acaee05f03f5eb9087
|
File details
Details for the file arrayfire_binary_python_wrapper-0.8.0-py3-none-win_amd64.whl.
File metadata
- Download URL: arrayfire_binary_python_wrapper-0.8.0-py3-none-win_amd64.whl
- Upload date:
- Size: 77.7 kB
- Tags: Python 3, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0ac6a6c50b9680b4f9bb60df9ec3c2d0cbf4fb10ed1d02c9b423c526ebc4650a
|
|
| MD5 |
e9718688eb6d2be8a0c46f3be40cfad7
|
|
| BLAKE2b-256 |
2aec556759eee767caad00d388a50ada897ca72553ec2b897d35469d57a8b9fe
|