21.02
|
Functions | |
void | configure_transition_manager (Graph &g, GraphContext &ctx, ExecutionWorkload &workload) |
Configures transition manager and execution workload. More... | |
void | validate_all_nodes (Graph &g) |
Validates all nodes. More... | |
void | configure_all_tensors (Graph &g) |
Configures all nodes of a graph. More... | |
void | allocate_all_input_tensors (INode &node) |
Allocates all input tensors of a node. More... | |
void | allocate_all_output_tensors (INode &node) |
Allocates all output tensors of a node. More... | |
void | allocate_const_tensors (Graph &g) |
Allocates const tensor of a given graph. More... | |
void | allocate_all_tensors (Graph &g) |
Allocates all tensors of a graph. More... | |
ExecutionWorkload | configure_all_nodes (Graph &g, GraphContext &ctx, const std::vector< NodeID > &node_order) |
Configures all nodes of graph. More... | |
void | release_unused_tensors (Graph &g) |
Release the memory of all unused const nodes. More... | |
void | call_tensor_accessor (Tensor *tensor) |
Calls accessor of a given tensor. More... | |
void | call_all_const_node_accessors (Graph &g) |
Call all const node accessors. More... | |
bool | call_all_input_node_accessors (ExecutionWorkload &workload) |
Call all input node accessors. More... | |
bool | call_all_output_node_accessors (ExecutionWorkload &workload) |
Call all output node accessors. More... | |
void | prepare_all_tasks (ExecutionWorkload &workload) |
Prepares all tasks for execution. More... | |
void | call_all_tasks (ExecutionWorkload &workload) |
Executes all tasks of a workload. More... | |
bool | all_inputs_are_visited (const INode *node, const std::vector< bool > &visited) |
Checks if all the input dependencies of a node have been visited. More... | |
void | fuse_convolution_with_batch_normalization (Graph &g, const Edge *output_edge) |
void | fuse_depthwise_convolution_with_batch_normalization (Graph &g, const Edge *output_edge) |
template<typename N > | |
void | fuse_node_with_activation (Graph &g, const Edge *output_edge, const std::set< Activation > &supported_fused_activations) |
template<typename N1 , typename N2 , typename F , typename... Args> | |
void | fuse_layer (Graph &g, std::function< bool(INode &)> const &prec, const F fuse_fcn, Args &&... optional_arguments) |
|
inline |
Checks if all the input dependencies of a node have been visited.
[in] | node | Node to check |
[in] | visited | Vector that contains the visited information |
Definition at line 46 of file TopologicalSort.cpp.
References ARM_COMPUTE_ERROR_ON, Graph::edge(), arm_compute::graph::EmptyNodeID, INode::graph(), INode::input_edges(), Edge::producer(), and Edge::producer_id().
Referenced by arm_compute::graph::bfs(), and arm_compute::graph::dfs().
void allocate_all_input_tensors | ( | INode & | node | ) |
Allocates all input tensors of a node.
[in] | node | Node to allocate the input tensor of |
Definition at line 73 of file ExecutionHelpers.cpp.
References ITensorHandle::allocate(), ARM_COMPUTE_ERROR_ON_MSG, Tensor::bound_edges(), Tensor::handle(), INode::input(), and INode::num_inputs().
Referenced by allocate_const_tensors().
void allocate_all_output_tensors | ( | INode & | node | ) |
Allocates all output tensors of a node.
[in] | node | Node to allocate the output tensor of |
Definition at line 86 of file ExecutionHelpers.cpp.
References ITensorHandle::allocate(), ARM_COMPUTE_ERROR_ON_MSG, Tensor::bound_edges(), Tensor::handle(), INode::num_outputs(), and INode::output().
Referenced by allocate_const_tensors().
void allocate_all_tensors | ( | Graph & | g | ) |
Allocates all tensors of a graph.
[in] | g | Graph to allocate the tensors |
Definition at line 120 of file ExecutionHelpers.cpp.
References Graph::tensors().
Referenced by GraphManager::finalize_graph().
void allocate_const_tensors | ( | Graph & | g | ) |
Allocates const tensor of a given graph.
[in] | g | Graph to allocate the tensors |
Definition at line 99 of file ExecutionHelpers.cpp.
References allocate_all_input_tensors(), allocate_all_output_tensors(), arm_compute::graph::Const, arm_compute::graph::Input, Graph::nodes(), and arm_compute::graph::Output.
Referenced by GraphManager::finalize_graph().
void call_all_const_node_accessors | ( | Graph & | g | ) |
Call all const node accessors.
[in] | g | Graph containing the const nodes |
Definition at line 193 of file ExecutionHelpers.cpp.
References call_tensor_accessor(), arm_compute::graph::Const, and Graph::nodes().
Referenced by GraphManager::finalize_graph().
bool call_all_input_node_accessors | ( | ExecutionWorkload & | workload | ) |
Call all input node accessors.
[in] | workload | Workload to execute |
Definition at line 209 of file ExecutionHelpers.cpp.
References arm_compute::mlgo::parser::end(), arm_compute::utility::for_each(), and ExecutionWorkload::inputs.
Referenced by GraphManager::execute_graph().
bool call_all_output_node_accessors | ( | ExecutionWorkload & | workload | ) |
Call all output node accessors.
[in] | workload | Workload to execute |
Definition at line 259 of file ExecutionHelpers.cpp.
References arm_compute::mlgo::parser::end(), arm_compute::utility::for_each(), and ExecutionWorkload::outputs.
Referenced by GraphManager::execute_graph().
void call_all_tasks | ( | ExecutionWorkload & | workload | ) |
Executes all tasks of a workload.
[in] | workload | Workload to execute |
Definition at line 230 of file ExecutionHelpers.cpp.
References ARM_COMPUTE_ERROR_ON, ExecutionWorkload::ctx, GraphContext::memory_managers(), and ExecutionWorkload::tasks.
Referenced by GraphManager::execute_graph().
void call_tensor_accessor | ( | Tensor * | tensor | ) |
Calls accessor of a given tensor.
[in] | tensor | The tensor of which the accessor should be called |
Definition at line 187 of file ExecutionHelpers.cpp.
References ARM_COMPUTE_ERROR_ON, and Tensor::call_accessor().
Referenced by call_all_const_node_accessors().
ExecutionWorkload configure_all_nodes | ( | Graph & | g, |
GraphContext & | ctx, | ||
const std::vector< NodeID > & | node_order | ||
) |
Configures all nodes of graph.
[in,out] | g | Graph to configure the nodes |
[in] | ctx | Graph context to use |
[in] | node_order | The order to configure the nodes |
Definition at line 133 of file ExecutionHelpers.cpp.
References INode::assigned_target(), IDeviceBackend::configure_node(), ExecutionWorkload::ctx, func, BackendRegistry::get(), BackendRegistry::get_backend(), ExecutionWorkload::graph, arm_compute::graph::Input, ExecutionWorkload::inputs, arm_compute::graph::is_utility_node(), Graph::node(), Graph::nodes(), arm_compute::graph::Output, ExecutionWorkload::outputs, and ExecutionWorkload::tasks.
Referenced by GraphManager::finalize_graph().
void configure_all_tensors | ( | Graph & | g | ) |
Configures all nodes of a graph.
[in] | g | Graph to configure |
Definition at line 56 of file ExecutionHelpers.cpp.
References ARM_COMPUTE_ERROR_ON_MSG, IDeviceBackend::create_tensor(), BackendRegistry::get(), BackendRegistry::get_backend(), and Graph::tensors().
Referenced by GraphManager::finalize_graph().
void configure_transition_manager | ( | Graph & | g, |
GraphContext & | ctx, | ||
ExecutionWorkload & | workload | ||
) |
Configures transition manager and execution workload.
Definition at line 236 of file CrossLayerMemoryManagerHelpers.cpp.
References MemoryManagerContext::cross_group, MemoryManagerContext::cross_mm, GraphContext::memory_management_ctx(), and ExecutionWorkload::tasks.
Referenced by GraphManager::finalize_graph().
void arm_compute::graph::detail::fuse_convolution_with_batch_normalization | ( | Graph & | g, |
const Edge * | output_edge | ||
) |
Definition at line 43 of file NodeFusionMutator.cpp.
References Graph::add_connection(), Graph::add_node(), ARM_COMPUTE_ERROR_ON, ARM_COMPUTE_LOG_GRAPH_VERBOSE, arm_compute::graph::configure_tensor(), Edge::consumer(), Edge::consumer_id(), arm_compute::test::validation::conv_info, arm_compute::quantization::epsilon, arm_compute::graph::get_driving_nodes(), INode::input_edge(), NodeParams::name, Graph::node(), arm_compute::test::validation::num_groups, Edge::producer(), Edge::producer_id(), and Graph::remove_node().
Referenced by NodeFusionMutator::mutate().
void arm_compute::graph::detail::fuse_depthwise_convolution_with_batch_normalization | ( | Graph & | g, |
const Edge * | output_edge | ||
) |
Definition at line 136 of file NodeFusionMutator.cpp.
References Graph::add_connection(), Graph::add_node(), ARM_COMPUTE_ERROR_ON, ARM_COMPUTE_LOG_GRAPH_VERBOSE, arm_compute::graph::configure_tensor(), Edge::consumer(), Edge::consumer_id(), arm_compute::test::validation::conv_info, arm_compute::quantization::epsilon, arm_compute::graph::get_driving_nodes(), INode::input_edge(), NodeParams::name, Graph::node(), Edge::producer(), Edge::producer_id(), and Graph::remove_node().
Referenced by NodeFusionMutator::mutate().
void arm_compute::graph::detail::fuse_layer | ( | Graph & | g, |
std::function< bool(INode &)> const & | prec, | ||
const F | fuse_fcn, | ||
Args &&... | optional_arguments | ||
) |
Definition at line 269 of file NodeFusionMutator.cpp.
References Graph::edge(), and Graph::nodes().
void arm_compute::graph::detail::fuse_node_with_activation | ( | Graph & | g, |
const Edge * | output_edge, | ||
const std::set< Activation > & | supported_fused_activations | ||
) |
Definition at line 214 of file NodeFusionMutator.cpp.
References Graph::add_connection(), ARM_COMPUTE_ERROR_ON, ARM_COMPUTE_LOG_GRAPH_VERBOSE, Edge::consumer(), Edge::consumer_id(), arm_compute::graph::EltwiseLayer, arm_compute::graph::get_driving_nodes(), arm_compute::is_data_type_float(), Edge::producer(), Edge::producer_id(), and Graph::remove_node().
void prepare_all_tasks | ( | ExecutionWorkload & | workload | ) |
Prepares all tasks for execution.
[in] | workload | Workload to prepare |
Definition at line 220 of file ExecutionHelpers.cpp.
References ARM_COMPUTE_ERROR_ON, ExecutionWorkload::graph, release_unused_tensors(), and ExecutionWorkload::tasks.
Referenced by GraphManager::finalize_graph().
void release_unused_tensors | ( | Graph & | g | ) |
Release the memory of all unused const nodes.
[in] | g | Graph to release the memory from |
Definition at line 176 of file ExecutionHelpers.cpp.
References Graph::tensors().
Referenced by prepare_all_tasks().
void validate_all_nodes | ( | Graph & | g | ) |
Validates all nodes.
[in] | g | Graph to validate |
Definition at line 39 of file ExecutionHelpers.cpp.
References ARM_COMPUTE_ERROR_ON_MSG, Status::error_description(), BackendRegistry::get(), BackendRegistry::get_backend(), Graph::nodes(), and IDeviceBackend::validate_node().
Referenced by GraphManager::finalize_graph().