Skip to content

Question regarding efficiency of jax.grad #18422

Answered by jakevdp
Rasmuskh asked this question in Q&A
Discussion options

You must be logged in to vote

Thanks for the question!

Typically in JAX, performance-critical code is wrapped in jax.jit, which is passed to the compiler, and the compiler will do dead code elimination before execution. So in practice, throwing away this value during trace time does not matter.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Rasmuskh
Comment options

Answer selected by Rasmuskh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants