Added "kernels" pass stage to compiler, removed unused opaque from cv::gimpl::Op

This commit is contained in:
Ruslan Garnov 2018-12-12 17:22:52 +03:00
parent 82227b5ace
commit d38676085a
3 changed files with 5 additions and 4 deletions

View File

@ -104,11 +104,13 @@ cv::gimpl::GCompiler::GCompiler(const cv::GComputation &c,
// Remove GCompoundBackend to avoid calling setupBackend() with it in the list
m_all_kernels.remove(cv::gapi::compound::backend());
m_e.addPass("init", "resolve_kernels", std::bind(passes::resolveKernels, _1,
m_e.addPassStage("kernels");
m_e.addPass("kernels", "resolve_kernels", std::bind(passes::resolveKernels, _1,
std::ref(m_all_kernels), // NB: and not copied here
lookup_order));
m_e.addPass("kernels", "check_islands_content", passes::checkIslandsContent);
m_e.addPass("init", "check_islands_content", passes::checkIslandsContent);
m_e.addPassStage("meta");
m_e.addPass("meta", "initialize", std::bind(passes::initMeta, _1, std::ref(m_metas)));
m_e.addPass("meta", "propagate", std::bind(passes::inferMeta, _1, false));

View File

@ -26,7 +26,7 @@ ade::NodeHandle GModel::mkOpNode(GModel::Graph &g, const GKernel &k, const std::
ade::NodeHandle op_h = g.createNode();
g.metadata(op_h).set(NodeType{NodeType::OP});
//These extra empty {} are to please GCC (-Wmissing-field-initializers)
g.metadata(op_h).set(Op{k, args, {}, {}, {}});
g.metadata(op_h).set(Op{k, args, {}, {}});
if (!island.empty())
g.metadata(op_h).set(Island{island});
return op_h;

View File

@ -61,7 +61,6 @@ struct Op
std::vector<RcDesc> outs; // TODO: Introduce a new type for resource references
cv::gapi::GBackend backend;
util::any opaque;
};
struct Data