未验证 提交 77a5b8b0 编写于 作者: 王明冬 提交者: GitHub

fix some errors about pass enhance, test=develop (#33993)

上级 0914ff97
...@@ -91,7 +91,8 @@ ConvElementwiseAdd2ActFusePass::ConvElementwiseAdd2ActFusePass() { ...@@ -91,7 +91,8 @@ ConvElementwiseAdd2ActFusePass::ConvElementwiseAdd2ActFusePass() {
.End() .End()
.AddAttr("axis") .AddAttr("axis")
// the first elementwise_add-axis needs to be 1, the second has to be -1 // the first elementwise_add-axis needs to be 1, the second has to be -1
.IsIntIn({1, -1}) // or 0
.IsIntIn({1, -1, 0})
.End(); .End();
AddOpCompat(OpCompat("relu")) AddOpCompat(OpCompat("relu"))
......
...@@ -70,7 +70,7 @@ ConvBiasFusePass::ConvBiasFusePass() { ...@@ -70,7 +70,7 @@ ConvBiasFusePass::ConvBiasFusePass() {
.IsTensor() .IsTensor()
.End() .End()
.AddAttr("axis") .AddAttr("axis")
.IsNumEQ(-1) .IsIntIn({-1, 0})
.End(); .End();
} }
......
...@@ -436,7 +436,7 @@ SquaredMatSubFusePass::SquaredMatSubFusePass() { ...@@ -436,7 +436,7 @@ SquaredMatSubFusePass::SquaredMatSubFusePass() {
.IsTensor() .IsTensor()
.End() .End()
.AddAttr("axis") .AddAttr("axis")
.IsNumEQ(-1) .IsIntIn({-1, 0})
.End(); .End();
AddOpCompat(OpCompat("elementwise_mul")) AddOpCompat(OpCompat("elementwise_mul"))
...@@ -450,7 +450,7 @@ SquaredMatSubFusePass::SquaredMatSubFusePass() { ...@@ -450,7 +450,7 @@ SquaredMatSubFusePass::SquaredMatSubFusePass() {
.IsTensor() .IsTensor()
.End() .End()
.AddAttr("axis") .AddAttr("axis")
.IsNumEQ(-1) .IsIntIn({-1, 0})
.End(); .End();
AddOpCompat(OpCompat("fill_constant")) AddOpCompat(OpCompat("fill_constant"))
......
...@@ -46,10 +46,6 @@ extra { ...@@ -46,10 +46,6 @@ extra {
name: "@ENABLE_CACHE_RUNTIME_CONTEXT@" name: "@ENABLE_CACHE_RUNTIME_CONTEXT@"
type: BOOLEAN type: BOOLEAN
} }
attrs {
name: "@ENABLE_CACHE_RUNTIME_CONTEXT@"
type: BOOLEAN
}
attrs { attrs {
name: "is_test" name: "is_test"
type: BOOLEAN type: BOOLEAN
......
...@@ -12,6 +12,10 @@ extra { ...@@ -12,6 +12,10 @@ extra {
name: "@ENABLE_CACHE_RUNTIME_CONTEXT@" name: "@ENABLE_CACHE_RUNTIME_CONTEXT@"
type: BOOLEAN type: BOOLEAN
} }
attrs {
name: "X0_threshold"
type: FLOAT
}
attrs { attrs {
name: "out_threshold" name: "out_threshold"
type: FLOAT type: FLOAT
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册