Fix TSAN issue No2 in GNA plugin (#17185)

* Fix TSAN issue No2 in GNA plugin

* Misprint
This commit is contained in:
Vitaliy Urusovskij 2023-04-25 16:32:06 +04:00 committed by GitHub
parent 512b186231
commit 11a2b75161
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 1 deletions

View File

@ -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 {

View File

@ -0,0 +1,7 @@
#include "log.hpp"
namespace ov {
namespace intel_gna {
std::mutex GnaLog::mutex_;
} // namespace intel_gna
} // namespace ov

View File

@ -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;