diff --git a/paddle/fluid/pir/dialect/op_generator/op_build_gen.py b/paddle/fluid/pir/dialect/op_generator/op_build_gen.py index 808dd5a3651e9..681afad506148 100644 --- a/paddle/fluid/pir/dialect/op_generator/op_build_gen.py +++ b/paddle/fluid/pir/dialect/op_generator/op_build_gen.py @@ -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().dtype())" - return rtn - - def GenBuildInserFullForMutableAttribute( op_class_name, op_attribute_name_list, @@ -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