Skip to content

Commit

Permalink
refine
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangbo9674 committed Sep 19, 2023
1 parent 4842e62 commit 5de116b
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions paddle/fluid/pir/dialect/op_generator/op_build_gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,13 +145,6 @@ def GenBuildInputArgsStr(
}


def phi_dype_patch(op_class_name, phi_dtype):
rtn = phi_dtype
if op_class_name == "PowOp":
rtn = "paddle::dialect::TransToPhiDataType(x_.type().dyn_cast<paddle::dialect::DenseTensorType>().dtype())"
return rtn


def GenBuildInserFullForMutableAttribute(
op_class_name,
op_attribute_name_list,
Expand Down Expand Up @@ -182,8 +175,6 @@ def GenBuildInserFullForMutableAttribute(
op_mutable_attribute_type_list[idx][1]
]

phi_dtype = phi_dype_patch(op_class_name, phi_dtype)

if attr_type == "paddle::dialect::IntArrayAttribute":
build_mutable_attribute += BUILD_INTARRAY_ATTRIBUTE_TEMPLATE.format(
attr_name=attr_name, phi_dtype=phi_dtype
Expand Down

0 comments on commit 5de116b

Please sign in to comment.