#include "src/Accelerators/PIM/Conversion/SpatialToPim/PhaseVerification.hpp" #include "src/Accelerators/PIM/Dialect/Spatial/SpatialOps.hpp" using namespace mlir; namespace onnx_mlir { LogicalResult verifySpatialToPimBoundary(ModuleOp moduleOp) { bool hasFailure = false; moduleOp.walk([&](Operation* op) { if (op->getDialect()->getNamespace() != "spat") return; op->emitError("illegal Spatial operation remains after Spatial-to-PIM lowering"); hasFailure = true; }); return success(!hasFailure); } } // namespace onnx_mlir