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

[WIP] Make lifetime of closure explicit (fingers crossed unit tests pass) #1094

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

Conversation

Ch0ronomato
Copy link
Contributor

@Ch0ronomato Ch0ronomato commented Nov 17, 2024

Description

After digging and digging, I can see that torch compiler is doing one thing peculiar that I'm gonna try to make a bug request for. You know how the dispatches return a lambda function? It traces the code and guesses its on a different module than torch funcify. So you can just cheese it by doing setattr on pytensor.link.utils

Related Issue

  • Closes #
  • Related to #

Checklist

Type of change

  • New feature / enhancement
  • Bug fix
  • Documentation
  • Maintenance
  • Other (please specify):

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

name = functor.__name__
i = 0
prefix = ""
while True:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is just placeholder. We need to essentially make sure elemwise_fn and elemwise_fn_1 show up in the guard.

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

Successfully merging this pull request may close these issues.

1 participant