diff options
| author | Yong He <yonghe@outlook.com> | 2023-01-14 22:50:57 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-01-14 22:50:57 -0800 |
| commit | 1c9b33157322751c456bf7abbd386edccf4413c3 (patch) | |
| tree | bbe4d28172a839fb06ac4b9e8c983a619bf04842 /source/slang/slang-ir-check-differentiability.cpp | |
| parent | 14fab67c5edd8eb697ffb10dbcc0467678521eef (diff) | |
Support custom backward derivative attribute. (#2594)
Diffstat (limited to 'source/slang/slang-ir-check-differentiability.cpp')
| -rw-r--r-- | source/slang/slang-ir-check-differentiability.cpp | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/source/slang/slang-ir-check-differentiability.cpp b/source/slang/slang-ir-check-differentiability.cpp index 83351d07b..8413e7e79 100644 --- a/source/slang/slang-ir-check-differentiability.cpp +++ b/source/slang/slang-ir-check-differentiability.cpp @@ -71,6 +71,7 @@ public: { case kIROp_ForwardDerivativeDecoration: case kIROp_ForwardDifferentiableDecoration: + case kIROp_UserDefinedBackwardDerivativeDecoration: case kIROp_BackwardDerivativeDecoration: case kIROp_BackwardDifferentiableDecoration: return true; @@ -140,20 +141,6 @@ public: return false; } - bool isBackwardDifferentiableFunc(IRInst* func) - { - for (auto decorations : func->getDecorations()) - { - switch (decorations->getOp()) - { - case kIROp_BackwardDerivativeDecoration: - case kIROp_BackwardDifferentiableDecoration: - return true; - } - } - return false; - } - bool isDifferentiableType(DifferentiableTypeConformanceContext& context, IRInst* typeInst) { HashSet<IRInst*> processedSet; |
