SymPy integration - #502
Open
DoeringChristian wants to merge 1 commit into
Open
Conversation
Member
|
Hi Christian, thank you for the PR, this looks like a very useful feature. My suggestion would be to do another crunching pass over the code. 1.5K is .. a lot! I feel like this code has some of the fluffiness of partly AI-generated and could do with some simplification passes to reduce it to a more minimal form (matching also the documented API surface). Thanks, |
DoeringChristian
force-pushed
the
sympy_integration
branch
3 times, most recently
from
May 27, 2026 15:00
9e8f222 to
0075a6d
Compare
DoeringChristian
force-pushed
the
sympy_integration
branch
from
June 14, 2026 21:00
0075a6d to
1d08966
Compare
wjakob
reviewed
Jun 15, 2026
wjakob
left a comment
Member
There was a problem hiding this comment.
I realize I never submitted my comments from the original PR :-(
wjakob
force-pushed
the
master
branch
3 times, most recently
from
June 18, 2026 22:11
3912746 to
45500e3
Compare
wjakob
force-pushed
the
master
branch
4 times, most recently
from
June 29, 2026 21:28
4fc980f to
32bcaa6
Compare
wjakob
force-pushed
the
master
branch
7 times, most recently
from
August 22, 2026 03:50
60b72ec to
23ef9cd
Compare
DoeringChristian
force-pushed
the
sympy_integration
branch
from
September 7, 2026 14:02
9550f57 to
e2e61c2
Compare
DoeringChristian
force-pushed
the
sympy_integration
branch
from
September 7, 2026 16:12
b258dd5 to
11b1495
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds integration to sympy using the
dr.wrapdecorator.SymPy is a symbolic expressions engine. This PR adds it as a target for
dr.wrap, allowing us to compute higher order derivatives (hessians) etc in Dr.Jit. In contrast to other targets for this decorator the SymPy target does not exchange data between the libraries at runtime, but rather traces the symbolic expressions generated by the wrapped function, and compiles it to Dr.Jit. The wrapped function therefore acts like an ordinary Dr.Jit function, while we can use the complicated symbolic operations supported by SymPy. The wrapped functions are restricted to per-lane operations. Inverting aMatrix4finside of this wrapper will generate the necessary code for Dr.Jit to invert the matrix. Calling the function with a Matrix array in Dr.Jit will therefore invert each matrix per SIMD lane.