Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

more custom dp scores for faster contractions #181

Merged
merged 7 commits into from
Jan 17, 2022

Conversation

jcmgray
Copy link
Collaborator

@jcmgray jcmgray commented Jan 15, 2022

Description

This adds more custom functions to the dp solver as outlined in #171. For example:

opt = oe.DynamicProgramming(minimize='combo')

should give better real world performance in many cases than the pure minimized flop cost alone.
Also included is a couple of 'micro' optimizations for the path finders performance - namely, making some inner loop calls functions not methods.

Todos

  • at some point might be nice to add these to the random greedy path as well

Questions

  • I tried the black formatter and it showed lots of changes across many files - currently have just committed those on the files modified...? Am I invoking it wrong? (edit: might just be that the conda black is a bit out-of-date)

Status

  • Ready to go

@codecov
Copy link

codecov bot commented Jan 15, 2022

Codecov Report

Merging #181 (6846f14) into master (6a30cf5) will decrease coverage by 0.07%.
The diff coverage is 95.16%.

Copy link
Owner

@dgasmith dgasmith left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Can we add a few notes on the DP optimizer's new minimizers in the docs?

opt_einsum/paths.py Show resolved Hide resolved
opt_einsum/paths.py Show resolved Hide resolved
opt_einsum/tests/test_paths.py Show resolved Hide resolved
Copy link
Owner

@dgasmith dgasmith left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM once mypy is worked through. Let me know if you would like a hand!

opt_einsum/paths.py Outdated Show resolved Hide resolved
@jcmgray jcmgray merged commit ee0e37c into dgasmith:master Jan 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants