Skip to content

Compatibility for 2.7 release #213

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

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

Compatibility for 2.7 release #213

wants to merge 2 commits into from

Conversation

zpcore
Copy link
Collaborator

@zpcore zpcore commented Apr 23, 2025

jax_env_context moved its location. Make the update to make sure 2.7 release is runnable.

@zpcore zpcore requested a review from tengyifei April 23, 2025 23:04
@tengyifei tengyifei marked this pull request as ready for review April 23, 2025 23:04
Copy link
Collaborator

@tengyifei tengyifei left a comment

Choose a reason for hiding this comment

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

I think the old import works fine. Does it stop working in 2.8.0 for some reason? The versioning check is extra complexity.

Copy link
Collaborator

@tengyifei tengyifei left a comment

Choose a reason for hiding this comment

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

Oh, never mind. The current code doesn't work on 2.7.

In order to make it work on both 2.7 and 2.8, I think simply

from torch_xla.experimental.custom_kernel import jax_env_context

Should work. LMK if not the case.

@zpcore
Copy link
Collaborator Author

zpcore commented Apr 23, 2025

Unfortunately, jax_env_context is not under path torch_xla.experimental.custom_kernel anymore in the PyTorch/XLA head.

@tengyifei
Copy link
Collaborator

ugh. you're right

@tengyifei
Copy link
Collaborator

Later on, it would be good to add an E2E test verifying certain recipes with the 2.7 docker. Otherwise, we'd easily regress and random things may start breaking as changes get landed.

@zpcore
Copy link
Collaborator Author

zpcore commented Apr 24, 2025

This is not enough, there is a API compatibility issue which you fixed before:

File "/workspaces/torchprime/torchprime/torch_xla_models/remat_all.py", line 29, in remat_all_partition_fn
    return min_cut_rematerialization_partition(
TypeError: min_cut_rematerialization_partition() got an unexpected keyword argument 'static_lifetime_input_indices'"

I guess we can drop this PR and focusing on syncing docker image periodically.

@tengyifei
Copy link
Collaborator

Maybe we could add an install sh script that downloads the right nightly version wheel corresponding to the pinned docker and installs them. To make the local installation process easier.

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.

2 participants