Helper function to create memory descriptor in Blocked format @input: Tensor dimensions @input: strides corresponding to dimensions. One can use utility function such as CalculateTFStrides to compute strides for given dimensions. @return: memory::desc object corresponding to blocked memory format for given dimensions and strides.
| 1322 | /// @return: memory::desc object corresponding to blocked memory format |
| 1323 | /// for given dimensions and strides. |
| 1324 | static inline memory::desc CreateBlockedMemDesc(const memory::dims& dim, |
| 1325 | const memory::dims& strides) { |
| 1326 | dnnl_memory_desc_t blocked_md; |
| 1327 | TF_CHECK_OK( |
| 1328 | CreateBlockedMemDescHelper(dim, strides, MklDnnType<T>(), &blocked_md)); |
| 1329 | return memory::desc(blocked_md); |
| 1330 | } |
| 1331 | |
| 1332 | /// A version of SetUsrMem call that allows user to create memory in blocked |
| 1333 | /// format. So in addition to accepting dimensions, it also accepts strides. |
nothing calls this directly
no test coverage detected