⚡️Optimizing einsum functions in NumPy, Tensorflow, Dask, and more with contraction order optimization.
MIT License
Adds a object
backend for optimized contractions on arbitrary Python objects.
object
based backend so that contract(backend='object')
can be used on arbitrary objects such as SymPy symbols.contract
backend cannot be found.remaining
category for the contract_path
output to only show up to 20 tensors to prevent issues with the quadratically scaling memory requirements and the number of print lines for large contractions.Published by dgasmith over 4 years ago
Published by dgasmith over 4 years ago
Small fixes for the dp
path and support for a new mars backend.
auto-hq
and 'random-greedy-128'
paths.dp
path.opt_einsum
's stated minimum version.Published by dgasmith about 5 years ago
Adds a new dynamic programming algorithm to the suite of paths.
Published by dgasmith about 5 years ago
Alters setup.py
to correctly state that opt_einsum
requires Python 3.5+. This will now correctly effect PyPI and other pip mirror downloads, v3.0.0 will be removed from PyPI to prevent further issues.
Published by dgasmith about 5 years ago
This release moves opt_einsum
to be backend agnostic while adding support
additional backends such as Jax and Autograd. Support for Python 2.7 has been dropped and Python 3.5 will become the new minimum version, a Python deprecation policy equivalent to NumPy's has been adopted.
backend="auto"
keyword has been implemented for contract
allowing automatic detection of the correct backend to use based off provided tensors in the contraction.contract_path
function can now accept shape tuples rather than full tensors.contract_path
automated path algorithm decision technology has been refactored to a standalone function.Published by dgasmith almost 6 years ago
Published by dgasmith almost 6 years ago
Published by dgasmith almost 6 years ago
This release primarily focuses on expanding the suite of available path technologies to provide better optimization characistics for 4-20 tensors while decreasing the time to find paths for 50-200+ tensors. See Path Overview for more information.
opt_einsum.contract
path option. This keyword automatically chooses the best path technology that takes under 1ms to execute.opt_einsum.contract
path keyword has been changed to optimize to more closely match NumPy. path will be deprecated in the future.opt_einsum.contract_path
now returns a opt_einsum.contract.PathInfo
object that can be queried for the scaling, flops, and intermediates of the path. The print representation of this object is identical to before.Published by dgasmith about 6 years ago
New features:
Enhancements:
Bug fixes:
a-z
subset valid for PyTorch's einsum implementation.Published by dgasmith about 6 years ago
Bug fixes:
README.md
.Published by dgasmith about 6 years ago
Bug Fixes:
versioneer.py
is in MANIFEST.in for a clean pip install.Published by dgasmith about 6 years ago
Bug Fixes:
Published by dgasmith about 6 years ago
opt_einsum
continues to improve its support for additional backends beyond NumPy with PyTorch.
We have also published the opt_einsum package in the Journal of Open Source Software. If you use this package in your work, please consider citing us!
New features:
Enhancements:
Bug fixes:
Published by dgasmith over 6 years ago
opt_einsum
is a powerful tensor contraction order optimizer for NumPy and related ecosystems.
Published by dgasmith over 6 years ago
opt_einsum
is a powerful tensor contraction order optimizer for NumPy and related ecosystems.
greedy
order optimization algorithm has been tuned to be able to handle hundreds of tensors in several seconds.Published by dgasmith about 8 years ago
Official 1.0 release.
Einsum is a very powerful function for contracting tensors of arbitrary dimension and index. However, it is only optimized to contract two terms at a time resulting in non-optimal scaling for contractions with many terms. Opt_einsum aims to fix this by optimizing the contraction order which can lead to arbitrarily large speed ups at the cost of additional intermediate tensors.
Opt_einsum is also implemented into the np.einsum
function as of NumPy v1.12.
Published by dgasmith about 8 years ago
A large step towards to a full 1.0 release. BLAS usage is now automatically applied to all operations. Future releases will be more careful with regard to views and needless data copying.
Published by dgasmith over 8 years ago
Adds Python 3 support in addition to installation through a setup.py
command.