Skip to content

Do jax get rid of unused branches #15661

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

You must be logged in to vote

Yes, if you have static conditions you should use a Python if statement, and then the compiler won't even see the other branch.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@jakubMitura14
Comment options

@jakevdp
Comment options

Answer selected by jakubMitura14
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