Skip to content

Commit

Permalink
[onert/odc] Auto-compilation. OdcInfo and input/output buffers in Exe…
Browse files Browse the repository at this point in the history
…cution

This PR for `odc:auto-compilation` introduces OdcInfo structure and input/output buffers in Execution.
For [Issue]( #13288).
From [Draft](#13530).

ONE-DCO-1.0-Signed-off-by: Evgenii Maltsev [email protected]
  • Loading branch information
Torrero committed Dec 2, 2024
1 parent c6c8c0d commit d6974be
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
14 changes: 14 additions & 0 deletions runtime/onert/core/include/exec/Execution.h
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,20 @@ class Execution
size_t getInputTotalSize(ir::IOIndex ind) const;
size_t getOutputTotalSize(ir::IOIndex ind) const;

/**
* @brief Get pointer of Input Buffer
* @param[in] index Input index
* @return Pointer of Input Buffer
*/
const void *getInputBuffer(ir::IOIndex ind) const;

/**
* @brief Get pointer of Output Buffer
* @param[in] index Output index
* @return Pointer of Output Buffer
*/
void *getOutputBuffer(ir::IOIndex ind);

ExecutionOptions &executionOptions() { return _ctx.options; }

private:
Expand Down
10 changes: 10 additions & 0 deletions runtime/onert/core/src/exec/Execution.cc
Original file line number Diff line number Diff line change
Expand Up @@ -223,5 +223,15 @@ size_t Execution::getOutputTotalSize(ir::IOIndex ind) const
return _ctx.desc.outputs.at(ind.value())->info.total_size();
}

const void *Execution::getInputBuffer(ir::IOIndex ind) const
{
return _ctx.desc.inputs.at(ind.value())->buffer;
}

void *Execution::getOutputBuffer(ir::IOIndex ind)
{
return _ctx.desc.outputs.at(ind.value())->buffer;
}

} // namespace exec
} // namespace onert

0 comments on commit d6974be

Please sign in to comment.