Compute Library
 22.08
arm_conv::pooling Namespace Reference

Data Structures

struct  a64_fp32_nhwc_avg_3x3_s1_output2x2_depthfirst
 
struct  a64_fp32_nhwc_max_2x2_s1_output2x2_depthfirst
 
struct  a64_s8_nhwc_max_2x2_s1_output2x2_depthfirst
 
struct  a64_u8_nhwc_max_2x2_s1_output2x2_depthfirst
 
struct  cpp_nhwc_1x1_stride_any_depthfirst
 
class  DepthfirstDriver
 
class  DepthfirstStrategy
 
class  GenericDepthfirstWrapper
 
class  IDepthfirstStrategy
 
class  IGenericDepthfirstStrategy
 
class  IGenericDepthfirstStrategy< TInput, TOutput, Nothing >
 
class  IGenericDepthfirstStrategy< TInput, TOutput, Requantize32 >
 
struct  Invoker
 
struct  Invoker< TInput, TOutput, Nothing >
 
struct  Invoker< TInput, TOutput, Requantize32 >
 
class  PoolingDepthfirst
 
class  PoolingDepthfirstCacheOblivious
 
class  PoolingDepthfirstGeneric
 
class  PoolingDepthfirstGenericQuantized
 
struct  PoolingImplementation
 
struct  TensorSpec
 
struct  WorkingSpace
 

Functions

void a64_fp32_nhwc_avg_3x3_s1_output2x2_depthfirst_impl (unsigned int, const float *const *const, float *const *const, bool, unsigned int, unsigned int, unsigned int, unsigned int)
 
void a64_fp32_nhwc_max_2x2_s1_output2x2_depthfirst_impl (unsigned int, const float *const *const, float *const *const, bool, unsigned int, unsigned int, unsigned int, unsigned int)
 
void a64_s8_nhwc_max_2x2_s1_output2x2_depthfirst_impl (unsigned int, const int8_t *const *const, int8_t *const *const, bool, unsigned int, unsigned int, unsigned int, unsigned int)
 
void a64_u8_nhwc_max_2x2_s1_output2x2_depthfirst_impl (unsigned int, const uint8_t *const *const, uint8_t *const *const, bool, unsigned int, unsigned int, unsigned int, unsigned int)
 
template<typename T >
void cpp_nhwc_1x1_stride_any_depthfirst_impl (uint64_t, uint64_t, const uint64_t n_channels, const T *const *const inptrs, T *outptr)
 
template void cpp_nhwc_1x1_stride_any_depthfirst_impl (uint64_t, uint64_t, uint64_t, const float *const *, float *)
 
template void cpp_nhwc_1x1_stride_any_depthfirst_impl (uint64_t, uint64_t, uint64_t, const int8_t *const *, int8_t *)
 
template void cpp_nhwc_1x1_stride_any_depthfirst_impl (uint64_t, uint64_t, uint64_t, const uint8_t *const *, uint8_t *)
 
template<>
const PoolingImplementation< float, float > * pooling_implementation_list ()
 
template UniquePoolingCommon< float, float > pooling (const PoolingArgs &, const Nothing &)
 
template<typename TInput , typename TOutput , class OutputStage = Nothing>
const PoolingImplementation< TInput, TOutput, OutputStage > * pooling_implementation_list ()
 
template<typename TInput , typename TOutput , class OutputStage = Nothing>
bool find_implementation (const PoolingArgs &args, const OutputStage &os, const PoolingImplementation< TInput, TOutput, OutputStage > *&selected)
 
template<typename TInput , typename TOutput , class OutputStage >
UniquePoolingCommon< TInput, TOutput > pooling (const PoolingArgs &args, const OutputStage &os)
 
template<class Strategy >
bool is_supported (const PoolingArgs &args, const Nothing &)
 
template<>
const PoolingImplementation< int8_t, int8_t > * pooling_implementation_list ()
 
template<>
const PoolingImplementation< int8_t, int8_t, Requantize32 > * pooling_implementation_list ()
 
template UniquePoolingCommon< int8_t, int8_t > pooling (const PoolingArgs &, const Requantize32 &)
 
template<>
const PoolingImplementation< uint8_t, uint8_t > * pooling_implementation_list ()
 
template<>
const PoolingImplementation< uint8_t, uint8_t, Requantize32 > * pooling_implementation_list ()
 

Function Documentation

◆ a64_fp32_nhwc_avg_3x3_s1_output2x2_depthfirst_impl()

void arm_conv::pooling::a64_fp32_nhwc_avg_3x3_s1_output2x2_depthfirst_impl ( unsigned  int,
const float *const *  const,
float *const *  const,
bool  ,
unsigned  int,
unsigned  int,
unsigned  int,
unsigned  int 
)

◆ a64_fp32_nhwc_max_2x2_s1_output2x2_depthfirst_impl()

void arm_conv::pooling::a64_fp32_nhwc_max_2x2_s1_output2x2_depthfirst_impl ( unsigned  int,
const float *const *  const,
float *const *  const,
bool  ,
unsigned  int,
unsigned  int,
unsigned  int,
unsigned  int 
)

◆ a64_s8_nhwc_max_2x2_s1_output2x2_depthfirst_impl()

void arm_conv::pooling::a64_s8_nhwc_max_2x2_s1_output2x2_depthfirst_impl ( unsigned  int,
const int8_t *const *  const,
int8_t *const *  const,
bool  ,
unsigned  int,
unsigned  int,
unsigned  int,
unsigned  int 
)

◆ a64_u8_nhwc_max_2x2_s1_output2x2_depthfirst_impl()

