[ci-skip][IE MKLDNN] Add Precision U16 in MKLDNN (#783)
authorAnton Zaytsev <anton.zaytsev@intel.com>
Tue, 9 Jun 2020 11:20:43 +0000 (14:20 +0300)
committerGitHub <noreply@github.com>
Tue, 9 Jun 2020 11:20:43 +0000 (14:20 +0300)
inference-engine/src/legacy_api/src/net_pass.cpp
inference-engine/src/mkldnn_plugin/mkldnn_exec_network.cpp

index 77c972cfe2176efcb0d664a1e3d5f01e94ac52f9..31e9da9d1375d3b95a18e1167ab1aa2560686101 100644 (file)
@@ -1420,6 +1420,9 @@ void ConvertPrecision(ICNNNetwork& net, Precision from, Precision to) {
         case getPrecisionMask(Precision::U8, Precision::I32):
             convertPrecisionForAll<Precision::U8, Precision::I32>(net);
             break;
+        case getPrecisionMask(Precision::U16, Precision::I32):
+            convertPrecisionForAll<Precision::U16, Precision::I32>(net);
+            break;
         default:
             THROW_IE_EXCEPTION << "Precision conversion from " << from << " to " << to
                                << " currently is not supported. You may expand precision"
index 6cd77155e0fa0fa9a6e24cdffc3155f5262f4632..b8f0cec4c1ee30b9cbdc08bbe52e0dd740a3c3e0 100644 (file)
@@ -64,6 +64,7 @@ MKLDNNExecNetwork::MKLDNNExecNetwork(const InferenceEngine::ICNNNetwork &network
     NetPass::ConvertPrecision(*_clonedNetwork, Precision::U64, Precision::I32);
     NetPass::ConvertPrecision(*_clonedNetwork, Precision::FP16, Precision::FP32);
     NetPass::ConvertPrecision(*_clonedNetwork, Precision::BOOL, Precision::U8);
+    NetPass::ConvertPrecision(*_clonedNetwork, Precision::U16, Precision::I32);
 
     if (s == StatusCode::OK && pstats && !pstats->isEmpty()) {
         CNNNetworkInt8Normalizer cnnorm;