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

Method SetOpMemDesc

tensorflow/core/util/mkl_util.h:1429–1432  ·  view source on GitHub ↗

Set memory descriptor of an operation in terms of dimensions and memory format. E.g., For Conv2D, the dimensions would be same as user dimensions but memory::format_tag would be dnnl::any because we want OneDNN to choose the best layout/format for given input dimensions.

Source from the content-addressed store, hash-verified

1427 /// but memory::format_tag would be dnnl::any because we want OneDNN to
1428 /// choose the best layout/format for given input dimensions.
1429 inline void SetOpMemDesc(const memory::dims& dim, memory::format_tag fm) {
1430 // TODO(nhasabni): can we remove dynamic memory allocation?
1431 op_md_ = new memory::desc(dim, MklDnnType<T>(), fm);
1432 }
1433
1434 /// Get function for memory descriptor for an operation
1435 inline const memory::desc& GetOpMemDesc() const { return *op_md_; }

Callers 4

ComputeMethod · 0.80
ComputeMethod · 0.80
ConfigureInputMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected