Skip to content

Commit

Permalink
Update runtime/onert/core/include/backend/train/ExtraTensorRequest.h
Browse files Browse the repository at this point in the history
  • Loading branch information
zetwhite committed Aug 7, 2024
1 parent 8d05bce commit b008152
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 19 deletions.
25 changes: 7 additions & 18 deletions runtime/onert/core/include/backend/train/ExtraTensorRequest.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,12 @@ class ExtraTensorRequest
{

public:
ExtraTensorRequest(ir::OperandInfo info, ExtraTensorLifeTime lt,
ExtraTensor **addr)
ExtraTensorRequest(ir::OperandInfo info, ExtraTensorLifeTime lt, ExtraTensor **addr)
: _info(info), _lifetime(lt), _address(addr)
{
}

static ExtraTensorRequest createLike(const IPortableTensor *origin,
ExtraTensor** addr)
static ExtraTensorRequest createLike(const IPortableTensor *origin, ExtraTensor **addr)
{
assert(origin != nullptr);
assert(addr != nullptr);
Expand All @@ -52,25 +50,16 @@ class ExtraTensorRequest
}

public:
const ir::OperandInfo& info() const
{
return _info;
}

const ExtraTensorLifeTime lifetime() const
{
return _lifetime;
}
const ir::OperandInfo &info() const { return _info; }

void update_address(ExtraTensor* tensor)
{
*_address = tensor;
}
ExtraTensorLifeTime lifetime() const { return _lifetime; }

void update_address(ExtraTensor *tensor) { *_address = tensor; }

private:
ir::OperandInfo _info;
ExtraTensorLifeTime _lifetime;
backend::train::ExtraTensor ** const _address;
backend::train::ExtraTensor **const _address;
};

using ExtraTensorRequests = std::vector<ExtraTensorRequest>;
Expand Down
1 change: 0 additions & 1 deletion runtime/onert/core/include/exec/train/ITrainableFunction.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ class ITrainableFunction
backend::train::ExtraTensorRequests r;
return r;
}

};

} // namespace train
Expand Down

0 comments on commit b008152

Please sign in to comment.