diff options
author | Jerry Ge <jerry.ge@arm.com> | 2023-11-09 18:37:53 +0000 |
---|---|---|
committer | Jerry Ge <jerry.ge@arm.com> | 2023-11-15 00:09:24 +0000 |
commit | 546e9990065804f6304a216b42468bf44c8c1036 (patch) | |
tree | 7ff641ff105dd524f4eeddae796b4c5c2702ad13 /src | |
parent | d73f3d7de24048f491a9e02ca50be0f069ef10b1 (diff) | |
download | tosa_mlir_translator-546e9990065804f6304a216b42468bf44c8c1036.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
Diffstat (limited to 'src')
-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 9649644..0fb02eb 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( |