Question about data layout transform
Created by: luotao1
We are adding MKLDNN data layout support and the design/implementation is on the way.
I have one question as below:
Q: How to define/use GetKernelTypeForVar()
in each OP? Currently it seems that no any OP overload it. Now it's used in framework (i.e. OperatorWithKernel::RunImpl
) to detect whether data transorm is needed as below:
expected_kernel_key = this->GetExpectedKernelType()
for each input var:
kernel_type_for_this_var = this ->GetKernelTypeForVar(var)
if (TranFromNeeded(kernel_type_for_var, expected_kernel_key) {
do transform....
}
This question is from Liu, Brian in Intel.