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

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

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