ONE - On-device Neural Engine
Loading...
Searching...
No Matches
onert::backend::cpu Namespace Reference

Namespaces

namespace  ops
 

Data Structures

class  Backend
 
class  BackendContext
 
class  Config
 
class  ExternalContext
 
class  KernelGenerator
 

Typedefs

using StaticTensorManager = basic::StaticTensorManager
 
using Tensor = basic::Tensor
 
using ExternalTensor = basic::ExternalTensor
 
using TensorBuilder = basic::TensorBuilder
 

Functions

ir::OperandIndexMap< ir::OperandIndexfindSharedMemoryOperandIndexes (const ir::IGraph &graph)
 

Typedef Documentation

◆ ExternalTensor

Definition at line 31 of file Tensor.h.

◆ StaticTensorManager

◆ Tensor

Definition at line 30 of file Tensor.h.

◆ TensorBuilder

Definition at line 29 of file TensorBuilder.h.

Function Documentation

◆ findSharedMemoryOperandIndexes()

ir::OperandIndexMap< ir::OperandIndex > onert::backend::cpu::findSharedMemoryOperandIndexes ( const ir::IGraph graph)

Definition at line 77 of file SharedMemoryOperands.cc.

78{
79 ir::OperandIndexMap<ir::OperandIndex> shared_memory_operand_map;
80 graph.operations().iterate([&](const ir::OperationIndex &, const ir::IOperation &op) {
81 if (is_memory_sharing_allowed(graph, op))
82 {
83 assert(op.getInputs().size() == 1 || op.getInputs().size() == 2);
84 assert(op.getOutputs().size() == 1);
85 shared_memory_operand_map[op.getOutputs().at(0)] = op.getInputs().at(0);
86 }
87 });
88 reassign_indexes_to_single_sources(shared_memory_operand_map);
89 return shared_memory_operand_map;
90}
const OperandIndex & at(IOIndex set_index) const
std::unordered_map< OperandIndex, T > OperandIndexMap
virtual const OperandIndexSequence & getInputs() const =0
virtual const OperandIndexSequence & getOutputs() const =0

References onert::ir::OperandIndexSequence::at(), onert::ir::IOperation::getInputs(), onert::ir::IOperation::getOutputs(), and onert::ir::OperandIndexSequence::size().

Referenced by onert::backend::cpu::Backend::newContext().