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

Use jax autograd from PyTorch #8805

Open
tengyifei opened this issue Mar 7, 2025 · 0 comments
Open

Use jax autograd from PyTorch #8805

tengyifei opened this issue Mar 7, 2025 · 0 comments
Assignees
Labels
enhancement New feature or request torchxla2

Comments

@tengyifei
Copy link
Collaborator

🚀 Feature

Instead of using PyTorch autograd and checkpointing, we'll investigate using jax.grad, jax.vjp, jax.remat etc. to control the rematerialization of a PyTorch model.

Motivation

JAX remat is more powerful than PyTorch autograd. For example, we can name individual tensors and selectively save/offload them. PyTorch does not support naming a tensor.

Pitch

Something like https://github.com/tengyifei/playground/blob/master/torch-jax-autograd.ipynb combined with #8781 and torchax.

cc @qihqi

@tengyifei tengyifei self-assigned this Mar 7, 2025
@ysiraichi ysiraichi added enhancement New feature or request torchxla2 labels Mar 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request torchxla2
Projects
None yet
Development

No branches or pull requests

2 participants