Replies: 1 comment
-
Same happens if we jit the partial function:
resulting in:
Is this a performance bug or at least something that should trigger a warning? (@jakevdp) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm trying to compute a Jacobian-Matrix-Product (
J @ M
) where the matrixM
always stays the same but the JacobianJ
varies (in the following example even the Jacobian stays fixed). Thus I thought I can capture the matrixM
in the function (aka let JAX copy the matrix into the jitted function). This matrix will never change and therefore I shouldn't get any strange side effects. Nevertheless, this results in a really slow jit time. When providing the the matrix (M
) to the function and thus making it a pure function jitting runs as fast as expected. See the following code snippet:Resulting in:
Can somebody shed some light on the reasons why this is so much slower in the case where I (mistakenly) used an impure function?
Beta Was this translation helpful? Give feedback.
All reactions