Compute Library
 23.11
arm_conv::pooling Namespace Reference

Data Structures

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  PoolingDepthfirstGeneric
 
struct  PoolingImplementation
 
struct  TensorSpec
 
struct  WorkingSpace
 

Functions

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>
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 UniquePoolingCommon< int8_t, int8_t > pooling (const PoolingArgs &, const Requantize32 &)
 

Function Documentation

◆ 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 36 of file generic.cpp.

43 {
44  std::memcpy(outptr, inptrs[0], n_channels * sizeof(T));
45 }

◆ 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 67 of file pooling_implementation.hpp.

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

References GemmTuner::args.

◆ is_supported()

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

Definition at line 106 of file pooling_implementation.hpp.

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

References GemmTuner::args.

◆ pooling() [1/3]

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

◆ pooling() [2/3]

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

◆ pooling() [3/3]

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

Definition at line 98 of file pooling_implementation.hpp.

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

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

◆ pooling_implementation_list()

const PoolingImplementation< uint8_t, uint8_t, Requantize32 > * pooling_implementation_list ( )
related

Definition at line 217 of file pooling_fp32.cpp.

218 {
219  return pooling_fp32_methods;
220 }
GemmTuner.args
args
Definition: GemmTuner.py:679