Skip to content

Conversation

@HumphreyYang
Copy link
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()

@github-actions
Copy link

📖 Netlify Preview Ready!

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

📚 Changed Lecture Pages: mccall_correlated

@github-actions
Copy link

📖 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

📖 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

📖 Netlify Preview Ready!

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

📚 Changed Lecture Pages: mccall_correlated

@github-actions
Copy link

📖 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
Copy link

github-actions bot commented Nov 8, 2025

📖 Netlify Preview Ready!

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

📚 Changed Lecture Pages: mccall_correlated

@jstac
Copy link
Contributor

jstac commented Nov 8, 2025

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants