23.08
|
Go to the documentation of this file.
25 #ifndef ARM_COMPUTE_IWEIGHTSMANAGER_H
26 #define ARM_COMPUTE_IWEIGHTSMANAGER_H
93 bool is_unused{
false };
94 std::atomic<int> counter{ 1 };
98 std::map<const ITensor *, std::vector<ITransformWeights *>> _managed_weights;
99 std::map<const ITensor *, CounterElement> _managed_counter;
100 std::map<const ITensor *, ITransformWeights *> _managed_weights_parents;
void manage(const ITensor *weights, ITransformWeights *parent=nullptr)
Start managing a weights tensor.
Interface for CPU tensor.
IWeightsManager()
Constructor.
void pre_mark_as_unused(const ITensor *weights)
Pre-mark the weights as unused.
virtual ~IWeightsManager()=default
Default Destructor.
bool are_weights_managed(const ITensor *weights)
Check if the weights are managed.
IWeightsManager & operator=(const IWeightsManager &)=delete
Prevent instances of this class to be copied.
Copyright (c) 2017-2023 Arm Limited.
ITensor * run(const ITensor *weights, ITransformWeights *weights_transform)
Run the reshape function.
Weights manager interface to handle weights transformations.
ITensor * acquire(const ITensor *weights, ITransformWeights *weights_transform)
Acquire the requested reshape tensor of the selected weights.
void release(const ITensor *weights)
Release weights refcount and mark as unused if reaches 0.