909c4acfdd
Validate Operations / validate-operations (push) Has been cancelled
remove Spatial many ops in favor of tensor ops like in pim
21 lines
555 B
C++
21 lines
555 B
C++
#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
|