⚡️Optimizing einsum functions in NumPy, Tensorflow, Dask, and more with contraction order optimization.
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.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.Adds a new dynamic programming algorithm to the suite of paths.
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.
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.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.New features:
Enhancements:
Bug fixes:
a-z
subset valid for PyTorch's einsum implementation.