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

Consider Cythonizing the Function evaluation code #306

Open
brandonwillard opened this issue Feb 25, 2021 · 0 comments
Open

Consider Cythonizing the Function evaluation code #306

brandonwillard opened this issue Feb 25, 2021 · 0 comments
Labels
enhancement New feature or request performance concern question Further information is requested

Comments

@brandonwillard
Copy link
Member

We might be able to speed up Aesara's compiled function evaluations by Cythonizing classes like Function—or at least the methods within it and/or the functions it calls.

Every time an aesara.function-compiled graph is evaluated Function.__call__ is called, so, if we can speed that up, we can reduce the inherent overhead incurred when repeatedly calling compiled graph functions. Note that Type methods like Type.filter are called repeatedly within this process, as well as methods within aesara.link.basic.Container, so this effort may reach out into other core classes as well, since we will likely want to Cythonize those in order to reduce the in-and-out-of-Python overhead.

Regardless, it's worth considering how much Cythonization we could get away with through the entire codebase, especially since we can (theoretically) maintain pure Python code that's Cythonizable by way of annotations and .pxd files (i.e. pure Python mode).

@brandonwillard brandonwillard added enhancement New feature or request help wanted Extra attention is needed question Further information is requested labels Feb 25, 2021
@brandonwillard brandonwillard removed the help wanted Extra attention is needed label Jan 5, 2022
@brandonwillard brandonwillard changed the title Consider Cythonizing the Function evaluation code Consider Cythonizing the Function evaluation code Aug 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request performance concern question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant