Skip to content

Commit

Permalink
Add debug info for binary lowering
Browse files Browse the repository at this point in the history
  • Loading branch information
wsmoses committed Jan 9, 2025
1 parent aa23e9f commit 058fa1e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/enzyme_ad/jax/Passes/LowerKernel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -561,7 +561,7 @@ CallInfo CompileKernel(SymbolTableCollection &symbolTable, mlir::Location loc,
builder.getStringAttr(value + '\0'));
}

LLVM::GlobalOp binary;
LLVM::GlobalOp binary = nullptr;
submod.walk([&](gpu::BinaryOp op) {
gpu::ObjectAttr object = getSelectedObject(op);
auto value = object.getObject().getValue();
Expand All @@ -583,6 +583,11 @@ CallInfo CompileKernel(SymbolTableCollection &symbolTable, mlir::Location loc,
builder.getContext(), mlir::LLVM::UnnamedAddr::None));
op.erase();
});
if (!binary) {
llvm::errs() << "could not find binary object in submod:\n"
<< *submod << "\n";
assert(binary);
}

{
auto blk = new Block();
Expand Down

0 comments on commit 058fa1e

Please sign in to comment.