Created by: phlrain
背景
在动态图模式下,OperatorBase在每一个op中,都会被构造和析构,OperatorBase中保存了两个成员变量,VariableNameMap inputs_, outputs_, 这两个成员变量的构造和析构花费了很多时间,大约有30%的c++端的开销。
在后续版本中,input_, output_ 成员变量以及相关的函数 Input(), Output()会被移除。
这个PR改动了MKLDNN相关的部分,想请Intel的人看下改动是否可以。
Background:
In dygraph mode, OperatorBase
will be constructed and destructed in each Op. About 30% time cost on the construction and destruction of VariableNameMap inputs_
and VariableNameMap ouputs_
.
Thus, Input()
/Output()
interface, and input_
/output_
variable will be removed from OperatorBase later.
This PR modify the MKLDNN related codes, @jczaja @jianhang-liu Could you please review it?