Skip to content

Commit

Permalink
Remove .1 from FXOutputName so it matches the fx graph node name
Browse files Browse the repository at this point in the history
  • Loading branch information
mgehre-amd committed Jul 28, 2023
1 parent 364dd51 commit 57ed408
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,11 @@ void NodeImporter::importNode(Node *node, MlirBlock appendToBlock,

auto addFxOutputNameAttr = [&](MlirOperation& operation) {
if (output && output->hasDebugName()) {
auto strAttr = mlirStringAttrGet(context, toMlirStringRef(output->debugName()));
std::string name = output->debugName();
size_t len = name.size();
if (len > 2 && name[len-2] == '.' && name[len-1] == '1')
name = name.substr(0, len-2);
auto strAttr = mlirStringAttrGet(context, toMlirStringRef(name));
mlirOperationSetAttributeByName(operation, toMlirStringRef("FXOutputName"), strAttr);
}
};
Expand Down

0 comments on commit 57ed408

Please sign in to comment.