Closed diegoferigo closed 3 months ago
That's great, thanks! Does it have any concrete effect on the performances?
Not really, the modified methods are not called a lot. I don't expect any runtime overhead since the extra branch injected for raising the exception is never called, and the only overhead is a boolean comparison that has almost no cost.
Inspecting the time taken by CI, there's no significant change. It takes 15-20 seconds more on average but this is also because this PR introduces a new test.
In any case, if we face any overhead in the future that we want to get rid of, we can introduce a new environment variable that disables raising exceptions within jit-compiled function. It should be straightforward.
Implements the jit-compatible exceptions of #181 to stop the execution of jit-compiled methods when the integer indices of links, frames, and joints are not valid.
📚 Documentation preview 📚: https://jaxsim--182.org.readthedocs.build//182/