diff options
author | Jerry Ge <jerry.ge@arm.com> | 2023-11-09 18:37:53 +0000 |
---|---|---|
committer | Eric Kunze <eric.kunze@arm.com> | 2023-11-28 17:14:42 -0800 |
commit | b0a4af50f2050080ea3f5467647ee3fd370ed62a (patch) | |
tree | d883daa91db2147b1f057a2023674fd6cce8da3c | |
parent | e895727a68da55439534a5ebf8663883259d8788 (diff) | |
download | tosa_mlir_translator-b0a4af50f2050080ea3f5467647ee3fd370ed62a.tar.gz |
Update CustomOp's attribute name
- CustomOp's two attribute names have been changed to
- domain to domain_name
- operator to operator_name
Signed-off-by: Jerry Ge <jerry.ge@arm.com>
Change-Id: Ib9d032ed9c1a25e3740d9fc8e854369a71736329
-rw-r--r-- | src/TosaDeserialize.cpp | 6 | ||||
-rw-r--r-- | src/TosaSerialize.cpp | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/TosaDeserialize.cpp b/src/TosaDeserialize.cpp index 437ee3f..1291663 100644 --- a/src/TosaDeserialize.cpp +++ b/src/TosaDeserialize.cpp @@ -1255,8 +1255,8 @@ TosaMlirOperatorBuilder::build<Op_CUSTOM>(TosaSerializationOperator *op) const { TosaCustomAttribute *attr = static_cast<TosaCustomAttribute *>(op->GetAttribute()); - auto identifier = op_builder->getStringAttr(attr->identifier()); - auto config = op_builder->getStringAttr(attr->config()); + auto operator_name = op_builder->getStringAttr(attr->operator_name()); + auto domain_name = op_builder->getStringAttr(attr->domain_name()); std::string impl_str; impl_str.resize(attr->implementation_attrs().size() + 1); int idx = 0; @@ -1266,7 +1266,7 @@ TosaMlirOperatorBuilder::build<Op_CUSTOM>(TosaSerializationOperator *op) const { auto impl = op_builder->getStringAttr(impl_str); mlir::Operation *mlir_op = op_builder->create<mlir::tosa::CustomOp>( - loc, output_type, identifier, config, impl, input_val); + loc, output_type, operator_name, domain_name, impl, input_val); block->push_back(mlir_op); return std::vector<mlir::Value>({mlir_op->getResult(0)}); } diff --git a/src/TosaSerialize.cpp b/src/TosaSerialize.cpp index a131117..9807a99 100644 --- a/src/TosaSerialize.cpp +++ b/src/TosaSerialize.cpp @@ -1450,8 +1450,8 @@ TosaSerializationOperatorBuilder::build<mlir::tosa::CustomOp>( std::vector<uint8_t> attrs_data(implementation_attrs.size()); memcpy(attrs_data.data(), implementation_attrs.data(), attrs_data.size()); TosaCustomAttribute attribute( - op.getAttr("identifier").cast<mlir::StringAttr>().getValue().str(), - op.getAttr("config").cast<mlir::StringAttr>().getValue().str(), + op.getAttr("operator_name").cast<mlir::StringAttr>().getValue().str(), + op.getAttr("domain_name").cast<mlir::StringAttr>().getValue().str(), attrs_data); TosaSerializationOperator *tyop = new TosaSerializationOperator( |