Hi,
I'm currently playing around with the rust-enzyme integration.
I'm trying to build the derivative of a simple signed distance function. I found that I get a different derivative values for certain coordinates depending on the compilation profile.
I came up with
this minimal example. For `x=[2,2,2]`:
`dev` profile [unoptimized + debuginfo]:
x=[2, 2, 2], dy=[0, 0.33333334, 0.33333334]
`release` profile [optimized]:
x=[2, 2, 2], dy=[0.33333334, 0.6666667, 0.6666667]
I verified that the release build outputs the correct value, so the debug build seems to be broken. This also seems to be somehow related to signedness. All values I tested in the
positive region are broken. But for instance x=[-2, -2, -2] outputs the correct value for both builds.
To set up the Rust-Enzyme toolchain I followed the installation guide here:
https://enzyme.mit.edu/index.fcgi/rust/installation.htmlAm I doing something wrong, or is my project setup missing anything? Are you able to reproduce the bug?
I'd appreciate any pointers as to how to fix the problem.
Greetings
Tendsin Mende