Skip to content

Remove internals.product_n and speed up fvsof and sizesof - #747

Merged
jfeser merged 8 commits into
masterfrom
eb-remove-productn
Aug 10, 2026
Merged

Remove internals.product_n and speed up fvsof and sizesof#747
jfeser merged 8 commits into
masterfrom
eb-remove-productn

Conversation

@eb8680

@eb8680 eb8680 commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Blocked by #745

This PR refactors fvsof, handlers.torch.sizesof and handlers.jax.sizesof to make use of the new caching mechanism in #745 in lieu of productN, which seems to speed them all up by a constant factor of ~5x without affecting their semantics. It also drops product_n.py and test_internals_product_n.py, which are now unused. It also shares the new implementation of sizesof across the Torch and JAX backends, improving correctness and maintainability.

@eb8680
eb8680 requested a review from jfeser August 5, 2026 17:29
@eb8680 eb8680 added the blocked label Aug 5, 2026
@eb8680

eb8680 commented Aug 5, 2026

Copy link
Copy Markdown
Contributor Author

I think this should have a nice side effect of speeding up the NumPyro CI build, which is the slowest part of our test suite that bottlenecks CI times.

@jfeser jfeser 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.

fvsof shouldn't return renamed bound operations from collection binders.

Comment thread effectful/handlers/jax/_handlers.py
@eb8680

eb8680 commented Aug 6, 2026

Copy link
Copy Markdown
Contributor Author

Should be fixed now

@jfeser
jfeser self-requested a review August 6, 2026 17:34
@jfeser
jfeser force-pushed the eb-remove-productn branch from e425d1f to ab9a76b Compare August 10, 2026 16:39
Base automatically changed from eb-unify-cache to master August 10, 2026 16:41
@jfeser
jfeser force-pushed the eb-remove-productn branch from ab9a76b to e81a1dd Compare August 10, 2026 16:41
@jfeser
jfeser merged commit d870f3f into master Aug 10, 2026
29 checks passed
@jfeser
jfeser deleted the eb-remove-productn branch August 10, 2026 16:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants