24.02.1
|
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 | transfer_driving_nodes_and_remove_old_node (Graph &g, INode *new_node, INode *old_node, bool add_output_tensor) |
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 N > | |
void | fuse_pad_with_convolution (Graph &g, const Edge *output_edge) |
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) |
template<typename N1 , 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 ARM_COMPUTE_ERROR_ON_MSG, INode::input(), INode::num_inputs(), and tensor.
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 ARM_COMPUTE_ERROR_ON_MSG, INode::num_outputs(), INode::output(), and tensor.
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 tensor, and 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 194 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 210 of file ExecutionHelpers.cpp.
References arm_compute::mlgo::parser::end(), arm_compute::utility::for_each(), ExecutionWorkload::inputs, and arm_compute::test::validation::is_valid.
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 261 of file ExecutionHelpers.cpp.
References arm_compute::mlgo::parser::end(), arm_compute::utility::for_each(), arm_compute::test::validation::is_valid, ExecutionWorkload::outputs, and arm_compute::graph::sync_backends().
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 232 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 188 of file ExecutionHelpers.cpp.
References ARM_COMPUTE_ERROR_ON, and tensor.
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 134 of file ExecutionHelpers.cpp.
References INode::assigned_target(), IDeviceBackend::configure_node(), ExecutionWorkload::ctx, 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(), tensor, 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 237 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 80 of file NodeFusionMutator.cpp.
References arm_compute::test::validation::act_info, Graph::add_connection(), Graph::add_node(), ARM_COMPUTE_ERROR_ON, ARM_COMPUTE_LOG_GRAPH_VERBOSE, Edge::consumer(), Edge::consumer_id(), arm_compute::test::validation::conv_info, arm_compute::quantization::epsilon, INode::input_edge(), INode::name(), NodeParams::name, Graph::node(), arm_compute::test::validation::num_groups, Edge::producer(), Edge::producer_id(), Graph::remove_node(), and transfer_driving_nodes_and_remove_old_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 164 of file NodeFusionMutator.cpp.
References arm_compute::test::validation::act_info, Graph::add_connection(), Graph::add_node(), ARM_COMPUTE_ERROR_ON, ARM_COMPUTE_LOG_GRAPH_VERBOSE, Edge::consumer(), Edge::consumer_id(), arm_compute::test::validation::conv_info, arm_compute::quantization::epsilon, INode::input_edge(), INode::name(), NodeParams::name, Graph::node(), Edge::producer(), Edge::producer_id(), Graph::remove_node(), and transfer_driving_nodes_and_remove_old_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 320 of file NodeFusionMutator.cpp.
References Graph::edge(), Graph::node(), Graph::nodes(), and INode::output_edges().
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 345 of file NodeFusionMutator.cpp.
References Graph::edge(), Graph::node(), Graph::nodes(), and INode::output_edges().
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 235 of file NodeFusionMutator.cpp.
References ARM_COMPUTE_ERROR_ON, ARM_COMPUTE_LOG_GRAPH_VERBOSE, Edge::consumer(), Edge::consumer_id(), arm_compute::graph::EltwiseLayer, arm_compute::is_data_type_float(), Edge::producer(), Edge::producer_id(), and transfer_driving_nodes_and_remove_old_node().
Definition at line 278 of file NodeFusionMutator.cpp.
References Tensor::accessor(), Graph::add_connection(), Edge::consumer(), arm_compute::test::validation::conv_info, Tensor::desc(), arm_compute::graph::get_dimension_idx(), arm_compute::graph::get_driver_nodes(), arm_compute::HEIGHT, arm_compute::graph::is_padding_in_height_or_width(), TensorDescriptor::layout, Edge::producer(), Graph::remove_node(), Edge::tensor(), and arm_compute::WIDTH.
void prepare_all_tasks | ( | ExecutionWorkload & | workload | ) |
Prepares all tasks for execution.
[in] | workload | Workload to prepare |
Definition at line 222 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 177 of file ExecutionHelpers.cpp.
References tensor, and Graph::tensors().
Referenced by prepare_all_tasks().
void arm_compute::graph::detail::transfer_driving_nodes_and_remove_old_node | ( | Graph & | g, |
INode * | new_node, | ||
INode * | old_node, | ||
bool | add_output_tensor | ||
) |
Definition at line 46 of file NodeFusionMutator.cpp.
References Graph::add_connection(), arm_compute::graph::configure_tensor(), Tensor::extract_accessor(), arm_compute::graph::get_driving_nodes(), INode::id(), INode::output(), Graph::remove_node(), and Tensor::set_accessor().
Referenced by fuse_convolution_with_batch_normalization(), fuse_depthwise_convolution_with_batch_normalization(), and fuse_node_with_activation().
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().