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

Cache derivative function for different input sizes #22

Open
dfdx opened this issue Aug 29, 2017 · 0 comments
Open

Cache derivative function for different input sizes #22

dfdx opened this issue Aug 29, 2017 · 0 comments

Comments

@dfdx
Copy link
Owner

dfdx commented Aug 29, 2017

Currently we generate derivative functions that are bound to input sizes. If input size changes, user needs to repeat differentiation process which may be costly. Rather than put it on the user, we can maintain a cache of functions, one per a set of input sizes, and provide the user with a "meta" function that adaptively selects needed derivative function.

We also need to keep track of buffer sizes in memory dict. The easiest way should be to replace @get_or_create with something like @get_or_alloc that also checks the size of the buffer.

This issue indirectly depends on GPU codegen.

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