diff --git a/paddle/fluid/framework/ir/op_compat_sensible_pass.cc b/paddle/fluid/framework/ir/op_compat_sensible_pass.cc index e422a9bae31181d064bd36359ff1ebe38da2cac6..496d06cc331ca72d628f34745f4df0ad95c6f48e 100644 --- a/paddle/fluid/framework/ir/op_compat_sensible_pass.cc +++ b/paddle/fluid/framework/ir/op_compat_sensible_pass.cc @@ -75,9 +75,6 @@ AttrCompat& AttrCompat::IsLeftDefault() { } bool AttrCompat::operator()(const OpDesc& op_desc) { - if (conditions_.empty()) { - return true; - } if (!op_desc.HasAttr(attr_name_)) { if (!optional_) { LOG(WARNING) << "The non-optional Attr(" << attr_name_ << ") of Op ("