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

Burn fusion optimisation #2129

Open
cBournhonesque opened this issue Aug 8, 2024 · 1 comment
Open

Burn fusion optimisation #2129

cBournhonesque opened this issue Aug 8, 2024 · 1 comment

Comments

@cBournhonesque
Copy link
Contributor

Looking at the tests: https://github.com/cBournhonesque/burn/blob/d770b1f470d734afd79253d082ea9d084a8d5431/crates/burn-fusion/src/stream/execution/tests.rs#L89
it seems like if a segment doesn't find any optimization, the entire segment is executed with no fusion.

But wouldn't it be possible to just execute the first operation and then restart the fusion exploration on the second one?

On the test it looks like another optimization is potentially possible if [op_2] is added in the queue.

@nathanielsimard
Copy link
Member

Yes, you are right! In fact, the real fix would be to have a start trigger for optimizations instead of always trying them out. It would be more natural and would avoid some bugs that we would have right now if we had more than just one optimization.

For now we're not missing any optimization because all element-wise operations are "start triggers" and all other ops are "stop trigger".

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

No branches or pull requests

2 participants