Skip to content

[mcall_correlated] Convert to JAX and content checks - #616

Merged
jstac merged 6 commits into
mainfrom
mc_cor
Nov 8, 2025
Merged

jstac merged 6 commits into
mainfrom
mc_cor

Conversation

@HumphreyYang

Copy link
Copy Markdown
Member

This PR updates mcall_correlated by converting the code to JAX.

Lecture runtime cuts from 79.07 to 9.14 seconds.

The main loop cuts from 5.85 to 0.16 seconds with block_until_ready()

@HumphreyYang HumphreyYang added jax-conversion new-lecture A new lecture (the marquee outcome) labels Sep 16, 2025
@github-actions

Copy link
Copy Markdown

📖 Netlify Preview Ready!

Preview URL: https://pr-616--sunny-cactus-210e3e.netlify.app (7b5bb5d)

📚 Changed Lecture Pages: mccall_correlated

@github-actions

Copy link
Copy Markdown

📖 Netlify Preview Ready!

Preview URL: https://pr-616--sunny-cactus-210e3e.netlify.app (d3a847c)

📚 Changed Lecture Pages: mccall_correlated

@HumphreyYang HumphreyYang changed the title [mcall_correlated] Convert to JAX and make titles stylesheet compliant [mcall_correlated] Convert to JAX and content checks Sep 16, 2025
@github-actions

Copy link
Copy Markdown

📖 Netlify Preview Ready!

Preview URL: https://pr-616--sunny-cactus-210e3e.netlify.app (c43170a)

📚 Changed Lecture Pages: mccall_correlated

@HumphreyYang
HumphreyYang marked this pull request as ready for review September 17, 2025 03:09
@github-actions

Copy link
Copy Markdown

📖 Netlify Preview Ready!

Preview URL: https://pr-616--sunny-cactus-210e3e.netlify.app (03884e1)

📚 Changed Lecture Pages: mccall_correlated

@github-actions

Copy link
Copy Markdown

📖 Netlify Preview Ready!

Preview URL: https://pr-616--sunny-cactus-210e3e.netlify.app (b22bcf0)

📚 Changed Lecture Pages: mccall_correlated

Removed @jax.jit decorator from the Q operator function since it's called
within the already-jitted compute_fixed_point function. JAX documentation
recommends avoiding nested jit decorators as they create compilation
boundaries that prevent XLA from optimizing the full computation graph.

Performance testing showed ~10% improvement by letting the outer jit
compile the entire computation including Q.

Also cleaned up formatting:
- Renamed 'state' to 'loop_state' for clarity in while_loop functions
- Improved function signature formatting
- Standardized code style

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@github-actions

github-actions Bot commented Nov 8, 2025

Copy link
Copy Markdown

📖 Netlify Preview Ready!

Preview URL: https://pr-616--sunny-cactus-210e3e.netlify.app (3f361f1)

📚 Changed Lecture Pages: mccall_correlated

@jstac

jstac commented Nov 8, 2025

Copy link
Copy Markdown
Contributor

Thanks @HumphreyYang ! Merging.

@jstac
jstac merged commit 22983b3 into main Nov 8, 2025
1 check passed
@jstac
jstac deleted the mc_cor branch November 8, 2025 21:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

jax-conversion new-lecture A new lecture (the marquee outcome)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants