Compute Library
 21.05
arm_compute::graph::backends Namespace Reference

Namespaces

 detail
 

Data Structures

class  BackendRegistry
 Registry holding all the supported backends. More...
 
class  CLDeviceBackend
 OpenCL device backend. More...
 
class  CLFunctionFactory
 Factory for generating OpenCL backend functions. More...
 
class  CLNodeValidator
 
class  CLSubTensorHandle
 OpenCL Sub-Tensor handle interface object. More...
 
class  CLTensorHandle
 OpenCL Tensor handle interface object. More...
 
class  FusedConvolutionBatchNormalizationFunction
 Wrapper function to first apply {NE, CL}BatchNormalizationLayer on the weights and then run {NE, CL}ConvolutionLayer with the modified weights. More...
 
class  FusedDepthwiseConvolutionBatchNormalizationFunction
 Wrapper function to first apply {NE, CL}BatchNormalizationLayer on the weights and then run {NE, CL}DepthwiseConvolutionLayer with the modified weights. More...
 
class  IDeviceBackend
 Device backend interface. More...
 
class  NEDeviceBackend
 CPU device backend. More...
 
class  NEFunctionFactory
 Factory for generating CPU backend functions. More...
 
class  NENodeValidator
 
class  NESubTensorHandle
 CPU Sub-Tensor handle interface object. More...
 
class  NETensorHandle
 CPU Tensor handle interface object. More...
 

Functions

template<typename FunctionType , typename FunctionNameType , typename... ParameterType>
std::tuple< std::unique_ptr< arm_compute::IFunction >, FunctionNameType > create_named_function (FunctionNameType name, ParameterType... args)
 Creates and configures a named function. More...
 
template<typename FunctionType , typename FunctionNameType , typename MemoryManagerType , typename... ParameterType>
std::tuple< std::unique_ptr< arm_compute::IFunction >, FunctionNameType > create_named_memory_managed_function (FunctionNameType name, MemoryManagerType mm, ParameterType... args)
 Creates and configures a named function. More...
 
bool is_in_place_operation (void *input, void *output)
 Checks if an operation is in place. More...
 
std::shared_ptr< IMemoryManagerget_memory_manager (GraphContext &ctx, Target target)
 Returns the memory manager for a given target. More...
 
std::shared_ptr< IWeightsManagerget_weights_manager (GraphContext &ctx, Target target)
 Returns the weights manager for a given target. More...
 

Function Documentation

◆ create_named_function()

std::tuple<std::unique_ptr<arm_compute::IFunction>, FunctionNameType> arm_compute::graph::backends::create_named_function ( FunctionNameType  name,
ParameterType...  args 
)

Creates and configures a named function.

Parameters
[in]nameName of the function
[in]argsFunction arguments
Returns
A configured backend function

Definition at line 45 of file Utils.h.

46 {
47  auto f = std::make_unique<FunctionType>();
48  f->configure(std::forward<ParameterType>(args)...);
49  return std::make_pair(std::move(f), name);
50 }
const char * name

References GemmTuner::args, and name.

◆ create_named_memory_managed_function()

std::tuple<std::unique_ptr<arm_compute::IFunction>, FunctionNameType> arm_compute::graph::backends::create_named_memory_managed_function ( FunctionNameType  name,
MemoryManagerType  mm,
ParameterType...  args 
)

Creates and configures a named function.

Parameters
[in]nameName of the function
[in]mmMemory manager to use
[in]argsFunction arguments
Returns
A configured backend function

Definition at line 61 of file Utils.h.

64 {
65  auto f = std::make_unique<FunctionType>(mm);
66  f->configure(std::forward<ParameterType>(args)...);
67  return std::make_pair(std::move(f), name);
68 }
const char * name

References GemmTuner::args, and name.

◆ get_memory_manager()

std::shared_ptr<IMemoryManager> arm_compute::graph::backends::get_memory_manager ( GraphContext ctx,
Target  target 
)
inline

◆ get_weights_manager()

std::shared_ptr<IWeightsManager> arm_compute::graph::backends::get_weights_manager ( GraphContext ctx,
Target  target 
)
inline

Returns the weights manager for a given target.

Parameters
[in]ctxGraph context containing weight management metadata
[in]targetTarget to retrieve the weights manager from
Returns
The weights manager for the given target else false

Definition at line 102 of file Utils.h.

103 {
104  bool enabled = ctx.config().use_function_weights_manager && (ctx.weights_management_ctx(target) != nullptr);
105  return enabled ? ctx.weights_management_ctx(target)->wm : nullptr;
106 }

References GraphContext::config(), GraphConfig::use_function_weights_manager, GraphContext::weights_management_ctx(), and WeightsManagerContext::wm.

Referenced by arm_compute::graph::backends::detail::create_fully_connected_layer().

◆ is_in_place_operation()

bool arm_compute::graph::backends::is_in_place_operation ( void *  input,
void *  output 
)
inline

Checks if an operation is in place.

Parameters
[in]inputPointer to input
[in]outputPointer to output
Returns
True if output is nullptr or input is equal to the output, else false

Definition at line 77 of file Utils.h.

78 {
79  return (output == nullptr) || (input == output);
80 }

References arm_compute::test::validation::input.

Referenced by arm_compute::graph::backends::detail::create_activation_layer(), and arm_compute::graph::backends::detail::create_batch_normalization_layer().