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.
| 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_; } |
no outgoing calls
no test coverage detected