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

Merge Branches in Computation Graph #24

Open
lukem12345 opened this issue Feb 9, 2024 · 1 comment
Open

Merge Branches in Computation Graph #24

lukem12345 opened this issue Feb 9, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@lukem12345
Copy link
Member

We note that we can take this idea of contracting chains further by eliminating branches.

In other words, a binary tree of depth 2, (with update steps at the leaves) requires (assuming all functions on edges are unique) 6 matrices, 2 intermediary vectors, and performs 6 matrix-vector multiplications. This could be re-written as an equivalent 1-deep 4-ary tree which requires just 4 matrices, 0 intermediary vectors, and performs 4 matrix-vector multiplications. This result cannot be improved upon, unless edge pruning of duplicate operations is performed.

This speed-up and memory improvement of an entire decapode in this fashion is unlikely to occur, since Op2s are likely to break this downwards tree-like property.

Originally posted by @lukem12345 in AlgebraicJulia/Decapodes.jl#93 (comment)

@lukem12345 lukem12345 transferred this issue from AlgebraicJulia/Decapodes.jl Feb 13, 2024
@lukem12345 lukem12345 self-assigned this Feb 13, 2024
@lukem12345 lukem12345 added the enhancement New feature or request label Jun 18, 2024
@lukem12345
Copy link
Member Author

This issue would allow for the most speed-ups in downstream Decapodes simulations ATM, since most bottlenecks relating to operator efficiency are resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant