diff options
| author | Sai Praveen Bangaru <31557731+saipraveenb25@users.noreply.github.com> | 2023-02-22 19:33:42 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-02-22 16:33:42 -0800 |
| commit | 6eb0b4dea4da1fc21767c86cc0837d0c8b68063b (patch) | |
| tree | 8ad8fe77e57db437be5f7403fd324e218db9c578 /source/slang/slang-ir-autodiff-rev.cpp | |
| parent | 0ef7aa85d3a6b2ff1d6b25576b4d9eff188c1a6a (diff) | |
Reverse-mode AD fixes for loops with non-trivial break region (#2671)
* Fix crash when applying autodiff to functions with no arguments
* Fixes for loops where the break region is non-trivial
* Minor fix
* Implement array legalization correctly.
* Fix array legalization.
---------
Co-authored-by: Yong He <yhe@nvidia.com>
Diffstat (limited to 'source/slang/slang-ir-autodiff-rev.cpp')
| -rw-r--r-- | source/slang/slang-ir-autodiff-rev.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/slang/slang-ir-autodiff-rev.cpp b/source/slang/slang-ir-autodiff-rev.cpp index 55c0ee46d..640f516ed 100644 --- a/source/slang/slang-ir-autodiff-rev.cpp +++ b/source/slang/slang-ir-autodiff-rev.cpp @@ -568,11 +568,9 @@ namespace Slang { DifferentiableTypeConformanceContext* diffTypeContext; - virtual bool shouldConvertAddrInst(IRInst* addrInst) override + virtual bool shouldConvertAddrInst(IRInst*) override { - if (isDifferentiableType(*diffTypeContext, addrInst->getDataType())) - return true; - return false; + return true; } }; @@ -598,7 +596,9 @@ namespace Slang if (SLANG_SUCCEEDED(result)) { + disableIRValidationAtInsert(); simplifyFunc(func); + enableIRValidationAtInsert(); } return result; } |
