Compute Library
 19.11
CLQuantizationLayer Class Reference

Basic function to simulate a quantization layer. More...

#include <CLQuantizationLayer.h>

Collaboration diagram for CLQuantizationLayer:
[legend]

Public Member Functions

void configure (const ICLTensor *input, ICLTensor *output)
 Set the input and output tensors. More...
 
- Public Member Functions inherited from ICLSimpleFunction
 ICLSimpleFunction (CLRuntimeContext *ctx=nullptr)
 Constructor. More...
 
 ICLSimpleFunction (const ICLSimpleFunction &)=delete
 Prevent instances of this class from being copied (As this class contains pointers) More...
 
 ICLSimpleFunction (ICLSimpleFunction &&)=default
 Default move constructor. More...
 
ICLSimpleFunctionoperator= (const ICLSimpleFunction &)=delete
 Prevent instances of this class from being copied (As this class contains pointers) More...
 
ICLSimpleFunctionoperator= (ICLSimpleFunction &&)=default
 Default move assignment operator. More...
 
void run () override final
 Run the kernels contained in the function. More...
 
- Public Member Functions inherited from IFunction
virtual ~IFunction ()=default
 Destructor. More...
 
virtual void prepare ()
 Prepare the function for executing. More...
 

Static Public Member Functions

static Status validate (const ITensorInfo *input, const ITensorInfo *output)
 Static function to check if given info will lead to a valid configuration of CLQuantizationLayer. More...
 

Detailed Description

Basic function to simulate a quantization layer.

This function calls the following CL kernels:

Note
The implementation supports only 3D input tensors.
  1. CLQuantizationLayerKernel

Definition at line 40 of file CLQuantizationLayer.h.

Member Function Documentation

◆ configure()

void configure ( const ICLTensor input,
ICLTensor output 
)

Set the input and output tensors.

Parameters
[in]inputSource tensor. The dimensions over the third will be interpreted as batches. Data types supported: F16/32.
[out]outputDestination tensor with the same dimensions of input. Data types supported: QASYMM8/QASYMM16.
Note
Output auto initialization is not supported by this function

Definition at line 31 of file CLQuantizationLayer.cpp.

32 {
33  auto k = arm_compute::support::cpp14::make_unique<CLQuantizationLayerKernel>();
34  k->configure(input, output);
35  _kernel = std::move(k);
36 }

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

Referenced by CLLSTMLayerQuantized::configure(), and arm_compute::test::validation::DATA_TEST_CASE().

◆ validate()

Status validate ( const ITensorInfo input,
const ITensorInfo output 
)
static

Static function to check if given info will lead to a valid configuration of CLQuantizationLayer.

Parameters
[in]inputInput tensor info. The dimensions over the third will be interpreted as batches. Data types supported: F16/32.
[in]outputOutput tensor info. Data types supported: QASYMM8/QASYMM16.
Returns
a status

Definition at line 38 of file CLQuantizationLayer.cpp.

39 {
41 }
static Status validate(const ITensorInfo *input, const ITensorInfo *output)
Static function to check if given info will lead to a valid configuration of CLQuantizationLayerKerne...

References arm_compute::test::validation::input, and CLQuantizationLayerKernel::validate().

Referenced by CLLSTMLayerQuantized::validate().


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