Skip to content

Conversation

TomHilder
Copy link

@TomHilder TomHilder commented Aug 20, 2025

Small change to Jacobian-vector product implementation to now support alternate mode orderings. This resolves #159 and probably #158.

In #159 the alternate mode ordering (modord=1) appears to be the sole cause of the dodgy derivatives, because jvp was previously hard-coded assuming the default (modeord=0). I modified those tests to use the default and found that they passed to precision rtol=5e-6, atol=1e-12 which is admittedly lower than the default that numpy uses. The changes I made here also cause the original versions of the test with alternate mode ordering to pass to the same precision.

This is a relatively simple change and I'm happy to format it differently if desired by the maintainers.

Thanks!

Copy link

@unalmis unalmis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is better handled in the original PR as the tests are there to validate the correctness of the bugfix. I have yet to find the GPU bug, so if you find that, I recommend pushing directly to #159 . Edit: Found and fixed GPU bug as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants