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

Fuse subgraphs that share common inputs #249

Open
ricardoV94 opened this issue Mar 16, 2023 · 0 comments
Open

Fuse subgraphs that share common inputs #249

ricardoV94 opened this issue Mar 16, 2023 · 0 comments

Comments

@ricardoV94
Copy link
Member

ricardoV94 commented Mar 16, 2023

After #121 our Fusion rewrite still does not merge subgraphs that share some inputs but are otherwise not connected

import pytensor
import pytensor.tensor as pt

x = pt.vector("x")
y1 = pt.exp(pt.sin(x))
y2 = pt.sin(pt.exp(x))
fn = pytensor.function([x], [y1, y2])

pytensor.dprint(fn)

That is added as an xfail test for now. I consider that an improvement we can do in a follow-up. I would do it as a rewrite that tries to combine multiple Composites with common inputs, done after the Fusion rewrite.

Originally posted by @ricardoV94 in #121 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant