Compute Library
 22.05
arm_conv::depthwise Namespace Reference

Namespaces

 depthfirst_multiplier
 
 depthwise_depthfirst
 
 interleaves
 

Data Structures

struct  DefaultOutputStage
 
struct  DefaultOutputStage< int8_t >
 
struct  DefaultOutputStage< uint8_t >
 
struct  DefaultTAccum
 
struct  DefaultTAccum< int8_t >
 
struct  DefaultTAccum< uint8_t >
 
class  DepthfirstDriver
 
class  DepthfirstMultiplierStrategy
 
class  DepthfirstMultiplierStrategy< TInput, TWeight, TOutput, int32_t >
 
class  DepthfirstStrategy
 
class  DepthfirstStrategyUntyped
 
class  DepthwiseDepthfirst
 
class  DepthwiseDepthfirstCommon
 
class  DepthwiseDepthfirstGeneric
 
struct  DepthwiseDepthfirstGenericKernelCall
 
struct  DepthwiseDepthfirstGenericKernelCall< arm_gemm::Requantize32 >
 
struct  DepthwiseDepthfirstGenericKernelCall< Nothing >
 
class  DepthwiseDepthfirstGenericQuantized
 
class  DepthwiseDepthfirstGenericWithMultiplier
 
class  DepthwiseDepthfirstGenericWithMultiplierBase
 
class  DepthwiseDepthfirstGenericWithMultiplierQuantized
 
class  DepthwiseDepthfirstMultiplier
 
class  DepthwiseDepthfirstQuantized
 
class  DepthwiseDepthfirstStrategy
 
class  DepthwiseDepthfirstStrategy< TInput, TWeight, TOutput, int32_t >
 
class  DepthwiseDepthfirstStrategyCommon
 
class  DepthwiseDepthfirstWithMultiplierQuantized
 
struct  DepthwiseImplementation
 
class  DepthwisePlanar
 
class  GenericDepthfirstKernelStrategy
 
struct  GenericDepthfirstKernelStrategyFunctionType
 
struct  GenericDepthfirstKernelStrategyFunctionType< TInput, TOutput, int32_t >
 
class  GenericDepthfirstMultiplierKernelStrategy
 
class  GenericDepthfirstMultiplierKernelStrategy< TInput, TWeight, TOutput, int32_t >
 
class  GenericDepthfirstMultiplierStrategy
 
class  GenericDepthfirstStrategy
 
class  GenericInputArrayElement
 
class  IDepthfirstStrategy
 
struct  interleave_a64_s8q_3x3_dot
 
struct  interleave_a64_u8q_3x3_dot
 
class  IPlanarStrategy
 
struct  PlanarKernelType
 
struct  PlanarKernelType< TInput, TWeight, TOutput, int32_t, arm_gemm::Requantize32 >
 
struct  PlanarKernelType< TInput, TWeight, TOutput, TAccum, Nothing >
 
class  PlanarStrategy
 
struct  TensorSpec
 

Functions

template<>
const DepthwiseImplementation< float > * depthwise_implementation_list ()
 
template UniqueDepthwiseCommon< float > depthwise (const DepthwiseArgs &, const Nothing &)
 
template std::vector< KernelDescription > get_compatible_kernels< float > (const DepthwiseArgs &, const Nothing &)
 
template<typename TInput , typename TWeight = TInput, typename TOutput = TInput, class OutputStage = Nothing>
const DepthwiseImplementation< TInput, TWeight, TOutput, OutputStage > * depthwise_implementation_list ()
 
template<typename TInput , typename TWeight = TInput, typename TOutput = TInput, class OutputStage = Nothing>
bool find_implementation (const DepthwiseArgs &args, const OutputStage &os, const DepthwiseImplementation< TInput, TWeight, TOutput, OutputStage > *&selected)
 
template<typename TInput , typename TWeight , typename TOutput , class OutputStage >
std::vector< KernelDescription > get_compatible_kernels (const DepthwiseArgs &args, const OutputStage &os)
 
template<typename TInput , typename TWeight , typename TOutput , class OutputStage >
UniqueDepthwiseCommon< TInput, TWeight, TOutput > depthwise (const DepthwiseArgs &args, const OutputStage &os)
 
template<>
const DepthwiseImplementation< int8_t, int8_t, int8_t, Requantize32 > * depthwise_implementation_list ()
 
template UniqueDepthwiseCommon< int8_t, int8_t, int8_t > depthwise (const DepthwiseArgs &, const Requantize32 &)
 
template std::vector< KernelDescription > get_compatible_kernels< int8_t, int8_t, int8_t, Requantize32 > (const DepthwiseArgs &, const Requantize32 &)
 
template<>
const DepthwiseImplementation< uint8_t, uint8_t, uint8_t, Requantize32 > * depthwise_implementation_list ()
 
template std::vector< KernelDescription > get_compatible_kernels< uint8_t, uint8_t, uint8_t, Requantize32 > (const DepthwiseArgs &, const Requantize32 &)
 
template<>
const DepthwiseImplementation< uint8_t, int8_t, uint8_t, Requantize32 > * depthwise_implementation_list ()
 
template std::vector< KernelDescription > get_compatible_kernels< uint8_t, int8_t, uint8_t, Requantize32 > (const DepthwiseArgs &, const Requantize32 &)
 

Function Documentation

◆ depthwise() [1/3]

UniqueDepthwiseCommon<TInput, TWeight, TOutput> arm_conv::depthwise::depthwise ( const DepthwiseArgs &  args,
const OutputStage &  os 
)

Definition at line 135 of file depthwise_implementation.hpp.

References GemmTuner::args, DepthwiseImplementation< TInput, TWeight, TOutput, OutputStage >::get_instance(), and arm_compute::test::validation::success.

136 {
137  const DepthwiseImplementation<TInput, TWeight, TOutput, OutputStage> *impl = nullptr;
138  const bool success = find_implementation<TInput, TWeight, TOutput, OutputStage>(args, os, impl);
139  return UniqueDepthwiseCommon<TInput, TWeight, TOutput>(success ? impl->get_instance(args, os) : nullptr);
140 }

◆ depthwise() [2/3]

template UniqueDepthwiseCommon< uint8_t, int8_t, uint8_t > depthwise ( const DepthwiseArgs &  ,
const Requantize32  
)

◆ depthwise() [3/3]

template UniqueDepthwiseCommon<float> arm_conv::depthwise::depthwise ( const DepthwiseArgs &  ,
const Nothing  
)

◆ depthwise_implementation_list() [1/5]

◆ depthwise_implementation_list() [2/5]

const DepthwiseImplementation<uint8_t, int8_t, uint8_t, Requantize32>* arm_conv::depthwise::depthwise_implementation_list ( )

Definition at line 160 of file depthwise_u8s8u8q.cpp.

References depthwise(), get_compatible_kernels< float >(), and get_compatible_kernels< uint8_t, int8_t, uint8_t, Requantize32 >().

161 {
162  return depthwise_u8q_methods;
163 }

◆ depthwise_implementation_list() [3/5]

const DepthwiseImplementation<int8_t, int8_t, int8_t, Requantize32>* arm_conv::depthwise::depthwise_implementation_list ( )

Definition at line 285 of file depthwise_s8q.cpp.

References depthwise(), and get_compatible_kernels< int8_t, int8_t, int8_t, Requantize32 >().

286 {
287  return depthwise_s8q_methods;
288 }

◆ depthwise_implementation_list() [4/5]

const DepthwiseImplementation<uint8_t, uint8_t, uint8_t, Requantize32>* arm_conv::depthwise::depthwise_implementation_list ( )

Definition at line 292 of file depthwise_u8q.cpp.

References depthwise(), and get_compatible_kernels< uint8_t, uint8_t, uint8_t, Requantize32 >().

293 {
294  return depthwise_u8q_methods;
295 }

◆ depthwise_implementation_list() [5/5]

const DepthwiseImplementation<float>* arm_conv::depthwise::depthwise_implementation_list ( )

Definition at line 301 of file depthwise_fp32.cpp.

