[Mlir-commits] [mlir] [TOSA] Add StatefulOps to TOSA Dialect (PR #66843)
Mehdi Amini
llvmlistbot at llvm.org
Tue Sep 19 22:43:40 PDT 2023
================
@@ -398,8 +404,12 @@ struct TosaValidation : public tosa::impl::TosaValidationBase<TosaValidation> {
}
}
+ bool CheckVariable(Operation *op);
+ bool CheckVariableReadOrWrite(Operation *op);
+
SmallVector<std::function<LogicalResult(Operation *)>> const_checkers;
tosa_level_t tosa_level;
+ std::unordered_map<std::string, mlir::Type> variables_map;
----------------
joker-eph wrote:
Use an Attribute as key: we'll save many copies and get more efficient hashing.
Also use a DenseMap unless you have some very specific iterator invalidation concerns, in which case you should document it.
https://github.com/llvm/llvm-project/pull/66843
More information about the Mlir-commits
mailing list