Compute Library
 22.08
DepthwiseDepthfirstGenericQuantized< Strategy, OutputRows, OutputCols > Class Template Reference

#include <depthwise_depthfirst_generic_quantized.hpp>

Collaboration diagram for DepthwiseDepthfirstGenericQuantized< Strategy, OutputRows, OutputCols >:
[legend]

Public Member Functions

 DepthwiseDepthfirstGenericQuantized (const DepthwiseArgs &args, const Requantize32 &qp)
 
 DepthwiseDepthfirstGenericQuantized (DepthwiseDepthfirstGenericQuantized &)=delete
 
DepthwiseDepthfirstGenericQuantizedoperator= (DepthwiseDepthfirstGenericQuantized &)=delete
 
void pack_parameters (void *buffer, const void *biases, const void *weights, size_t ld_weight_col, size_t ld_weight_row) override
 
void execute (const unsigned int batches, const unsigned int input_height, const unsigned int input_width, const unsigned int input_channels, const PaddingValues &padding, const void *const _input, const size_t ld_input_col, const size_t ld_input_row, const size_t ld_input_batch, const void *const parameters, const unsigned int output_height, const unsigned int output_width, void *const _output, const size_t ld_output_col, const size_t ld_output_row, const size_t ld_output_batch, void *const _working_space, const unsigned int thread_id, const unsigned int n_threads) const override
 

Detailed Description

template<class Strategy, unsigned OutputRows, unsigned int OutputCols>
class arm_conv::depthwise::DepthwiseDepthfirstGenericQuantized< Strategy, OutputRows, OutputCols >

Definition at line 42 of file depthwise_depthfirst_generic_quantized.hpp.

Constructor & Destructor Documentation

◆ DepthwiseDepthfirstGenericQuantized() [1/2]

DepthwiseDepthfirstGenericQuantized ( const DepthwiseArgs &  args,
const Requantize32 qp 
)
inline

◆ DepthwiseDepthfirstGenericQuantized() [2/2]

DepthwiseDepthfirstGenericQuantized ( DepthwiseDepthfirstGenericQuantized< Strategy, OutputRows, OutputCols > &  )
delete

Member Function Documentation

◆ execute()

void execute ( const unsigned int  batches,
const unsigned int  input_height,
const unsigned int  input_width,
const unsigned int  input_channels,
const PaddingValues &  padding,
const void *const  _input,
const size_t  ld_input_col,
const size_t  ld_input_row,
const size_t  ld_input_batch,
const void *const  parameters,
const unsigned int  output_height,
const unsigned int  output_width,
void *const  _output,
const size_t  ld_output_col,
const size_t  ld_output_row,
const size_t  ld_output_batch,
void *const  _working_space,
const unsigned int  thread_id,
const unsigned int  n_threads 
) const
inlineoverride

Definition at line 67 of file depthwise_depthfirst_generic_quantized.hpp.

References Requantize32::a_offset, arm_compute::test::validation::n, and GemmTuner::Strategy.

88  {
89  Strategy strat(this->m_args.cpu_info);
90 #ifdef CYCLE_PROFILING
91  arm_gemm::profiler prof;
92 #endif
93 
94  // Create a function to initialise the input buffer
95  const auto initialise_input_buffer = [this] (TInput *const buffer, const unsigned int n) {
96  std::memset(buffer, static_cast<TInput>(m_qp.a_offset), n * sizeof(TInput));
97  };
98 
99  // Create a function to execute a tile of work
100  const auto tile_fn = [&] (const TInput *const *const inptrs, TOutput *const * const outptrs) {
101 #ifdef CYCLE_PROFILING
102  auto p = prof.ScopedProfiler(
103  PROFILE_KERNEL,
104  (unsigned long) (OutputRows * OutputCols * this->m_args.kernel_rows* this->m_args.kernel_cols)
105  );
106 #endif
107  strat.kernel(inptrs, outptrs, parameters, m_qp,
108  this->m_args.kernel_rows * this->m_args.kernel_cols,
109  this->m_args.input_channels);
110  };
111 
112  // Call into a parent utility function to do the actual work.
113  Parent::execute_tiles(
114  tile_fn, initialise_input_buffer,
115  batches, input_height, input_width, input_channels, padding,
116  _input, ld_input_col, ld_input_row, ld_input_batch,
117  output_height, output_width,
118  _output, ld_output_col, ld_output_row, ld_output_batch,
119  _working_space, thread_id, n_threads
120  );
121  }
const size_t input_height
Definition: impl.cpp:61
const size_t input_width
Definition: impl.cpp:62
Strategy
Types.
Definition: GemmTuner.py:41
std::unique_ptr< ParametersLibrary > parameters
Definition: Framework.cpp:46
unsigned int batches

◆ operator=()

◆ pack_parameters()

void pack_parameters ( void *  buffer,
const void *  biases,
const void *  weights,
size_t  ld_weight_col,
size_t  ld_weight_row 
)
inlineoverride

Definition at line 60 of file depthwise_depthfirst_generic_quantized.hpp.

References Requantize32::bias, and arm_conv::depthwise::interleaves::quantized::pack_parameters().

61  {
62  m_qp.bias = static_cast<const TAccum *>(biases);
63  Parent::pack_parameters(buffer, biases, weights, ld_weight_col, ld_weight_row);
64  }
const int32_t * bias
Definition: arm_gemm.hpp:172
void pack_parameters(void *_buffer, const int32_t *biases, const T *weights, size_t ld_weight_col, size_t ld_weight_row, const DepthwiseArgs &args, const arm_gemm::Requantize32 &qp, const arm_gemm::VLType vl_type, const unsigned int accumulator_depth_vl)

The documentation for this class was generated from the following file: