Fix TSAN issue No2 in GNA plugin (#17185)
* Fix TSAN issue No2 in GNA plugin * Misprint
This commit is contained in:
parent
512b186231
commit
11a2b75161
@ -18,7 +18,7 @@ namespace InferenceEngine {
|
||||
|
||||
/**
|
||||
* @brief This class provides optimal thread safe default implementation.
|
||||
* The class is recommended to be used as a base class for Executable Network impleentation during plugin development.
|
||||
* The class is recommended to be used as a base class for Executable Network implementation during plugin development.
|
||||
* @ingroup ie_dev_api_exec_network_api
|
||||
*/
|
||||
class ExecutableNetworkThreadSafeDefault : public IExecutableNetworkInternal {
|
||||
|
7
src/plugins/intel_gna/src/log/log.cpp
Normal file
7
src/plugins/intel_gna/src/log/log.cpp
Normal file
@ -0,0 +1,7 @@
|
||||
#include "log.hpp"
|
||||
|
||||
namespace ov {
|
||||
namespace intel_gna {
|
||||
std::mutex GnaLog::mutex_;
|
||||
} // namespace intel_gna
|
||||
} // namespace ov
|
@ -5,6 +5,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <iostream>
|
||||
#include <mutex>
|
||||
#include <ostream>
|
||||
|
||||
#include "openvino/runtime/properties.hpp"
|
||||
@ -23,6 +24,7 @@ class GnaLog {
|
||||
GnaLog() = default;
|
||||
|
||||
static GnaLog& log(ov::log::Level log_level) {
|
||||
std::lock_guard<std::mutex> guard(mutex_);
|
||||
GnaLog& obj = get_instance();
|
||||
obj.message_level_ = log_level;
|
||||
obj << "[" << log_level << "]"
|
||||
@ -35,6 +37,7 @@ class GnaLog {
|
||||
|
||||
/** Log level of particular log message */
|
||||
ov::log::Level message_level_ = ov::log::Level::NO;
|
||||
static std::mutex mutex_;
|
||||
|
||||
static GnaLog& get_instance() {
|
||||
static GnaLog log_obj;
|
||||
|
Loading…
Reference in New Issue
Block a user