Skip to content
This repository was archived by the owner on Jun 5, 2026. It is now read-only.

Compatibility for 2.7 release#213

Open
zpcore wants to merge 2 commits into
mainfrom
piz/comp
Open

Compatibility for 2.7 release#213
zpcore wants to merge 2 commits into
mainfrom
piz/comp

Conversation

@zpcore

@zpcore zpcore commented Apr 23, 2025

Copy link
Copy Markdown
Contributor

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

@tengyifei tengyifei left a comment

Copy link
Copy Markdown
Contributor

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.

@tengyifei tengyifei left a comment

Copy link
Copy Markdown
Contributor

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

zpcore commented Apr 23, 2025

Copy link
Copy Markdown
Contributor Author

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

@tengyifei

Copy link
Copy Markdown
Contributor

ugh. you're right

@tengyifei

Copy link
Copy Markdown
Contributor

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

zpcore commented Apr 24, 2025

Copy link
Copy Markdown
Contributor Author

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
Copy Markdown
Contributor

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 subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants