Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[IE CLDNN] Fix NormalizeL2 creation in QueryNetwork #4310

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion inference-engine/src/cldnn_engine/cldnn_engine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,12 @@ QueryNetworkResult clDNNEngine::QueryNetwork(const CNNNetwork& network,
CLDNNPlugin::Config conf = _impl->m_config;
UpdateConfig(conf, network, config);

Program prog;
if (m_defaultContext == nullptr) {
m_defaultContext.reset(new CLDNNRemoteCLContext(
std::const_pointer_cast<InferenceEngine::IInferencePlugin>(shared_from_this()),
ParamMap(), conf));
}
Program prog(m_defaultContext->getImpl()->GetEngine(), conf);
auto function = network.getFunction();
if (function == nullptr) {
THROW_IE_EXCEPTION << "CNNetworkImpl representation is not supported anymore";
Expand Down
2 changes: 1 addition & 1 deletion inference-engine/src/cldnn_engine/cldnn_engine.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class clDNNEngine : public InferenceEngine::InferencePluginInternal,
std::map<std::string, cldnn::device> device_map;
std::mutex engine_mutex;

CLDNNRemoteCLContext::Ptr m_defaultContext;
mutable CLDNNRemoteCLContext::Ptr m_defaultContext;

cldnn::device_info GetDeviceInfo(const std::map<std::string, std::string> &config) const;
InferenceEngine::CNNNetwork CloneAndTransformNetwork(const InferenceEngine::CNNNetwork& network,
Expand Down
2 changes: 2 additions & 0 deletions inference-engine/src/cldnn_engine/cldnn_program.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ struct PerfCounter {
class Program {
public:
Program(InferenceEngine::CNNNetwork& network, std::shared_ptr<const cldnn::engine> engine, const Config& config);
Program(std::shared_ptr<const cldnn::engine> engine, const Config& config) : m_config(config), m_engine(engine),
m_curBatch(-1), queryMode(false), m_max_batch(1) {}
Program() : m_config({}), m_engine(nullptr), m_curBatch(-1), queryMode(false), m_max_batch(1) {}

static const cldnn::primitive_id m_preProcessTag;
Expand Down