[IE TEMPLATE] Fix operation set in QueryNetwork (#8824)
* [IE TEMPLATE] Fix opeartion set in QueryNetwork * Apply review comments * Prepare for review * Return extra removed * code style * Update template_plugin.cpp * Code style
This commit is contained in:
1 parent
461d6e8a1d
commit
1cd8156d3d
2 files changed
+13
-2
No files matched your search
@@ -152,14 +152,24 @@ InferenceEngine::QueryNetworkResult Plugin::QueryNetwork(const InferenceEngine::
|
||||
// So we need store as supported either unsupported node sets
|
||||
std::unordered_set<std::string> supported;
|
||||
std::unordered_set<std::string> unsupported;
|
||||
auto opset = ngraph::get_opset4();
|
||||
ngraph::OpSet op_super_set;
|
||||
#define _OPENVINO_OP_REG(NAME, NAMESPACE) op_super_set.insert<NAMESPACE::NAME>();
|
||||
#include "openvino/opsets/opset1_tbl.hpp"
|
||||
#include "openvino/opsets/opset2_tbl.hpp"
|
||||
#include "openvino/opsets/opset3_tbl.hpp"
|
||||
#include "openvino/opsets/opset4_tbl.hpp"
|
||||
#include "openvino/opsets/opset5_tbl.hpp"
|
||||
#include "openvino/opsets/opset6_tbl.hpp"
|
||||
#include "openvino/opsets/opset7_tbl.hpp"
|
||||
#include "openvino/opsets/opset8_tbl.hpp"
|
||||
#undef _OPENVINO_OP_REG
|
||||
for (auto&& node : transformedFunction->get_ops()) {
|
||||
// Extract transformation history from transformed node as list of nodes
|
||||
for (auto&& fusedLayerName : ngraph::getFusedNamesVector(node)) {
|
||||
// Filter just nodes from original operation set
|
||||
// TODO: fill with actual decision rules based on whether kernel is supported by backend
|
||||
if (InferenceEngine::details::contains(originalOps, fusedLayerName)) {
|
||||
if (opset.contains_type(friendlyNameToType[fusedLayerName])) {
|
||||
if (op_super_set.contains_type(friendlyNameToType[fusedLayerName])) {
|
||||
supported.emplace(fusedLayerName);
|
||||
} else {
|
||||
unsupported.emplace(fusedLayerName);
|
||||
|
||||
@@ -96,6 +96,7 @@ void LayerTestsCommon::Serialize(ngraph::pass::Serialize::Version ir_version) {
|
||||
|
||||
void LayerTestsCommon::QueryNetwork() {
|
||||
SKIP_IF_CURRENT_TEST_IS_DISABLED();
|
||||
|
||||
cnnNetwork = InferenceEngine::CNNNetwork(function);
|
||||
|
||||
auto queryNetworkResult = PluginCache::get().ie()->QueryNetwork(cnnNetwork, targetDevice);
|
||||
|
||||
Reference in new issue
Block a user