MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / CreateBlockedMemDesc

Method CreateBlockedMemDesc

tensorflow/core/util/mkl_util.h:1324–1330  ·  view source on GitHub ↗

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.

Source from the content-addressed store, hash-verified

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.

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected