diff --git a/src/plugins/intel_npu/src/al/include/npu.hpp b/src/plugins/intel_npu/src/al/include/npu.hpp index e30d2a9c13dd88..c8b12c13d08dfa 100644 --- a/src/plugins/intel_npu/src/al/include/npu.hpp +++ b/src/plugins/intel_npu/src/al/include/npu.hpp @@ -37,6 +37,8 @@ class IEngineBackend : public std::enable_shared_from_this { virtual bool isBatchingSupported() const = 0; /** @brief Register backend-specific options */ virtual void registerOptions(OptionsDesc& options) const; + /** @brief Update backend and device info */ + virtual void updateInfo(const Config& config) = 0; protected: virtual ~IEngineBackend() = default; @@ -74,6 +76,8 @@ class IDevice : public std::enable_shared_from_this { const std::shared_ptr& compiledModel, const std::shared_ptr& executor, const Config& config) = 0; + + virtual void updateInfo(const Config& config) = 0; protected: virtual ~IDevice() = default; diff --git a/src/plugins/intel_npu/src/backend/include/zero_backend.hpp b/src/plugins/intel_npu/src/backend/include/zero_backend.hpp index 7f4524ec8127ca..ea4353c05dd2cc 100644 --- a/src/plugins/intel_npu/src/backend/include/zero_backend.hpp +++ b/src/plugins/intel_npu/src/backend/include/zero_backend.hpp @@ -27,6 +27,15 @@ class ZeroEngineBackend final : public IEngineBackend { bool isBatchingSupported() const override; + void updateInfo(const Config& config) { + _logger.setLevel(config.get()); + if(_devices.size() > 0){ + for(auto dev : _devices) { + dev.second->updateInfo(config); + } + } + } + private: std::shared_ptr _instance; diff --git a/src/plugins/intel_npu/src/backend/include/zero_device.hpp b/src/plugins/intel_npu/src/backend/include/zero_device.hpp index 46f28d0aa55473..7f34cd74ec9673 100644 --- a/src/plugins/intel_npu/src/backend/include/zero_device.hpp +++ b/src/plugins/intel_npu/src/backend/include/zero_device.hpp @@ -36,6 +36,9 @@ class ZeroDevice : public IDevice { std::shared_ptr createInferRequest(const std::shared_ptr& compiledModel, const std::shared_ptr& executor, const Config& config) override; + void updateInfo(const Config& config) { + log.setLevel(config.get()); + } ZeroDevice& operator=(const ZeroDevice&) = delete; ZeroDevice(const ZeroDevice&) = delete; diff --git a/src/plugins/intel_npu/src/plugin/include/backends.hpp b/src/plugins/intel_npu/src/plugin/include/backends.hpp index f5c02b0c446b12..021937b70f669a 100644 --- a/src/plugins/intel_npu/src/plugin/include/backends.hpp +++ b/src/plugins/intel_npu/src/plugin/include/backends.hpp @@ -17,7 +17,6 @@ #include "npu_private_properties.hpp" namespace intel_npu { - enum class AvailableBackends { LEVEL_ZERO, IMD }; /** @brief Represent container for all backends and hide all related searching logic */ diff --git a/src/plugins/intel_npu/src/plugin/src/backends.cpp b/src/plugins/intel_npu/src/plugin/src/backends.cpp index a975e97eb54cd7..d459adbb75a30f 100644 --- a/src/plugins/intel_npu/src/plugin/src/backends.cpp +++ b/src/plugins/intel_npu/src/plugin/src/backends.cpp @@ -201,6 +201,9 @@ void NPUBackends::registerOptions(OptionsDesc& options) const { // TODO config should be also specified to backends, to allow use logging in devices and all levels below void NPUBackends::setup(const Config& config) { _logger.setLevel(config.get()); + if (_backend != nullptr){ + _backend->updateInfo(config); + } } std::string NPUBackends::getCompilationPlatform(const std::string_view platform, const std::string& deviceId) const {