From 6c67c3ac8cfea28e60a160bb7849be7750f7ff7b Mon Sep 17 00:00:00 2001 From: Ratnesh Kumar Rai Date: Fri, 21 Jul 2023 14:19:00 +0530 Subject: [PATCH] Fix CTS not able to run to completion Tracked-On: OAM-111034 Signed-off-by: Ratnesh Kumar Rai Signed-off-by: Anoob Anto K --- ...ity-changes-to-build-nn-hal-for-Andr.patch | 67 ++ ...rashes-observed-during-VTS-execution.patch | 130 +++ ...Fixed-CTS-not-able-to-run-completely.patch | 885 ++++++++++++++++++ 3 files changed, 1082 insertions(+) create mode 100644 bsp_diff/cic_cloud/vendor/intel/external/project-celadon/nn-hal/0001-PATCH-Compatibility-changes-to-build-nn-hal-for-Andr.patch create mode 100644 bsp_diff/cic_cloud/vendor/intel/external/project-celadon/nn-hal/0002-Fix-crashes-observed-during-VTS-execution.patch create mode 100644 bsp_diff/cic_cloud/vendor/intel/external/project-celadon/nn-hal/0003-Fixed-CTS-not-able-to-run-completely.patch diff --git a/bsp_diff/cic_cloud/vendor/intel/external/project-celadon/nn-hal/0001-PATCH-Compatibility-changes-to-build-nn-hal-for-Andr.patch b/bsp_diff/cic_cloud/vendor/intel/external/project-celadon/nn-hal/0001-PATCH-Compatibility-changes-to-build-nn-hal-for-Andr.patch new file mode 100644 index 0000000000..f3951edd3d --- /dev/null +++ b/bsp_diff/cic_cloud/vendor/intel/external/project-celadon/nn-hal/0001-PATCH-Compatibility-changes-to-build-nn-hal-for-Andr.patch @@ -0,0 +1,67 @@ +From 7686cb9d5a401335f66510576d007ddeaec6484f Mon Sep 17 00:00:00 2001 +From: Ratnesh Kumar Rai +Date: Tue, 28 Feb 2023 08:40:00 +0530 +Subject: [PATCH] [PATCH] Compatibility changes to build nn-hal for Android R + +Tracked-On: OAM-105850 +Change-Id: If1a47acb071cd4cf8e3ba04218edc69e6261c731 +Signed-off-by: Anoob Anto K +Signed-off-by: Ratnesh Kumar Rai +Signed-off-by: Jaikrishna, Nemallapudi +--- + Android.bp | 10 +++------- + ngraph_creator/Android.bp | 3 --- + 2 files changed, 3 insertions(+), 10 deletions(-) + +diff --git a/Android.bp b/Android.bp +index c4d8070..35e1f6a 100644 +--- a/Android.bp ++++ b/Android.bp +@@ -21,9 +21,7 @@ cc_library_shared { + ], + + include_dirs: [ +- "packages/modules/NeuralNetworks/common/include", +- "packages/modules/NeuralNetworks/common/types/include", +- "packages/modules/NeuralNetworks/runtime/include", ++ "frameworks/ml/nn/runtime/include/", + "frameworks/native/libs/nativewindow/include", + "external/mesa3d/include/android_stub", + "external/grpc-grpc", +@@ -168,9 +166,8 @@ cc_binary { + srcs: ["service.cpp"], + + include_dirs: [ +- "packages/modules/NeuralNetworks/common/include", +- "packages/modules/NeuralNetworks/common/types/include", +- "packages/modules/NeuralNetworks/runtime/include", ++ "frameworks/ml/nn/common/include", ++ "frameworks/ml/nn/runtime/include/", + "frameworks/native/libs/nativewindow/include", + "external/mesa3d/include/android_stub", + ], +@@ -186,7 +183,6 @@ cc_binary { + + shared_libs: [ + "libhidlbase", +- "libhidltransport", + "libhidlmemory", + "libutils", + "liblog", +diff --git a/ngraph_creator/Android.bp b/ngraph_creator/Android.bp +index 3199dee..74b3b23 100755 +--- a/ngraph_creator/Android.bp ++++ b/ngraph_creator/Android.bp +@@ -100,9 +100,6 @@ cc_library_static { + ], + + include_dirs: [ +- "packages/modules/NeuralNetworks/common/include", +- "packages/modules/NeuralNetworks/common/types/include", +- "packages/modules/NeuralNetworks/runtime/include", + "external/mesa3d/include/android_stub", + ], + +-- +2.17.1 + diff --git a/bsp_diff/cic_cloud/vendor/intel/external/project-celadon/nn-hal/0002-Fix-crashes-observed-during-VTS-execution.patch b/bsp_diff/cic_cloud/vendor/intel/external/project-celadon/nn-hal/0002-Fix-crashes-observed-during-VTS-execution.patch new file mode 100644 index 0000000000..69bd6ec18f --- /dev/null +++ b/bsp_diff/cic_cloud/vendor/intel/external/project-celadon/nn-hal/0002-Fix-crashes-observed-during-VTS-execution.patch @@ -0,0 +1,130 @@ +From 333c01280de84e5de8328160c1b4ecb922d10849 Mon Sep 17 00:00:00 2001 +From: Anoob Anto K +Date: Wed, 19 Jul 2023 09:26:41 +0000 +Subject: [PATCH] Fix crashes observed during VTS execution + +Fixed the following: +- Call loadNetwork for all execute APIs +- Check the status of fetching output after remote inference +- Return INVALID_ARGUMENT for failures in setting PoolInfos + +Tracked-On: OAM-111268 +Signed-off-by: Anoob Anto K +--- + BasePreparedModel.cpp | 28 +++++++++++++++++++++++++--- + DetectionClient.cpp | 6 ++++-- + DetectionClient.h | 2 +- + 3 files changed, 30 insertions(+), 6 deletions(-) + +diff --git a/BasePreparedModel.cpp b/BasePreparedModel.cpp +index a88f782..24a1a48 100644 +--- a/BasePreparedModel.cpp ++++ b/BasePreparedModel.cpp +@@ -304,6 +304,10 @@ void asyncExecute(const Request& request, MeasureTiming measure, BasePreparedMod + + ov::Tensor destTensor; + try { ++ if (!plugin->queryState()) { ++ ALOGI("%s native model not loaded, starting model load", __func__); ++ plugin->loadNetwork(preparedModel->mXmlFile); ++ } + destTensor = plugin->getInputTensor(tensorIndex); + } catch (const std::exception& ex) { + ALOGE("%s Exception !!! %s", __func__, ex.what()); +@@ -494,7 +498,7 @@ static std::tuple, Timing> executeSynch + auto errorStatus = modelInfo->setRunTimePoolInfosFromHidlMemories(request.pools); + if (errorStatus != V1_3::ErrorStatus::NONE) { + ALOGE("Failed to set runtime pool info from HIDL memories"); +- return {ErrorStatus::GENERAL_FAILURE, {}, kNoTiming}; ++ return {ErrorStatus::INVALID_ARGUMENT, {}, kNoTiming}; + } + + for (size_t i = 0; i < request.inputs.size(); i++) { +@@ -532,7 +536,7 @@ static std::tuple, Timing> executeSynch + ov::Tensor destTensor; + try { + if (!plugin->queryState()) { +- ALOGI("native model not loaded, starting model load"); ++ ALOGI("%s native model not loaded, starting model load", __func__); + plugin->loadNetwork(preparedModel->mXmlFile); + } + destTensor = plugin->getInputTensor(tensorIndex); +@@ -613,8 +617,22 @@ static std::tuple, Timing> executeSynch + void* destPtr = modelInfo->getBlobFromMemoryPoolOut(request, i, expectedLength); + if (preparedModel->mRemoteCheck && preparedModel->mDetectionClient && + preparedModel->mDetectionClient->get_status()) { +- preparedModel->mDetectionClient->get_output_data(std::to_string(i), (uint8_t*)destPtr, ++ const auto& copied = preparedModel->mDetectionClient->get_output_data(std::to_string(i), (uint8_t*)destPtr, + expectedLength); ++ if ( copied == 0 ) { ++ ALOGE("Output not populated"); ++ return {ErrorStatus::GENERAL_FAILURE, {}, kNoTiming}; ++ } else if ( copied != expectedLength ) { ++ const auto& opDims = modelInfo->getOperand(outIndex).dimensions; ++ std::vector dims; ++ for ( const auto& dim : opDims ) { dims.push_back(dim); } ++ modelInfo->updateOutputshapes(i, dims, false); ++ ALOGE( ++ "Mismatch in actual and exepcted output sizes. Return with " ++ "OUTPUT_INSUFFICIENT_SIZE error"); ++ return {ErrorStatus::OUTPUT_INSUFFICIENT_SIZE, modelInfo->getOutputShapes(), ++ kNoTiming}; ++ } + } else { + try { + srcTensor = plugin->getOutputTensor(tensorIndex); +@@ -856,6 +874,10 @@ Return BasePreparedModel::executeFenced(const V1_3::Request& request1_3, + + ov::Tensor destTensor; + try { ++ if (!mPlugin->queryState()) { ++ ALOGI("%s native model not loaded, starting model load", __func__); ++ mPlugin->loadNetwork(mXmlFile); ++ } + destTensor = mPlugin->getInputTensor(tensorIndex); + } catch (const std::exception& ex) { + ALOGE("%s Exception !!! %s", __func__, ex.what()); +diff --git a/DetectionClient.cpp b/DetectionClient.cpp +index 751c0eb..8c3e7f0 100644 +--- a/DetectionClient.cpp ++++ b/DetectionClient.cpp +@@ -172,7 +172,7 @@ void DetectionClient::add_input_data(std::string label, const uint8_t* buffer, + input->set_data(buffer, size); + } + +-void DetectionClient::get_output_data(std::string label, uint8_t* buffer, uint32_t expectedLength) { ++size_t DetectionClient::get_output_data(std::string label, uint8_t* buffer, uint32_t expectedLength) { + std::string src; + size_t index; + +@@ -182,11 +182,13 @@ void DetectionClient::get_output_data(std::string label, uint8_t* buffer, uint32 + if (expectedLength != src.length()) { + ALOGE("Length mismatch error: expected length %u , actual length %lu", + expectedLength, src.length()); ++ return src.length(); + } + memcpy(buffer, src.data(), src.length()); +- break; ++ return src.length(); + } + } ++ return 0; + } + + void DetectionClient::clear_data() { +diff --git a/DetectionClient.h b/DetectionClient.h +index c812950..d0b0789 100644 +--- a/DetectionClient.h ++++ b/DetectionClient.h +@@ -40,7 +40,7 @@ public: + void add_input_data(std::string label, const uint8_t* buffer, std::vector shape, + uint32_t size, + android::hardware::neuralnetworks::nnhal::OperandType operandType); +- void get_output_data(std::string label, uint8_t* buffer, uint32_t expectedLength); ++ size_t get_output_data(std::string label, uint8_t* buffer, uint32_t expectedLength); + void clear_data(); + std::string remote_infer(); + bool get_status(); +-- +2.17.1 + diff --git a/bsp_diff/cic_cloud/vendor/intel/external/project-celadon/nn-hal/0003-Fixed-CTS-not-able-to-run-completely.patch b/bsp_diff/cic_cloud/vendor/intel/external/project-celadon/nn-hal/0003-Fixed-CTS-not-able-to-run-completely.patch new file mode 100644 index 0000000000..463be78363 --- /dev/null +++ b/bsp_diff/cic_cloud/vendor/intel/external/project-celadon/nn-hal/0003-Fixed-CTS-not-able-to-run-completely.patch @@ -0,0 +1,885 @@ +From e14d099cad33b73732f3753c2508ddaf8d62e10d Mon Sep 17 00:00:00 2001 +From: Ratnesh Kumar Rai +Date: Fri, 21 Jul 2023 14:03:55 +0530 +Subject: [PATCH] Fixed CTS not able to run completely + +Tracked-On: OAM-111034 +Signed-off-by: Ratnesh Kumar Rai +--- + Driver.cpp | 5 ++-- + .../operations/include/Dequantize.hpp | 1 + + ngraph_creator/operations/include/Div.hpp | 1 + + .../operations/include/L2Pooling2D.hpp | 1 + + ngraph_creator/operations/include/Less.hpp | 1 + + .../operations/include/Logistic.hpp | 1 + + .../operations/include/MaxPool2d.hpp | 1 + + ngraph_creator/operations/include/Mul.hpp | 1 + + .../operations/include/Quantize.hpp | 1 + + .../operations/include/ReduceMin.hpp | 1 + + .../operations/include/ReduceSum.hpp | 1 + + ngraph_creator/operations/include/Relu.hpp | 1 + + ngraph_creator/operations/include/Relu1.hpp | 1 + + ngraph_creator/operations/include/Relu6.hpp | 1 + + ngraph_creator/operations/include/Softmax.hpp | 1 + + ngraph_creator/operations/include/Sub.hpp | 1 + + ngraph_creator/operations/include/Tanh.hpp | 1 + + ngraph_creator/operations/src/Add.cpp | 7 +++++- + .../operations/src/AveragePool2D.cpp | 5 ++++ + ngraph_creator/operations/src/Dequantize.cpp | 10 ++++++++ + ngraph_creator/operations/src/Div.cpp | 9 +++++++ + ngraph_creator/operations/src/L2Pooling2D.cpp | 17 +++++++++++++ + ngraph_creator/operations/src/Less.cpp | 11 +++++++++ + ngraph_creator/operations/src/Logistic.cpp | 17 +++++++++++++ + ngraph_creator/operations/src/MaxPool2d.cpp | 17 +++++++++++++ + ngraph_creator/operations/src/Mul.cpp | 11 +++++++++ + ngraph_creator/operations/src/Quantize.cpp | 10 ++++++++ + ngraph_creator/operations/src/ReduceMin.cpp | 17 +++++++++++++ + ngraph_creator/operations/src/ReduceSum.cpp | 17 +++++++++++++ + ngraph_creator/operations/src/Relu.cpp | 11 +++++++++ + ngraph_creator/operations/src/Relu1.cpp | 11 +++++++++ + ngraph_creator/operations/src/Relu6.cpp | 11 +++++++++ + ngraph_creator/operations/src/Softmax.cpp | 17 +++++++++++++ + .../operations/src/SpaceToBatch.cpp | 5 ++++ + ngraph_creator/operations/src/Squeeze.cpp | 20 ++++++++++++++++ + ngraph_creator/operations/src/Sub.cpp | 10 ++++++++ + ngraph_creator/operations/src/Tanh.cpp | 17 +++++++++++++ + ngraph_creator/operations/src/Transpose.cpp | 24 +++++++++++++++---- + .../operations/src/TransposeConv2D.cpp | 13 ++++++++-- + ngraph_creator/src/OperationsFactory.cpp | 24 +++++++++---------- + utils.h | 2 +- + 41 files changed, 311 insertions(+), 23 deletions(-) + +diff --git a/Driver.cpp b/Driver.cpp +index 6675ede..3384703 100644 +--- a/Driver.cpp ++++ b/Driver.cpp +@@ -236,7 +236,7 @@ Return Driver::getSupportedOperations_1_2(const V1_2_Model& model, + ALOGV("Entering %s", __func__); + + int count = model.operations.size(); +- std::vector supported(count, true); ++ std::vector supported(count, false); + + if (!validateModel(model)) { + ALOGE("NNERR: %s failed at line no: %d\n", __func__, __LINE__); +@@ -365,7 +365,7 @@ Return Driver::getSupportedOperations_1_3(const Model& model, + ALOGV("Entering %s", __func__); + + int count = model.main.operations.size(); +- std::vector supported(count, true); ++ std::vector supported(count, false); + + if (!validateModel(model)) { + ALOGE("NNERR: %s failed at line no: %d\n", __func__, __LINE__); +@@ -402,6 +402,7 @@ Return Driver::prepareModel_1_3( + ALOGI("validatemodel failed"); + return V1_3::ErrorStatus::INVALID_ARGUMENT; + } ++ for (auto& opn : model.main.operations) dumpOperation(opn); + + // TODO: make asynchronous later + sp driverPreparedModel = ModelFactory(mDeviceType, model); +diff --git a/ngraph_creator/operations/include/Dequantize.hpp b/ngraph_creator/operations/include/Dequantize.hpp +index e2a8864..f1f8fa2 100644 +--- a/ngraph_creator/operations/include/Dequantize.hpp ++++ b/ngraph_creator/operations/include/Dequantize.hpp +@@ -11,6 +11,7 @@ class Dequantize : public OperationsBase { + public: + Dequantize(int operationIndex, GraphMetadata graphMetadata); + std::shared_ptr createNode() override; ++ bool validate() override; + }; + + } // namespace nnhal +diff --git a/ngraph_creator/operations/include/Div.hpp b/ngraph_creator/operations/include/Div.hpp +index 8639c0a..db89649 100644 +--- a/ngraph_creator/operations/include/Div.hpp ++++ b/ngraph_creator/operations/include/Div.hpp +@@ -11,6 +11,7 @@ class Div : public OperationsBase { + public: + Div(int operationIndex, GraphMetadata graphMetadata); + std::shared_ptr createNode() override; ++ bool validate() override; + }; + + } // namespace nnhal +diff --git a/ngraph_creator/operations/include/L2Pooling2D.hpp b/ngraph_creator/operations/include/L2Pooling2D.hpp +index 81d525d..2c49e47 100644 +--- a/ngraph_creator/operations/include/L2Pooling2D.hpp ++++ b/ngraph_creator/operations/include/L2Pooling2D.hpp +@@ -11,6 +11,7 @@ class L2Pooling2D : public OperationsBase { + public: + L2Pooling2D(int operationIndex, GraphMetadata graphMetadata); + std::shared_ptr createNode() override; ++ bool validate() override; + }; + + } // namespace nnhal +diff --git a/ngraph_creator/operations/include/Less.hpp b/ngraph_creator/operations/include/Less.hpp +index 8f81811..0c05d0f 100644 +--- a/ngraph_creator/operations/include/Less.hpp ++++ b/ngraph_creator/operations/include/Less.hpp +@@ -11,6 +11,7 @@ class Less : public OperationsBase { + public: + Less(int operationIndex, GraphMetadata graphMetadata); + std::shared_ptr createNode() override; ++ bool validate() override; + }; + + } // namespace nnhal +diff --git a/ngraph_creator/operations/include/Logistic.hpp b/ngraph_creator/operations/include/Logistic.hpp +index 3ae4c54..699775d 100644 +--- a/ngraph_creator/operations/include/Logistic.hpp ++++ b/ngraph_creator/operations/include/Logistic.hpp +@@ -11,6 +11,7 @@ class Logistic : public OperationsBase { + public: + Logistic(int operationIndex, GraphMetadata graphMetadata); + std::shared_ptr createNode() override; ++ bool validate() override; + }; + + } // namespace nnhal +diff --git a/ngraph_creator/operations/include/MaxPool2d.hpp b/ngraph_creator/operations/include/MaxPool2d.hpp +index af4dcb3..e233174 100644 +--- a/ngraph_creator/operations/include/MaxPool2d.hpp ++++ b/ngraph_creator/operations/include/MaxPool2d.hpp +@@ -11,6 +11,7 @@ class MaxPool2d : public OperationsBase { + public: + MaxPool2d(int operationIndex, GraphMetadata graphMetadata); + std::shared_ptr createNode() override; ++ bool validate() override; + }; + + } // namespace nnhal +diff --git a/ngraph_creator/operations/include/Mul.hpp b/ngraph_creator/operations/include/Mul.hpp +index 6702f30..e4a6819 100644 +--- a/ngraph_creator/operations/include/Mul.hpp ++++ b/ngraph_creator/operations/include/Mul.hpp +@@ -11,6 +11,7 @@ class Mul : public OperationsBase { + public: + Mul(int operationIndex, GraphMetadata graphMetadata); + std::shared_ptr createNode() override; ++ bool validate() override; + }; + + } // namespace nnhal +diff --git a/ngraph_creator/operations/include/Quantize.hpp b/ngraph_creator/operations/include/Quantize.hpp +index 190c1e7..31cda16 100644 +--- a/ngraph_creator/operations/include/Quantize.hpp ++++ b/ngraph_creator/operations/include/Quantize.hpp +@@ -12,6 +12,7 @@ public: + Quantize(int operationIndex, GraphMetadata graphMetadata); + std::shared_ptr createNode() override; + void connectOperationToGraph() override; ++ bool validate() override; + }; + + } // namespace nnhal +diff --git a/ngraph_creator/operations/include/ReduceMin.hpp b/ngraph_creator/operations/include/ReduceMin.hpp +index da909d5..cecf1ba 100644 +--- a/ngraph_creator/operations/include/ReduceMin.hpp ++++ b/ngraph_creator/operations/include/ReduceMin.hpp +@@ -11,6 +11,7 @@ class ReduceMin : public OperationsBase { + public: + ReduceMin(int operationIndex, GraphMetadata graphMetadata); + std::shared_ptr createNode() override; ++ bool validate() override; + }; + + } // namespace nnhal +diff --git a/ngraph_creator/operations/include/ReduceSum.hpp b/ngraph_creator/operations/include/ReduceSum.hpp +index 3e5f3e6..08183c2 100644 +--- a/ngraph_creator/operations/include/ReduceSum.hpp ++++ b/ngraph_creator/operations/include/ReduceSum.hpp +@@ -11,6 +11,7 @@ class ReduceSum : public OperationsBase { + public: + ReduceSum(int operationIndex, GraphMetadata graphMetadata); + std::shared_ptr createNode() override; ++ bool validate() override; + }; + + } // namespace nnhal +diff --git a/ngraph_creator/operations/include/Relu.hpp b/ngraph_creator/operations/include/Relu.hpp +index 40a87ce..21400f5 100644 +--- a/ngraph_creator/operations/include/Relu.hpp ++++ b/ngraph_creator/operations/include/Relu.hpp +@@ -11,6 +11,7 @@ class Relu : public OperationsBase { + public: + Relu(int operationIndex, GraphMetadata graphMetadata); + std::shared_ptr createNode() override; ++ bool validate() override; + }; + + } // namespace nnhal +diff --git a/ngraph_creator/operations/include/Relu1.hpp b/ngraph_creator/operations/include/Relu1.hpp +index b967ef7..6c5c101 100644 +--- a/ngraph_creator/operations/include/Relu1.hpp ++++ b/ngraph_creator/operations/include/Relu1.hpp +@@ -11,6 +11,7 @@ class Relu1 : public OperationsBase { + public: + Relu1(int operationIndex, GraphMetadata graphMetadata); + std::shared_ptr createNode() override; ++ bool validate() override; + }; + + } // namespace nnhal +diff --git a/ngraph_creator/operations/include/Relu6.hpp b/ngraph_creator/operations/include/Relu6.hpp +index 41da761..e5eb20b 100644 +--- a/ngraph_creator/operations/include/Relu6.hpp ++++ b/ngraph_creator/operations/include/Relu6.hpp +@@ -11,6 +11,7 @@ class Relu6 : public OperationsBase { + public: + Relu6(int operationIndex, GraphMetadata graphMetadata); + std::shared_ptr createNode() override; ++ bool validate() override; + }; + + } // namespace nnhal +diff --git a/ngraph_creator/operations/include/Softmax.hpp b/ngraph_creator/operations/include/Softmax.hpp +index 910f1dc..68ad9e8 100644 +--- a/ngraph_creator/operations/include/Softmax.hpp ++++ b/ngraph_creator/operations/include/Softmax.hpp +@@ -11,6 +11,7 @@ class Softmax : public OperationsBase { + public: + Softmax(int operationIndex, GraphMetadata graphMetadata); + std::shared_ptr createNode() override; ++ bool validate() override; + }; + + } // namespace nnhal +diff --git a/ngraph_creator/operations/include/Sub.hpp b/ngraph_creator/operations/include/Sub.hpp +index e83cfd8..dd3a56f 100644 +--- a/ngraph_creator/operations/include/Sub.hpp ++++ b/ngraph_creator/operations/include/Sub.hpp +@@ -11,6 +11,7 @@ class Sub : public OperationsBase { + public: + Sub(int operationIndex, GraphMetadata graphMetadata); + std::shared_ptr createNode() override; ++ bool validate() override; + }; + + } // namespace nnhal +diff --git a/ngraph_creator/operations/include/Tanh.hpp b/ngraph_creator/operations/include/Tanh.hpp +index 1f1595b..e77db6a 100644 +--- a/ngraph_creator/operations/include/Tanh.hpp ++++ b/ngraph_creator/operations/include/Tanh.hpp +@@ -11,6 +11,7 @@ class Tanh : public OperationsBase { + public: + Tanh(int operationIndex, GraphMetadata graphMetadata); + std::shared_ptr createNode() override; ++ bool validate() override; + }; + + } // namespace nnhal +diff --git a/ngraph_creator/operations/src/Add.cpp b/ngraph_creator/operations/src/Add.cpp +index 67b6a11..ac17d49 100644 +--- a/ngraph_creator/operations/src/Add.cpp ++++ b/ngraph_creator/operations/src/Add.cpp +@@ -14,7 +14,11 @@ Add::Add(int operationIndex, GraphMetadata graphMetadata) + } + + bool Add::validate() { +- ALOGV("%s PASSED", __func__); ++ //Check for zero sized or zero dimension tesnors ++ if (!isValidInputTensor(0) || !isValidInputTensor(1)) { ++ ALOGE("%s Empty or Invalid dimensions size for input", __func__); ++ return false; ++ } + + const auto& activationIndex = mOpModelInfo->getOperationInput(mNnapiOperationIndex, 2); + if (!mOpModelInfo->isOperandLifeTimeConst(activationIndex)) { +@@ -22,6 +26,7 @@ bool Add::validate() { + return false; + } + ++ ALOGV("%s PASSED", __func__); + return true; + } + +diff --git a/ngraph_creator/operations/src/AveragePool2D.cpp b/ngraph_creator/operations/src/AveragePool2D.cpp +index 36f2481..7280c02 100644 +--- a/ngraph_creator/operations/src/AveragePool2D.cpp ++++ b/ngraph_creator/operations/src/AveragePool2D.cpp +@@ -13,6 +13,11 @@ AveragePool2D::AveragePool2D(int operationIndex, GraphMetadata graphMetadata) + } + + bool AveragePool2D::validate() { ++ //Check for zero sized or zero dimension tesnors ++ if (!isValidInputTensor(0)) { ++ ALOGE("%s Empty or Invalid dimensions size for input", __func__); ++ return false; ++ } + // Check Input Dimension size + const auto& inputDimensionsSize = getInputOperandDimensions(0).size(); + if (inputDimensionsSize != 4) { +diff --git a/ngraph_creator/operations/src/Dequantize.cpp b/ngraph_creator/operations/src/Dequantize.cpp +index 35c88a0..b7a9f96 100644 +--- a/ngraph_creator/operations/src/Dequantize.cpp ++++ b/ngraph_creator/operations/src/Dequantize.cpp +@@ -12,6 +12,16 @@ Dequantize::Dequantize(int operationIndex, GraphMetadata graphMetadata) + mDefaultOutputIndex = mOpModelInfo->getOperationOutput(mNnapiOperationIndex, 0); + } + ++bool Dequantize::validate() { ++ if (!isValidInputTensor(0)) { ++ ALOGE("%s Empty or Invalid dimensions size for input", __func__); ++ return false; ++ } ++ ++ ALOGV("%s PASSED", __func__); ++ return true; ++} ++ + std::shared_ptr Dequantize::createNode() { + // Creating input nodes + std::shared_ptr input, outputNode; +diff --git a/ngraph_creator/operations/src/Div.cpp b/ngraph_creator/operations/src/Div.cpp +index 50f71cd..c92e73e 100644 +--- a/ngraph_creator/operations/src/Div.cpp ++++ b/ngraph_creator/operations/src/Div.cpp +@@ -12,6 +12,15 @@ Div::Div(int operationIndex, GraphMetadata graphMetadata) + mDefaultOutputIndex = mOpModelInfo->getOperationOutput(mNnapiOperationIndex, 0); + } + ++bool Div::validate() { ++ if (!isValidInputTensor(0) || !isValidInputTensor(1)) { ++ ALOGE("%s Empty or Invalid dimensions size for input", __func__); ++ return false; ++ } ++ ++ ALOGV("%s PASSED", __func__); ++ return true; ++} + std::shared_ptr Div::createNode() { + // Creating input nodes + auto input1 = getInputNode(0); +diff --git a/ngraph_creator/operations/src/L2Pooling2D.cpp b/ngraph_creator/operations/src/L2Pooling2D.cpp +index 7883214..376586d 100644 +--- a/ngraph_creator/operations/src/L2Pooling2D.cpp ++++ b/ngraph_creator/operations/src/L2Pooling2D.cpp +@@ -12,6 +12,23 @@ L2Pooling2D::L2Pooling2D(int operationIndex, GraphMetadata graphMetadata) + mDefaultOutputIndex = mOpModelInfo->getOperationOutput(mNnapiOperationIndex, 0); + } + ++bool L2Pooling2D::validate() { ++ //check Input are of valid dimension or not ++ if (!isValidInputTensor(0)) { ++ ALOGE("%s Empty or Invalid dimensions size for input", __func__); ++ return false; ++ } ++ ++ const auto& inputDimensionsSize = getInputOperandDimensions(0).size(); ++ if (inputDimensionsSize != 4) { ++ ALOGE("%s Invalid dimensions size for input(%lu)", __func__, inputDimensionsSize); ++ return false; ++ } ++ ++ ALOGV("%s PASSED", __func__); ++ return true; ++} ++ + std::shared_ptr L2Pooling2D::createNode() { + std::shared_ptr inputNode; + inputNode = getInputNode(0); +diff --git a/ngraph_creator/operations/src/Less.cpp b/ngraph_creator/operations/src/Less.cpp +index cfec43e..e36155d 100644 +--- a/ngraph_creator/operations/src/Less.cpp ++++ b/ngraph_creator/operations/src/Less.cpp +@@ -12,6 +12,17 @@ Less::Less(int operationIndex, GraphMetadata graphMetadata) + mDefaultOutputIndex = mOpModelInfo->getOperationOutput(mNnapiOperationIndex, 0); + } + ++bool Less::validate() { ++ //Check for zero sized or zero dimension tesnors ++ if (!isValidInputTensor(0) || !isValidInputTensor(1)) { ++ ALOGE("%s Empty or Invalid dimensions size for input", __func__); ++ return false; ++ } ++ ++ ALOGV("%s PASSED", __func__); ++ return true; ++} ++ + std::shared_ptr Less::createNode() { + // Creating input nodes + std::shared_ptr input1, input2; +diff --git a/ngraph_creator/operations/src/Logistic.cpp b/ngraph_creator/operations/src/Logistic.cpp +index 88ff080..6d44078 100644 +--- a/ngraph_creator/operations/src/Logistic.cpp ++++ b/ngraph_creator/operations/src/Logistic.cpp +@@ -12,6 +12,23 @@ Logistic::Logistic(int operationIndex, GraphMetadata graphMetadata) + mDefaultOutputIndex = mOpModelInfo->getOperationOutput(mNnapiOperationIndex, 0); + } + ++bool Logistic::validate() { ++ //check Input are of valid dimension or not ++ if (!isValidInputTensor(0)) { ++ ALOGE("%s Empty or Invalid dimensions size for input", __func__); ++ return false; ++ } ++ ++ const auto& inputDimensionsSize = getInputOperandDimensions(0).size(); ++ if (inputDimensionsSize > 4) { ++ ALOGE("%s Invalid dimensions size for input(%lu)", __func__, inputDimensionsSize); ++ return false; ++ } ++ ++ ALOGV("%s PASSED", __func__); ++ return true; ++} ++ + std::shared_ptr Logistic::createNode() { + // Creating input nodes + std::shared_ptr input; +diff --git a/ngraph_creator/operations/src/MaxPool2d.cpp b/ngraph_creator/operations/src/MaxPool2d.cpp +index 82b5a28..7b177c3 100644 +--- a/ngraph_creator/operations/src/MaxPool2d.cpp ++++ b/ngraph_creator/operations/src/MaxPool2d.cpp +@@ -12,6 +12,23 @@ MaxPool2d::MaxPool2d(int operationIndex, GraphMetadata graphMetadata) + mDefaultOutputIndex = mOpModelInfo->getOperationOutput(mNnapiOperationIndex, 0); + } + ++bool MaxPool2d::validate() { ++ //check Input are of valid dimension or not ++ if (!isValidInputTensor(0)) { ++ ALOGE("%s Empty or Invalid dimensions size for input", __func__); ++ return false; ++ } ++ ++ const auto& inputDimensionsSize = getInputOperandDimensions(0).size(); ++ if (inputDimensionsSize != 4) { ++ ALOGE("%s Invalid dimensions size for input(%lu)", __func__, inputDimensionsSize); ++ return false; ++ } ++ ++ ALOGV("%s PASSED", __func__); ++ return true; ++} ++ + std::shared_ptr MaxPool2d::createNode() { + std::shared_ptr inputNode; + inputNode = getInputNode(0); +diff --git a/ngraph_creator/operations/src/Mul.cpp b/ngraph_creator/operations/src/Mul.cpp +index ba5330c..b87355f 100644 +--- a/ngraph_creator/operations/src/Mul.cpp ++++ b/ngraph_creator/operations/src/Mul.cpp +@@ -12,6 +12,17 @@ Mul::Mul(int operationIndex, GraphMetadata graphMetadata) + mDefaultOutputIndex = mOpModelInfo->getOperationOutput(mNnapiOperationIndex, 0); + } + ++bool Mul::validate() { ++ //Check for zero sized or zero dimension tesnors ++ if (!isValidInputTensor(0) || !isValidInputTensor(1)) { ++ ALOGE("%s Empty or Invalid dimensions size for input", __func__); ++ return false; ++ } ++ ++ ALOGV("%s PASSED", __func__); ++ return true; ++} ++ + std::shared_ptr Mul::createNode() { + // Creating input nodes + std::shared_ptr input1, input2; +diff --git a/ngraph_creator/operations/src/Quantize.cpp b/ngraph_creator/operations/src/Quantize.cpp +index 566a61e..315aa67 100644 +--- a/ngraph_creator/operations/src/Quantize.cpp ++++ b/ngraph_creator/operations/src/Quantize.cpp +@@ -12,6 +12,16 @@ Quantize::Quantize(int operationIndex, GraphMetadata graphMetadata) + mDefaultOutputIndex = mOpModelInfo->getOperationOutput(mNnapiOperationIndex, 0); + } + ++bool Quantize::validate() { ++ if (!isValidInputTensor(0)) { ++ ALOGE("%s Empty or Invalid dimensions size for input", __func__); ++ return false; ++ } ++ ++ ALOGV("%s PASSED", __func__); ++ return true; ++} ++ + void Quantize::connectOperationToGraph() { createNode(); } + + std::shared_ptr Quantize::createNode() { +diff --git a/ngraph_creator/operations/src/ReduceMin.cpp b/ngraph_creator/operations/src/ReduceMin.cpp +index ff32a6b..03d51fb 100644 +--- a/ngraph_creator/operations/src/ReduceMin.cpp ++++ b/ngraph_creator/operations/src/ReduceMin.cpp +@@ -12,6 +12,23 @@ ReduceMin::ReduceMin(int operationIndex, GraphMetadata graphMetadata) + mDefaultOutputIndex = mOpModelInfo->getOperationOutput(mNnapiOperationIndex, 0); + } + ++bool ReduceMin::validate() { ++ //check Input are of valid dimension or not ++ if (!isValidInputTensor(0) || !isValidInputTensor(1)) { ++ ALOGE("%s Empty or Invalid dimensions size for input", __func__); ++ return false; ++ } ++ ++ const auto& inputDimensionsSize = getInputOperandDimensions(0).size(); ++ if (inputDimensionsSize > 4) { ++ ALOGE("%s Invalid dimensions size for input(%lu)", __func__, inputDimensionsSize); ++ return false; ++ } ++ ++ ALOGV("%s PASSED", __func__); ++ return true; ++} ++ + std::shared_ptr ReduceMin::createNode() { + // Creating input nodes + std::shared_ptr input; +diff --git a/ngraph_creator/operations/src/ReduceSum.cpp b/ngraph_creator/operations/src/ReduceSum.cpp +index a2818cf..2cb1c18 100644 +--- a/ngraph_creator/operations/src/ReduceSum.cpp ++++ b/ngraph_creator/operations/src/ReduceSum.cpp +@@ -12,6 +12,23 @@ ReduceSum::ReduceSum(int operationIndex, GraphMetadata graphMetadata) + mDefaultOutputIndex = mOpModelInfo->getOperationOutput(mNnapiOperationIndex, 0); + } + ++bool ReduceSum::validate() { ++ //check Input are of valid dimension or not ++ if (!isValidInputTensor(0) || !isValidInputTensor(1)) { ++ ALOGE("%s Empty or Invalid dimensions size for input", __func__); ++ return false; ++ } ++ ++ const auto& inputDimensionsSize = getInputOperandDimensions(0).size(); ++ if (inputDimensionsSize > 4) { ++ ALOGE("%s Invalid dimensions size for input(%lu)", __func__, inputDimensionsSize); ++ return false; ++ } ++ ++ ALOGV("%s PASSED", __func__); ++ return true; ++} ++ + std::shared_ptr ReduceSum::createNode() { + // Creating input nodes + auto input = getInputNode(0); +diff --git a/ngraph_creator/operations/src/Relu.cpp b/ngraph_creator/operations/src/Relu.cpp +index e3f670f..a99d899 100644 +--- a/ngraph_creator/operations/src/Relu.cpp ++++ b/ngraph_creator/operations/src/Relu.cpp +@@ -12,6 +12,17 @@ Relu::Relu(int operationIndex, GraphMetadata graphMetadata) + mDefaultOutputIndex = mOpModelInfo->getOperationOutput(mNnapiOperationIndex, 0); + } + ++bool Relu::validate() { ++ //check Input are of valid dimension or not ++ if (!isValidInputTensor(0)) { ++ ALOGE("%s Empty or Invalid dimensions size for input", __func__); ++ return false; ++ } ++ ++ ALOGV("%s PASSED", __func__); ++ return true; ++} ++ + std::shared_ptr Relu::createNode() { + // Creating input nodes + std::shared_ptr input; +diff --git a/ngraph_creator/operations/src/Relu1.cpp b/ngraph_creator/operations/src/Relu1.cpp +index 66b93b8..4be3472 100644 +--- a/ngraph_creator/operations/src/Relu1.cpp ++++ b/ngraph_creator/operations/src/Relu1.cpp +@@ -12,6 +12,17 @@ Relu1::Relu1(int operationIndex, GraphMetadata graphMetadata) + mDefaultOutputIndex = mOpModelInfo->getOperationOutput(mNnapiOperationIndex, 0); + } + ++bool Relu1::validate() { ++ //check Input are of valid dimension or not ++ if (!isValidInputTensor(0)) { ++ ALOGE("%s Empty or Invalid dimensions size for input", __func__); ++ return false; ++ } ++ ++ ALOGV("%s PASSED", __func__); ++ return true; ++} ++ + std::shared_ptr Relu1::createNode() { + // Creating input nodes + std::shared_ptr input; +diff --git a/ngraph_creator/operations/src/Relu6.cpp b/ngraph_creator/operations/src/Relu6.cpp +index 75f22fe..5aa383a 100644 +--- a/ngraph_creator/operations/src/Relu6.cpp ++++ b/ngraph_creator/operations/src/Relu6.cpp +@@ -12,6 +12,17 @@ Relu6::Relu6(int operationIndex, GraphMetadata graphMetadata) + mDefaultOutputIndex = mOpModelInfo->getOperationOutput(mNnapiOperationIndex, 0); + } + ++bool Relu6::validate() { ++ //check Input are of valid dimension or not ++ if (!isValidInputTensor(0)) { ++ ALOGE("%s Empty or Invalid dimensions size for input", __func__); ++ return false; ++ } ++ ++ ALOGV("%s PASSED", __func__); ++ return true; ++} ++ + std::shared_ptr Relu6::createNode() { + // Creating input nodes + std::shared_ptr input; +diff --git a/ngraph_creator/operations/src/Softmax.cpp b/ngraph_creator/operations/src/Softmax.cpp +index b718ec3..fdbcb7c 100644 +--- a/ngraph_creator/operations/src/Softmax.cpp ++++ b/ngraph_creator/operations/src/Softmax.cpp +@@ -12,6 +12,23 @@ Softmax::Softmax(int operationIndex, GraphMetadata graphMetadata) + mDefaultOutputIndex = mOpModelInfo->getOperationOutput(mNnapiOperationIndex, 0); + } + ++bool Softmax::validate() { ++ //check Input are of valid dimension or not ++ if (!isValidInputTensor(0)) { ++ ALOGE("%s Empty or Invalid dimensions size for input", __func__); ++ return false; ++ } ++ ++ const auto& inputDimensionsSize = getInputOperandDimensions(0).size(); ++ if (inputDimensionsSize > 4) { ++ ALOGE("%s Invalid dimensions size for input(%lu)", __func__, inputDimensionsSize); ++ return false; ++ } ++ ++ ALOGV("%s PASSED", __func__); ++ return true; ++} ++ + std::shared_ptr Softmax::createNode() { + // Creating input nodes + std::shared_ptr input, outputNode; +diff --git a/ngraph_creator/operations/src/SpaceToBatch.cpp b/ngraph_creator/operations/src/SpaceToBatch.cpp +index ca06d12..717d479 100644 +--- a/ngraph_creator/operations/src/SpaceToBatch.cpp ++++ b/ngraph_creator/operations/src/SpaceToBatch.cpp +@@ -18,6 +18,11 @@ bool SpaceToBatch::validate() { + + if (inputRank != 4) return false; + ++ if (!isValidInputTensor(0) || !isValidInputTensor(1) || !isValidInputTensor(2)) { ++ ALOGE("%s Empty or Invalid dimensions size for input", __func__); ++ return false; ++ } ++ + auto& block_shape_OperandIndex = mOpModelInfo->getOperationInput(mNnapiOperationIndex, 1); + // TODO: Add Support for all_tensors_as_inputs + if (!mOpModelInfo->isOperandLifeTimeConst(block_shape_OperandIndex)) { +diff --git a/ngraph_creator/operations/src/Squeeze.cpp b/ngraph_creator/operations/src/Squeeze.cpp +index d3fbb44..3dcd226 100644 +--- a/ngraph_creator/operations/src/Squeeze.cpp ++++ b/ngraph_creator/operations/src/Squeeze.cpp +@@ -13,6 +13,18 @@ Squeeze::Squeeze(int operationIndex, GraphMetadata graphMetadata) + } + + bool Squeeze::validate() { ++ //check Input are of valid dimension or not ++ if (!isValidInputTensor(0)) { ++ ALOGE("%s Empty or Invalid dimensions size for input", __func__); ++ return false; ++ } ++ ++ const auto& inputDimensionsSize = getInputOperandDimensions(0).size(); ++ if (inputDimensionsSize > 4) { ++ ALOGE("%s Invalid dimensions size for input(%lu)", __func__, inputDimensionsSize); ++ return false; ++ } ++ + // TODO: Add Support for all_tensors_as_inputs + const auto& dimsOperandIndex = mOpModelInfo->getOperationInput(mNnapiOperationIndex, 1); + +@@ -25,6 +37,14 @@ bool Squeeze::validate() { + return false; + } + ++ const auto& inputsSize = mOpModelInfo->getOperationInputsSize(mNnapiOperationIndex); ++ if (inputsSize == 2) { ++ if (!isValidInputTensor(1)) { ++ ALOGE("%s Empty or Invalid dimensions size for input", __func__); ++ return false; ++ } ++ } ++ + return true; + } + +diff --git a/ngraph_creator/operations/src/Sub.cpp b/ngraph_creator/operations/src/Sub.cpp +index 59e5461..fe94457 100644 +--- a/ngraph_creator/operations/src/Sub.cpp ++++ b/ngraph_creator/operations/src/Sub.cpp +@@ -12,6 +12,16 @@ Sub::Sub(int operationIndex, GraphMetadata graphMetadata) + mDefaultOutputIndex = mOpModelInfo->getOperationOutput(mNnapiOperationIndex, 0); + } + ++bool Sub::validate() { ++ if (!isValidInputTensor(0) || !isValidInputTensor(1)) { ++ ALOGE("%s Empty or Invalid dimensions size for input", __func__); ++ return false; ++ } ++ ++ ALOGV("%s PASSED", __func__); ++ return true; ++} ++ + std::shared_ptr Sub::createNode() { + // Creating input nodes + std::shared_ptr input1, input2; +diff --git a/ngraph_creator/operations/src/Tanh.cpp b/ngraph_creator/operations/src/Tanh.cpp +index 7ce53fe..13c8469 100644 +--- a/ngraph_creator/operations/src/Tanh.cpp ++++ b/ngraph_creator/operations/src/Tanh.cpp +@@ -12,6 +12,23 @@ Tanh::Tanh(int operationIndex, GraphMetadata graphMetadata) + mDefaultOutputIndex = mOpModelInfo->getOperationOutput(mNnapiOperationIndex, 0); + } + ++bool Tanh::validate() { ++ //check Input are of valid dimension or not ++ if (!isValidInputTensor(0)) { ++ ALOGE("%s Empty or Invalid dimensions size for input", __func__); ++ return false; ++ } ++ ++ const auto& inputDimensionsSize = getInputOperandDimensions(0).size(); ++ if (inputDimensionsSize > 4) { ++ ALOGE("%s Invalid dimensions size for input(%lu)", __func__, inputDimensionsSize); ++ return false; ++ } ++ ++ ALOGV("%s PASSED", __func__); ++ return true; ++} ++ + std::shared_ptr Tanh::createNode() { + // Creating input nodes + std::shared_ptr input; +diff --git a/ngraph_creator/operations/src/Transpose.cpp b/ngraph_creator/operations/src/Transpose.cpp +index 0fd0640..2dc5c56 100644 +--- a/ngraph_creator/operations/src/Transpose.cpp ++++ b/ngraph_creator/operations/src/Transpose.cpp +@@ -13,14 +13,28 @@ Transpose::Transpose(int operationIndex, GraphMetadata graphMetadata) + } + + bool Transpose::validate() { +- // TODO: Add Support for all_tensors_as_inputs +- const auto& dimsOperandIndex = mOpModelInfo->getOperationInput(mNnapiOperationIndex, 1); +- const auto& dims = getInputOperandDimensions(1); +- if (!dims.empty() && dims[0] != 0 && !mOpModelInfo->isOperandLifeTimeConst(dimsOperandIndex)) { +- ALOGE("%s Only Constant dimensions supported now", __func__); ++ //check Input are of valid dimension or not ++ if (!isValidInputTensor(0)) { ++ ALOGE("%s Empty or Invalid dimensions size for input", __func__); ++ return false; ++ } ++ ++ const auto& inputDimensionsSize = getInputOperandDimensions(0).size(); ++ if (inputDimensionsSize > 4) { ++ ALOGE("%s Invalid dimensions size for input(%lu)", __func__, inputDimensionsSize); + return false; + } + ++ const auto& inputsSize = mOpModelInfo->getOperationInputsSize(mNnapiOperationIndex); ++ if (inputsSize == 2) { ++ const auto& dimsOperandIndex = mOpModelInfo->getOperationInput(mNnapiOperationIndex, 1); ++ if (!isValidInputTensor(1) || !mOpModelInfo->isOperandLifeTimeConst(dimsOperandIndex)) { ++ ALOGE("%s Invalid operand type or operand lifetime", __func__); ++ return false; ++ } ++ } ++ ++ ALOGV("%s PASSED", __func__); + return true; + } + +diff --git a/ngraph_creator/operations/src/TransposeConv2D.cpp b/ngraph_creator/operations/src/TransposeConv2D.cpp +index 29bf849..99e39d4 100644 +--- a/ngraph_creator/operations/src/TransposeConv2D.cpp ++++ b/ngraph_creator/operations/src/TransposeConv2D.cpp +@@ -23,7 +23,7 @@ bool TransposeConv2D::validate() { + inputDimensionsSize, filterDimensionsSize); + return false; + } +- if (!isValidInputTensor(0) || !isValidInputTensor(1)) { ++ if (!isValidInputTensor(0) || !isValidInputTensor(1) || !isValidInputTensor(2)) { + ALOGE("%s Invalid dimensions for input or filter", __func__); + return false; + } +@@ -39,8 +39,17 @@ bool TransposeConv2D::validate() { + // TODO: Issue from OV 2021.4, remove this check once CVS-61723 is resolved + // Workaround to ignore VTS large input error test cases + const auto& inputDimensions = getInputOperandDimensions(0); ++ const auto& filterDimensions = getInputOperandDimensions(1); ++ const auto& biasDimensions = getInputOperandDimensions(2); + +- if (inputDimensions[1] == 1 && inputDimensions[2] == 1 && inputDimensions[3] == 1) return false; ++ if (inputDimensions[1] == 1 && inputDimensions[2] == 1 && inputDimensions[3] == 1) { ++ return false; ++ } ++ ++ //check if the bias dimension == filter depth_out && filter depth_in == input depth_in ++ if(filterDimensions[0] != biasDimensions[0] && biasDimensions[3] != inputDimensions[3]) { ++ return false; ++ } + + ALOGV("%s PASSED", __func__); + return true; +diff --git a/ngraph_creator/src/OperationsFactory.cpp b/ngraph_creator/src/OperationsFactory.cpp +index 2fc1011..4a56f1d 100644 +--- a/ngraph_creator/src/OperationsFactory.cpp ++++ b/ngraph_creator/src/OperationsFactory.cpp +@@ -121,14 +121,14 @@ std::shared_ptr OperationsFactory::getOperation( + return std::make_shared(operationIndex, mGraphMetadata); + case OperationType::REDUCE_ANY: + return std::make_shared(operationIndex, mGraphMetadata); +- case OperationType::REDUCE_MAX: +- return std::make_shared(operationIndex, mGraphMetadata); +- case OperationType::REDUCE_MIN: +- return std::make_shared(operationIndex, mGraphMetadata); +- case OperationType::REDUCE_PROD: +- return std::make_shared(operationIndex, mGraphMetadata); +- case OperationType::REDUCE_SUM: +- return std::make_shared(operationIndex, mGraphMetadata); ++ // case OperationType::REDUCE_MAX: ++ // return std::make_shared(operationIndex, mGraphMetadata); ++ // case OperationType::REDUCE_MIN: ++ // return std::make_shared(operationIndex, mGraphMetadata); ++ // case OperationType::REDUCE_PROD: ++ // return std::make_shared(operationIndex, mGraphMetadata); ++ // case OperationType::REDUCE_SUM: ++ // return std::make_shared(operationIndex, mGraphMetadata); + case OperationType::RELU: + return std::make_shared(operationIndex, mGraphMetadata); + case OperationType::RELU1: +@@ -173,10 +173,10 @@ std::shared_ptr OperationsFactory::getOperation( + return std::make_shared(operationIndex, mGraphMetadata); + case OperationType::TOPK_V2: + return std::make_shared(operationIndex, mGraphMetadata); +- case OperationType::TRANSPOSE_CONV_2D: +- return std::make_shared(operationIndex, mGraphMetadata); +- case OperationType::TRANSPOSE: +- return std::make_shared(operationIndex, mGraphMetadata); ++ // case OperationType::TRANSPOSE_CONV_2D: ++ // return std::make_shared(operationIndex, mGraphMetadata); ++ // case OperationType::TRANSPOSE: ++ // return std::make_shared(operationIndex, mGraphMetadata); + case OperationType::UNIDIRECTIONAL_SEQUENCE_RNN: + return std::make_shared(operationIndex, mGraphMetadata); + default: +diff --git a/utils.h b/utils.h +index 7c6976d..1ec2fd0 100644 +--- a/utils.h ++++ b/utils.h +@@ -101,7 +101,7 @@ enum PaddingScheme { + + #define dumpOperation(operation) \ + do { \ +- ALOGV("Operation: %s", toString(operation).c_str()); \ ++ ALOGD("Operation: %s", toString(operation).c_str()); \ + } while (0) + + #define WRONG_DIM (-1) +-- +2.17.1 +