-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use update mutable command list for states
Signed-off-by: Bogdan Pereanu <[email protected]>
- Loading branch information
Showing
10 changed files
with
739 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 49 additions & 0 deletions
49
src/plugins/intel_npu/src/backend/include/zero_variable_state.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
// Copyright (C) 2018-2025 Intel Corporation | ||
// SPDX-License-Identifier: Apache-2.0 | ||
// | ||
|
||
#pragma once | ||
|
||
#include "intel_npu/common/variable_state.hpp" | ||
#include "intel_npu/config/config.hpp" | ||
#include "intel_npu/network_metadata.hpp" | ||
#include "intel_npu/utils/logger/logger.hpp" | ||
#include "intel_npu/utils/zero/zero_init.hpp" | ||
|
||
namespace intel_npu { | ||
|
||
class ZeroVariableState final : public VariableState { | ||
public: | ||
explicit ZeroVariableState(const std::shared_ptr<ZeroInitStructsHolder>& init_structs, | ||
const IODescriptor& descriptor, | ||
const ov::SoPtr<ov::ITensor>& tensor, | ||
size_t index, | ||
const Config& config); | ||
|
||
void set_state(const ov::SoPtr<ov::ITensor>& new_state) override; | ||
|
||
void reset() override; | ||
|
||
size_t get_index() const; | ||
const IODescriptor& get_descriptor() const; | ||
|
||
bool tensor_was_updated() const; | ||
void reset_tensor_updated_flag(); | ||
|
||
bool zero_tensor_should_be_updated() const; | ||
void reset_zero_tensor_updated_flag(); | ||
|
||
~ZeroVariableState() override = default; | ||
|
||
private: | ||
std::shared_ptr<ZeroInitStructsHolder> _init_structs; | ||
IODescriptor _descriptor; | ||
size_t _index; | ||
|
||
bool _tensor_updated = false; | ||
bool _zero_tensor_updated = false; | ||
|
||
Logger _logger; | ||
}; | ||
|
||
} // namespace intel_npu |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.