From ec6d5efe5943529431b7901bbcdcda601e662f54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E6=98=8E=E5=86=AC?= <78149749+winter-wang@users.noreply.github.com> Date: Wed, 16 Jun 2021 10:24:33 +0800 Subject: [PATCH] enhance the attribute constraint for pass,test=develop (#33568) --- paddle/fluid/framework/ir/op_compat_sensible_pass.cc | 3 --- 1 file changed, 3 deletions(-) diff --git a/paddle/fluid/framework/ir/op_compat_sensible_pass.cc b/paddle/fluid/framework/ir/op_compat_sensible_pass.cc index e422a9bae31..496d06cc331 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 (" -- GitLab