Skip to content

Commit

Permalink
Improve unknown function error messages (#2120)
Browse files Browse the repository at this point in the history
* Improve unknown function error messages

* fix
  • Loading branch information
wsmoses authored Oct 17, 2024
1 parent f643e80 commit a870de9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions enzyme/Enzyme/EnzymeLogic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2320,6 +2320,9 @@ const AugmentedReturn &EnzymeLogic::CreateAugmentedPrimal(
if (EmitNoDerivativeError(ss.str(), todiff, context)) {
auto newFunc = gutils->newFunc;
delete gutils;
IRBuilder<> b(&*newFunc->getEntryBlock().begin());
RequestContext context2{nullptr, &b};
EmitNoDerivativeError(ss.str(), todiff, context2);
return insert_or_assign<AugmentedCacheKey, AugmentedReturn>(
AugmentedCachedFunctions, tup,
AugmentedReturn(newFunc, nullptr, {}, returnMapping, {}, {},
Expand Down Expand Up @@ -4039,6 +4042,9 @@ Function *EnzymeLogic::CreatePrimalAndGradient(
if (EmitNoDerivativeError(ss.str(), key.todiff, context)) {
auto newFunc = gutils->newFunc;
delete gutils;
IRBuilder<> b(&*newFunc->getEntryBlock().begin());
RequestContext context2{nullptr, &b};
EmitNoDerivativeError(ss.str(), key.todiff, context2);
return newFunc;
}
llvm::errs() << "mod: " << *key.todiff->getParent() << "\n";
Expand Down

0 comments on commit a870de9

Please sign in to comment.