File tree Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -49,11 +49,13 @@ static constexpr bool CanInplaceAct() {
4949 " operator, a Tensor with shape same as input." ); \
5050 AddAttr<bool >(" use_mkldnn" , \
5151 " (bool, default false) Only used in mkldnn kernel" ) \
52- .SetDefault (false ); \
52+ .SetDefault (false ) \
53+ .AsExtra (); \
5354 AddAttr<bool >(" use_cudnn" , \
5455 " (bool, default false) Only used in cudnn kernel, need " \
5556 " install cudnn" ) \
56- .SetDefault (false ); \
57+ .SetDefault (false ) \
58+ .AsExtra (); \
5759 AddComment (OP_COMMENT); \
5860 } \
5961 }
Original file line number Diff line number Diff line change @@ -108,16 +108,19 @@ class GeluOpMaker : public framework::OpProtoAndCheckerMaker {
108108 .SetDefault (false );
109109 AddAttr<bool >(" use_mkldnn" ,
110110 " (bool, default false) Only used in mkldnn kernel" )
111- .SetDefault (false );
111+ .SetDefault (false )
112+ .AsExtra ();
112113 AddAttr<std::string>(
113114 " mkldnn_data_type" ,
114115 " (string, default \" float32\" ). Data type of mkldnn kernel" )
115116 .SetDefault (" float32" )
116- .InEnum ({" float32" , " int8" , " bfloat16" });
117+ .InEnum ({" float32" , " int8" , " bfloat16" })
118+ .AsExtra ();
117119 AddAttr<bool >(" use_cudnn" ,
118120 " (bool, default false) Only used in cudnn kernel, need "
119121 " install cudnn" )
120- .SetDefault (false );
122+ .SetDefault (false )
123+ .AsExtra ();
121124 AddComment (R"DOC(
122125Gelu Activation Operator.
123126
You can’t perform that action at this time.
0 commit comments