Skip to content

Commit

Permalink
try debugging integration failure (#1949)
Browse files Browse the repository at this point in the history
* try debugging integration failure

* Update blas-tblgen.cpp

* fix
  • Loading branch information
wsmoses authored Jun 29, 2024
1 parent beabd80 commit ec1284a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion enzyme/tools/enzyme-tblgen/blas-tblgen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1105,7 +1105,7 @@ void rev_call_arg(bool forward, DagInit *ruleDag, const TGPattern &pattern,
<< " }\n\n";
os << " auto cubcall = cast<CallInst>(Builder2.CreateCall(derivcall_"
<< dfnc_name << ", marg, Defs));\n";
os << " ArrayRef<Value*>(cublasv2 ? "
os << " SmallVector<Value*, 1>(1, cublasv2 ? "
<< " (Value*)Builder2.CreateLoad(fpType, marg[marg.size()-1]) : "
"(Value*)cubcall);\n";
os << " })\n";
Expand Down Expand Up @@ -1739,7 +1739,10 @@ void emit_dag(bool forward, Twine resultVarName, DagInit *ruleDag,

rev_call_arg(forward, ruleDag, pattern, 1, os, vars);
os << ") subdenomar.push_back(item);\n";
os << " assert(subdenomar.size() == 1);\n";
os << " subdenom = subdenomar[0];\n";
os << " assert(subnum);\n";
os << " assert(subdenom);\n";
os << resultVarName << " = Builder2.CreateFDiv(subnum, subdenom);\n";
os << " } else " << resultVarName
<< " = ConstantFP::get(fpType, 0.0);\n";
Expand Down

0 comments on commit ec1284a

Please sign in to comment.