Skip to content

Commit

Permalink
fix mem issue
Browse files Browse the repository at this point in the history
  • Loading branch information
wsmoses committed Oct 16, 2023
1 parent a406e3c commit e358c7d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions enzyme/Enzyme/Utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -680,8 +680,8 @@ void callSPMVDiagUpdate(IRBuilder<> &B, Module &M, BlasInfo blas,
auto FDiagUpdateT = FunctionType::get(
B.getVoidTy(),
{BlasCT, BlasIT, BlasFPT, BlasPT, BlasIT, BlasPT, BlasIT, BlasPT}, false);
Function *F = cast<Function>(
M.getOrInsertFunction(fnc_name, FDiagUpdateT).getCallee());
Function *F =
cast<Function>(M.getOrInsertFunction(fnc_name, FDiagUpdateT).getCallee());

if (!F->empty()) {
B.CreateCall(F, args, bundles);
Expand Down
3 changes: 2 additions & 1 deletion enzyme/tools/enzyme-tblgen/blasDiffUseUpdater.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ void emit_BLASDiffUse(TGPattern &pattern, llvm::raw_ostream &os) {

if (hasDiffeRetVal) {
size_t ptrRetArg = typeMap.size();
Twine retarg = "CI->getArgOperand(" + Twine(ptrRetArg) + " + offset)";
auto retarg =
"CI->getArgOperand(" + std::to_string(ptrRetArg) + " + offset)";
os << " if (cublas) {\n";
os << " if (!gutils->isConstantValue(" << retarg << "))\n";
os << " if ((shadow || EnzymeRuntimeActivityCheck) && val == "
Expand Down

0 comments on commit e358c7d

Please sign in to comment.