Map TensorShape object into memory::dims required by OneDNN This function will simply map input TensorShape into OneDNN dims naively. So it will preserve the order of dimensions. E.g., if input tensor is in NHWC format, then dims will be in NHWC format also. @input TensorShape object in shape @return memory::dims corresponding to TensorShape
| 1070 | /// @input TensorShape object in shape |
| 1071 | /// @return memory::dims corresponding to TensorShape |
| 1072 | inline memory::dims TFShapeToMklDnnDims(const TensorShape& shape) { |
| 1073 | memory::dims dims(shape.dims()); |
| 1074 | for (int d = 0; d < shape.dims(); ++d) { |
| 1075 | dims[d] = shape.dim_size(d); |
| 1076 | } |
| 1077 | return dims; |
| 1078 | } |
| 1079 | |
| 1080 | /// Map TensorShape object into memory::dims in NCHW format required by OneDNN |
| 1081 | /// |
no test coverage detected