Skip to content

Add support for callable in torchax.interop.JittableModule.functional_call in the first parameter#9451

Merged
qihqi merged 1 commit intopytorch:masterfrom
zmelumian972:torchax/jittable_module_callable
Jul 18, 2025
Merged

Add support for callable in torchax.interop.JittableModule.functional_call in the first parameter#9451
qihqi merged 1 commit intopytorch:masterfrom
zmelumian972:torchax/jittable_module_callable

Conversation

@zmelumian972
Copy link
Copy Markdown
Collaborator

Currently when working with functional call in JittableModule, it can only work with internal methods inside the module

this PR allows the user to define a callable that will have the model inserted as the first argument (similar to 'self' mechanism in python)

this allows torchax to JIT torch procedures outside the scope of the module

@zmelumian972
Copy link
Copy Markdown
Collaborator Author

@qihqi it's failing on tests that I don't think are connected to this PR, what should I do?

@qihqi
Copy link
Copy Markdown
Collaborator

qihqi commented Jul 11, 2025

@qihqi it's failing on tests that I don't think are connected to this PR, what should I do?

@zmelumian972 Please rebase to lastest, we fixed it yesterday.

@zmelumian972 zmelumian972 force-pushed the torchax/jittable_module_callable branch from dc21e01 to f1f6894 Compare July 14, 2025 07:45
@zmelumian972
Copy link
Copy Markdown
Collaborator Author

Done, sorry for the delay

@qihqi qihqi merged commit ca91445 into pytorch:master Jul 18, 2025
39 of 42 checks passed
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.

3 participants