Skip to content

Avoid PyTensor function overhead in OpFromGraph #1375

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

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

ricardoV94
Copy link
Member

@ricardoV94 ricardoV94 commented Apr 19, 2025

Also provide pure C-implementation when all Ops allow it.

This should make us less hesitant to use OpFromGraph in those cases where it makes sense to (complex graph that we want to reason about as if it was a single Op)


📚 Documentation preview 📚: https://pytensor--1375.org.readthedocs.build/en/1375/

@ricardoV94 ricardoV94 force-pushed the ofg_c_impl branch 2 times, most recently from 95b0cc4 to bcbe5cf Compare April 19, 2025 15:05
@ricardoV94 ricardoV94 marked this pull request as draft April 20, 2025 13:36
@ricardoV94 ricardoV94 force-pushed the ofg_c_impl branch 2 times, most recently from eb7a528 to 12d2e76 Compare April 25, 2025 16:51
Also provide pure C-implementation when all Ops allow it.

LazyLinker does not complain about thunks that return outputs, since itself can be a thunk. Adding a Python wrapper that hides the outputs incurs considerable overhead, and modifying the LazyLinker to optionally not return outputs seems unnecessarily complex.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant