未验证 提交 2006fbc4 编写于 作者: Z zhupengyang 提交者: GitHub

gelu/logsigmoid add AsExtra (#35198)

上级 ad522483
......@@ -49,11 +49,13 @@ static constexpr bool CanInplaceAct() {
" operator, a Tensor with shape same as input."); \
AddAttr<bool>("use_mkldnn", \
"(bool, default false) Only used in mkldnn kernel") \
.SetDefault(false); \
.SetDefault(false) \
.AsExtra(); \
AddAttr<bool>("use_cudnn", \
"(bool, default false) Only used in cudnn kernel, need " \
"install cudnn") \
.SetDefault(false); \
.SetDefault(false) \
.AsExtra(); \
AddComment(OP_COMMENT); \
} \
}
......
......@@ -108,16 +108,19 @@ class GeluOpMaker : public framework::OpProtoAndCheckerMaker {
.SetDefault(false);
AddAttr<bool>("use_mkldnn",
"(bool, default false) Only used in mkldnn kernel")
.SetDefault(false);
.SetDefault(false)
.AsExtra();
AddAttr<std::string>(
"mkldnn_data_type",
"(string, default \"float32\"). Data type of mkldnn kernel")
.SetDefault("float32")
.InEnum({"float32", "int8", "bfloat16"});
.InEnum({"float32", "int8", "bfloat16"})
.AsExtra();
AddAttr<bool>("use_cudnn",
"(bool, default false) Only used in cudnn kernel, need "
"install cudnn")
.SetDefault(false);
.SetDefault(false)
.AsExtra();
AddComment(R"DOC(
Gelu Activation Operator.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册