void arm_conv::pooling::a64_u8_nhwc_max_2x2_s1_output2x2_depthfirst_impl ( unsigned  int,
const uint8_t *const *  const,
uint8_t *const *  const,
bool  ,
unsigned  int,
unsigned  int,
unsigned  int,
unsigned  int 
)

◆ cpp_nhwc_1x1_stride_any_depthfirst_impl() [1/4]

void cpp_nhwc_1x1_stride_any_depthfirst_impl ( uint64_t  ,
uint64_t  ,
const uint64_t  n_channels,
const T *const *const  inptrs,
T *  outptr 
)

Definition at line 32 of file generic.cpp.

39 {
40  std::memcpy(outptr, inptrs[0], n_channels * sizeof(T));
41 }

◆ cpp_nhwc_1x1_stride_any_depthfirst_impl() [2/4]

template void arm_conv::pooling::cpp_nhwc_1x1_stride_any_depthfirst_impl ( uint64_t  ,
uint64_t  ,
uint64_t  ,
const float *const *  ,
float *   
)

◆ cpp_nhwc_1x1_stride_any_depthfirst_impl() [3/4]

template void arm_conv::pooling::cpp_nhwc_1x1_stride_any_depthfirst_impl ( uint64_t  ,
uint64_t  ,
uint64_t  ,
const int8_t *const *  ,
int8_t *   
)

◆ cpp_nhwc_1x1_stride_any_depthfirst_impl() [4/4]

template void arm_conv::pooling::cpp_nhwc_1x1_stride_any_depthfirst_impl ( uint64_t  ,
uint64_t  ,
uint64_t  ,
const uint8_t *const *  ,
uint8_t *   
)

◆ find_implementation()

bool arm_conv::pooling::find_implementation ( const PoolingArgs &  args,
const OutputStage &  os,
const PoolingImplementation< TInput, TOutput, OutputStage > *&  selected 
)

Definition at line 64 of file pooling_implementation.hpp.

69 {
70  // For now, return the first valid implementation
71  const auto *impl = pooling_implementation_list<TInput, TOutput, OutputStage>();
72  for (; impl->method != PoolingMethod::DEFAULT; impl++)
73  {
74  if (args.config != nullptr)
75  {
76  // Apply filters provided by the configuration
77  const auto cfg = args.config;
78 
79  if (cfg->filter != "" && !std::strstr(impl->name, cfg->filter.c_str()))
80  {
81  continue;
82  }
83  }
84 
85  if (impl->get_is_supported(args, os))
86  {
87  selected = impl;
88  return true;
89  }
90  }
91  return false;
92 }

◆ is_supported()

bool arm_conv::pooling::is_supported ( const PoolingArgs &  args,
const Nothing &   
)

Definition at line 103 of file pooling_implementation.hpp.

104 {
105  return ((args.pool_type == Strategy::pooling_type) &&
106  (args.pool_window.rows == Strategy::pool_rows) &&
107  (args.pool_window.cols == Strategy::pool_cols) &&
108  (args.pool_stride.rows == Strategy::stride_rows) &&
109  (args.pool_stride.cols == Strategy::stride_cols));
110 }

◆ pooling() [1/3]

UniquePoolingCommon<TInput, TOutput> arm_conv::pooling::pooling ( const PoolingArgs &  args,
const OutputStage &  os 
)

Definition at line 95 of file pooling_implementation.hpp.

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

96 {
97  const PoolingImplementation<TInput, TOutput, OutputStage> *impl = nullptr;
98  const bool success = find_implementation<TInput, TOutput, OutputStage>(args, os, impl);
99  return UniquePoolingCommon<TInput, TOutput>(success ? impl->get_instance(args, os) : nullptr);
100 }

◆ pooling() [2/3]

template UniquePoolingCommon< uint8_t, uint8_t > pooling ( const PoolingArgs &  ,
const Requantize32 &   
)

◆ pooling() [3/3]

template UniquePoolingCommon< uint8_t, uint8_t > pooling ( const PoolingArgs &  ,
const Nothing &   
)

◆ pooling_implementation_list() [1/6]

const PoolingImplementation<TInput, TOutput, OutputStage>* arm_conv::pooling::pooling_implementation_list ( )

Definition at line 159 of file pooling_fp32.cpp.

References pooling().

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

160 {
161  return pooling_fp32_methods;
162 }

◆ pooling_implementation_list() [2/6]

const PoolingImplementation<int8_t, int8_t, Requantize32>* arm_conv::pooling::pooling_implementation_list ( )

Definition at line 99 of file pooling_s8q.cpp.

References pooling().

100 {
101  return pooling_s8q_methods;
102 }

◆ pooling_implementation_list() [3/6]

const PoolingImplementation<uint8_t, uint8_t, Requantize32>* arm_conv::pooling::pooling_implementation_list ( )

Definition at line 99 of file pooling_u8q.cpp.

References pooling().

100 {
101  return pooling_u8q_methods;
102 }

◆ pooling_implementation_list() [4/6]

const PoolingImplementation<int8_t, int8_t>* arm_conv::pooling::pooling_implementation_list ( )

Definition at line 136 of file pooling_s8.cpp.

References pooling().

137 {
138  return pooling_s8_methods;
139 }

◆ pooling_implementation_list() [5/6]

const PoolingImplementation<uint8_t, uint8_t>* arm_conv::pooling::pooling_implementation_list ( )

Definition at line 151 of file pooling_u8.cpp.

References pooling().

152 {
153  return pooling_u8_methods;
154 }

◆ pooling_implementation_list() [6/6]

const PoolingImplementation<float, float>* arm_conv::pooling::pooling_implementation_list ( )

Definition at line 159 of file pooling_fp32.cpp.

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

160 {
161  return pooling_fp32_methods;
162 }