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

Memoize or precompute subgraphs that depend only on input shapes #270

Open
robertknight opened this issue Jul 5, 2024 · 0 comments
Open

Comments

@robertknight
Copy link
Owner

robertknight commented Jul 5, 2024

Many models have subgraphs that depend only on the shape of inputs, and thus don't change when the model is called repeatedly with inputs of the same shape. These subgraphs are usually cheap since the tensors flowing through them are small, but there is nevertheless overhead for each operation that is run. These subgraphs could be memoized to avoid re-running them unnecessarily.

As a starting point, it would be useful to do some experiments to see how many operations can be saved on some popular models, especially decoder models which are run repeatedly.

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

1 participant