Publishing 2019 R1 content
[platform/upstream/dldt.git] / inference-engine / src / mkldnn_plugin / mkldnn_extension_utils.h
1 // Copyright (C) 2018-2019 Intel Corporation
2 // SPDX-License-Identifier: Apache-2.0
3 //
4
5 /**
6  * @brief Convinience wrapper class for handling MKL-DNN memory formats.
7  * @file mkldnn_extension_utils.h
8  */
9 #pragma once
10
11 #include <string>
12
13 #include "mkldnn.hpp"
14 #include "inference_engine.hpp"
15 #include "mkldnn_memory.h"
16
17 namespace MKLDNNPlugin {
18
19 class MKLDNNExtensionUtils {
20 public:
21     static uint8_t sizeOfDataType(mkldnn::memory::data_type dataType);
22     static mkldnn::memory::data_type IEPrecisionToDataType(InferenceEngine::Precision prec);
23     static InferenceEngine::Precision DataTypeToIEPrecision(mkldnn::memory::data_type dataType);
24     static InferenceEngine::TensorDesc getUninitTensorDesc(const InferenceEngine::TensorDesc& desc);
25     static bool initTensorsAreEqual(InferenceEngine::TensorDesc desc1, InferenceEngine::TensorDesc desc2);
26 };
27
28 }  // namespace MKLDNNPlugin