[Mlir-commits] [mlir] [TOSA] Add StatefulOps to TOSA Dialect (PR #66843)

Tai Ly llvmlistbot at llvm.org
Fri Sep 22 09:15:28 PDT 2023


================
@@ -427,6 +437,83 @@ LogicalResult TosaValidation::applyLevelCheck(Operation *op) {
   return success();
 }
 
+inline bool CompatibleTypes(const mlir::Type &type,
+                            const mlir::Type &declared_type) {
+  // for now, simply use type equality comparison
+  return type == declared_type;
+}
+
+bool TosaValidation::CheckVariable(Operation *op) {
+  if (isa<mlir::tosa::VariableOp>(op)) {
+    auto name_attr = dyn_cast<mlir::StringAttr>(op->getAttr("name"));
+    if (!name_attr) {
+      op->emitOpError() << "Name attribute is not StringAttr";
----------------
Tai78641 wrote:

removed

https://github.com/llvm/llvm-project/pull/66843


More information about the Mlir-commits mailing list