Skip to content

Commit daf6fcd

Browse files
authored
fix custom (#74919)
1 parent 6377ab9 commit daf6fcd

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

paddle/fluid/framework/custom_operator.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1283,11 +1283,11 @@ RegisterOperatorWithMetaInfoMap(const paddle::OpMetaInfoMap& op_meta_info_map,
12831283
std::unordered_map<std::string, std::vector<OpMetaInfo>> diff_map;
12841284
for (auto& pair : meta_info_map) {
12851285
VLOG(3) << "Custom Operator: pair first -> op name: " << pair.first;
1286-
1287-
// Register PIR op
1288-
1286+
auto& inplace_map = OpMetaInfoHelper::GetInplaceMap(pair.second[0]);
1287+
auto postfix = inplace_map.empty() ? "" : "_";
1288+
// Custom dialect register
12891289
if (custom_dialect->HasRegistered(paddle::framework::kCustomDialectPrefix +
1290-
pair.first)) {
1290+
pair.first + postfix)) {
12911291
VLOG(3) << "The operator `" << pair.first
12921292
<< "` has been registered. "
12931293
"Therefore, we will not repeat the registration here.";

0 commit comments

Comments
 (0)