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

insert_write_back_for_buffers_pass should inject copy_ nodes at the earliest possible spot. #7345

Open
JacobSzwejbka opened this issue Dec 17, 2024 · 0 comments
Labels
bug Something isn't working module: exir Issues related to Export IR

Comments

@JacobSzwejbka
Copy link
Contributor

🐛 Describe the bug

Currently the pass injects all the 'copy_' nodes at the end of the graph. It should instead insert them immediately following the last usage of the thing being copied into the original mutable buffer. By waiting till the end we are arbitrarily extending the lifetime of those tensors potentially wasting a non trivial amount of space in the memory plan.

Versions

.

@JacobSzwejbka JacobSzwejbka added module: exir Issues related to Export IR bug Something isn't working labels Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working module: exir Issues related to Export IR
Projects
None yet
Development

No branches or pull requests

1 participant