Referenced by DepthwiseImplementation< TInput, TWeight, TOutput, OutputStage >::get_instance().

302 {
303  return depthwise_fp32_methods;
304 }

◆ find_implementation()

bool arm_conv::depthwise::find_implementation ( const DepthwiseArgs &  args,
const OutputStage &  os,
const DepthwiseImplementation< TInput, TWeight, TOutput, OutputStage > *&  selected 
)

Definition at line 66 of file depthwise_implementation.hpp.

References DepthwiseImplementation< TInput, TWeight, TOutput, OutputStage >::cycle_estimate.

71 {
72  selected = nullptr;
73  uint64_t best_cycle_estimate = UINT64_MAX;
74 
75  const auto *impl = depthwise_implementation_list<TInput, TWeight, TOutput, OutputStage>();
76  for (; impl->method != DepthwiseMethod::DEFAULT; impl++)
77  {
78  const bool has_cfg = (args.config != nullptr);
79  const auto &cfg = args.config;
80 
81  if (
82  !impl->get_is_supported(args, os) || // Problem is unsupported
83  (has_cfg && cfg->method != DepthwiseMethod::DEFAULT && cfg->method != impl->method) ||
84  (has_cfg && cfg->filter != "" && !std::strstr(impl->name, cfg->filter.c_str()))
85  )
86  {
87  continue;
88  }
89 
90  const auto cycle_estimate = impl->get_cycle_estimate(args, os);
91 
92  if (cycle_estimate == 0)
93  {
94  selected = impl;
95  break;
96  }
97 
98  if (selected == nullptr || cycle_estimate < best_cycle_estimate)
99  {
100  selected = impl;
101  best_cycle_estimate = cycle_estimate;
102  }
103  }
104 
105  return (selected != nullptr);
106 }

◆ get_compatible_kernels()

std::vector<KernelDescription> arm_conv::depthwise::get_compatible_kernels ( const DepthwiseArgs &  args,
const OutputStage &  os 
)

Definition at line 109 of file depthwise_implementation.hpp.

References GemmTuner::args, and DepthwiseImplementation< TInput, TWeight, TOutput, OutputStage >::get_cycle_estimate().

110 {
111  std::vector<KernelDescription> kerns;
112 
113  // Find the default implementation so we can flag it accordingly
114  const DepthwiseImplementation<TInput, TWeight, TOutput, OutputStage> *default_impl;
115  find_implementation<TInput, TWeight, TOutput, OutputStage>(args, os, default_impl);
116 
117  for (auto impl = depthwise_implementation_list<TInput, TWeight, TOutput, OutputStage>();
118  impl->method != DepthwiseMethod::DEFAULT; impl++)
119  {
120  if (!impl->get_is_supported(args, os))
121  {
122  continue;
123  }
124 
125  kerns.emplace_back(
126  impl->method, impl->name, impl == default_impl,
127  impl->get_cycle_estimate(args, os)
128  );
129  }
130 
131  return kerns;
132 }

◆ get_compatible_kernels< float >()

template std::vector<KernelDescription> arm_conv::depthwise::get_compatible_kernels< float > ( const DepthwiseArgs &  ,
const Nothing  
)

◆ get_compatible_kernels< int8_t, int8_t, int8_t, Requantize32 >()

template std::vector<KernelDescription> arm_conv::depthwise::get_compatible_kernels< int8_t, int8_t, int8_t, Requantize32 > ( const DepthwiseArgs &  ,
const Requantize32  
)

◆ get_compatible_kernels< uint8_t, int8_t, uint8_t, Requantize32 >()

template std::vector<KernelDescription> arm_conv::depthwise::get_compatible_kernels< uint8_t, int8_t, uint8_t, Requantize32 > ( const DepthwiseArgs &  ,
const Requantize32  
)

◆ get_compatible_kernels< uint8_t, uint8_t, uint8_t, Requantize32 >()

template std::vector<KernelDescription> arm_conv::depthwise::get_compatible_kernels< uint8_t, uint8_t, uint8_t, Requantize32 > ( const DepthwiseArgs &  ,
const Requantize32  
)