- Notifications
You must be signed in to change notification settings - Fork7
A python thin wrapper for ArrayFire library
License
arrayfire/arrayfire-binary-python-wrapper
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
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 awork 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 theinterface Python libraryarrayfire-py can be developed independently. The package isnot intended to be used directly and merely exposes theC functionality required byarrayfire-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.
The ArrayFire Python Project is separated into 3 different parts:
arrayfire-py -> arrayfire-binary-python-wrapper -> ArrayFire C LibrariesThis means that arrayfire with python each of these parts is needed:
arrayfire-pyis theintended 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 theArrayFire C/C++ Project
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 mannerpip install arrayfire_binary_python_wrapper
Install a pre-built wheel:
# install binary wrapper with the 3.10 ArrayFire binaries pre-built and includedpip install arrayfire-binary-python-wrapper -f https://repo.arrayfire.com/python/wheels/3.10.0/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.txtpython -m build --wheelBuilding a full pre-packaged local binary is an involved process that will require referencing the regular ArrayFirebuildprocedures.
Besides the regular ArrayFire CMake configuration, building the binaries is an opt-in process that is set by an environment variableAF_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 usingCMAKE_ARGS to pass them to cmake. We recommend looking at ourdocker build procedure to build this wheel if you wish to replicate it yourself.
The community of ArrayFire developers invites you to build with us if you areinterested and able to write top-performing tensor functions. Together we canfulfillThe ArrayFireMissionfor fast scientific computing for all.
Contributions of any kind are welcome! Please refer tothewiki and ourCode ofConduct to learn more about how you can get involved with the ArrayFireCommunity throughSponsorship,DeveloperCommits,orGovernance.
If you redistribute ArrayFire, please follow the terms established inthelicense.
ArrayFire development is funded by AccelerEyes LLC and several third parties,please see the list ofacknowledgements for anexpression of our gratitude.
- Slack Chat
- Google Groups
- ArrayFire Services:Consulting |Support |Training
The literal mark "ArrayFire" and ArrayFire logos are trademarks of AccelerEyesLLC (dba ArrayFire). If you wish to use either of these marks in your ownproject, please consultArrayFire's TrademarkPolicy
About
A python thin wrapper for ArrayFire library
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
Packages0
Uh oh!
There was an error while loading.Please reload this page.
