Skip to content

Fix jacrev/jacfwd varying basis construction for JAX 0.10#43

Merged
n-gao merged 3 commits into
microsoft:mainfrom
dalin27:dl/fix-jax-010-pvary-pcast
May 6, 2026
Merged

Fix jacrev/jacfwd varying basis construction for JAX 0.10#43
n-gao merged 3 commits into
microsoft:mainfrom
dalin27:dl/fix-jax-010-pvary-pcast

Conversation

@dalin27
Copy link
Copy Markdown
Contributor

@dalin27 dalin27 commented May 1, 2026

jax.lax.pvary was deprecated in JAX 0.8.2 and removed from the public jax.lax API in JAX 0.10.0. JAX 0.10 also removed ShapedArray.vma, replacing it with manual_axis_type.varying.

The new helpers preserve compatibility by:

  • using manual_axis_type.varying when available;
  • falling back to vma on older JAX versions;
  • using jax.lax.pcast(..., to="varying") when available;
  • falling back to jax.lax.pvary(...) on older JAX versions.

@dalin27
Copy link
Copy Markdown
Contributor Author

dalin27 commented May 1, 2026

@microsoft-github-policy-service agree

@n-gao
Copy link
Copy Markdown
Collaborator

n-gao commented May 5, 2026

@dalin27 Thanks a lot! These changes make a lot of sense. Could you please rebase on main? Also it would be great if the function could be put into utils and also be used in the custom slogdet function such that all tests pass :)

@dalin27 dalin27 force-pushed the dl/fix-jax-010-pvary-pcast branch from 3222c81 to e486079 Compare May 6, 2026 05:59
@dalin27
Copy link
Copy Markdown
Contributor Author

dalin27 commented May 6, 2026

I rebased on main, moved the varying-marker helper into utils, reused it in the custom slogdet, and fixed the pre-existing split test failure. I also ran pytest locally and it passes

Copy link
Copy Markdown
Collaborator

@n-gao n-gao left a comment

Choose a reason for hiding this comment

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

LGTM

@n-gao n-gao merged commit 43727a3 into microsoft:main May 6, 2026
10 of 12 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.

2 participants