Skip to content

Commit

Permalink
Treating differentiable functions as stores
Browse files Browse the repository at this point in the history
  • Loading branch information
venkataram-nv committed Aug 28, 2024
1 parent 4e22fc2 commit 01e8398
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions source/slang/slang-ir-use-uninitialized-values.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -232,10 +232,13 @@ namespace Slang
IRFuncType* ftype = nullptr;
if (auto spec = as<IRSpecialize>(callee))
ftn = as<IRFunc>(resolveSpecialization(spec));
else if (auto fwd = as<IRForwardDifferentiate>(callee))
ftn = as<IRFunc>(fwd->getBaseFn());
else if (auto rev = as<IRBackwardDifferentiate>(callee))
ftn = as<IRFunc>(rev->getBaseFn());

// Differentiable functions are mostly ignored, treated as having inout parameters
else if (as<IRForwardDifferentiate>(callee))
return Store;
else if (as<IRBackwardDifferentiate>(callee))
return Store;

else if (auto wit = as<IRLookupWitnessMethod>(callee))
ftype = as<IRFuncType>(wit->getFullType());
else
Expand Down

0 comments on commit 01e8398

Please sign in to comment.