[mlir][sparse] Do not access operation after it was replaced (#146546)
Accessing an erased operation will no longer work during a One-Shot Dialect Conversion.
This commit is contained in:
committed by
GitHub
parent
119292c40b
commit
d480359420
@@ -729,9 +729,9 @@ public:
|
||||
createFuncCall(rewriter, loc, name, {},
|
||||
{tensor, lvlCoords, values, filled, added, count},
|
||||
EmitCInterface::On);
|
||||
Operation *parent = getTop(op);
|
||||
rewriter.replaceOp(op, adaptor.getTensor());
|
||||
// Deallocate the buffers on exit of the loop nest.
|
||||
Operation *parent = getTop(op);
|
||||
rewriter.setInsertionPointAfter(parent);
|
||||
rewriter.create<memref::DeallocOp>(loc, values);
|
||||
rewriter.create<memref::DeallocOp>(loc, filled);
|
||||
|
||||
Reference in New Issue
Block a user