diff options
| author | Sai Praveen Bangaru <31557731+saipraveenb25@users.noreply.github.com> | 2024-07-08 18:48:08 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-07-08 18:48:08 -0400 |
| commit | 4a49769c5b6b351b3c1c9a9968b3926839504606 (patch) | |
| tree | ac9588f413dddc3a7c62cb24f36ab5fc51eb7d4a /external/tinyobjloader | |
| parent | 2cb65a89f33ac1c4bad216e576069edbdc04933f (diff) | |
Treat global variables and parameters as non-differentiable when checking derivative data-flow (#4526)
Global parameters are by-default not differentiable (even if they are of a differentiable type), because our auto-diff passes do not touch anything outside of function bodies.
The solution is to use wrapper objects with differentiable getter/setter methods (and we should provide a few such objects in the stdlib).
Fixes: #3289
This is a potentially breaking change: User code that was previously working with global variables of a differentiable type will now throw an error (previously the gradient would be dropped without warning). The solution is to use `detach()` to keep same behavior as before or rewrite the access using differentiable getter/setter methods.
Diffstat (limited to 'external/tinyobjloader')
0 files changed, 0 insertions, 0 deletions
