Map OneDNN memory::dims object into TensorShape object. This function will simply map input shape in OneDNN memory::dims format in Tensorflow's TensorShape object by preserving dimension order. @input OneDNN memory::dims object @output TensorShape corresponding to memory::dims
| 1160 | /// @input OneDNN memory::dims object |
| 1161 | /// @output TensorShape corresponding to memory::dims |
| 1162 | inline TensorShape MklDnnDimsToTFShape(const memory::dims& dims) { |
| 1163 | std::vector<int32> shape(dims.size(), -1); |
| 1164 | for (int d = 0; d < dims.size(); d++) { |
| 1165 | shape[d] = dims[d]; |
| 1166 | } |
| 1167 | |
| 1168 | TensorShape ret; |
| 1169 | CHECK_EQ(TensorShapeUtils::MakeShape(shape, &ret).ok(), true); |
| 1170 | return ret; |
| 1171 | } |
| 1172 | |
| 1173 | /// Function to calculate strides given tensor shape in Tensorflow order |
| 1174 | /// E.g., if dims_tf_order is {1, 2, 3, 4}, then as per Tensorflow convention, |
no test coverage detected