Compute Library
 22.05
ClDequantize Class Reference

Basic function to run kernels::ClDequantizeKernel that dequantizes an input tensor. More...

#include <ClDequantize.h>

Collaboration diagram for ClDequantize:
[legend]

Public Member Functions

void configure (const CLCompileContext &compile_context, ITensorInfo *src, ITensorInfo *dst)
 Set the input and output tensors. More...
 
void run (ITensorPack &tensors) override
 Run the kernels contained in the function. More...
 
- Public Member Functions inherited from ICLOperator
 ICLOperator (IRuntimeContext *ctx=nullptr)
 Constructor. More...
 
 ICLOperator (const ICLOperator &)=delete
 Prevent instances of this class from being copied (As this class contains pointers) More...
 
 ICLOperator (ICLOperator &&)=default
 Default move constructor. More...
 
ICLOperatoroperator= (const ICLOperator &)=delete
 Prevent instances of this class from being copied (As this class contains pointers) More...
 
ICLOperatoroperator= (ICLOperator &&)=default
 Default move assignment operator. More...
 
void prepare (ITensorPack &constants) override
 Prepare the function for executing. More...
 
MemoryRequirements workspace () const override
 Return the memory requirements required by the workspace. More...
 
- Public Member Functions inherited from IOperator
virtual ~IOperator ()=default
 Destructor. More...
 

Static Public Member Functions

static Status validate (const ITensorInfo *src, const ITensorInfo *dst)
 Static function to check if given info will lead to a valid configuration. More...
 

Detailed Description

Basic function to run kernels::ClDequantizeKernel that dequantizes an input tensor.

Definition at line 35 of file ClDequantize.h.

Member Function Documentation

◆ configure()

void configure ( const CLCompileContext compile_context,
ITensorInfo src,
ITensorInfo dst 
)

Set the input and output tensors.

Parameters
[in]compile_contextThe compile context to be used.
[in]srcSource tensor info. Data types supported: QASYMM8/QASYMM8_SIGNED/QSYMM8_PER_CHANNEL/QSYMM8/QSYMM16.
[out]dstDestination tensor info with the same dimensions of src. Data type supported: F16/F32.

Definition at line 37 of file ClDequantize.cpp.

References ARM_COMPUTE_LOG_PARAMS, and arm_compute::test::validation::k.

38 {
40  auto k = std::make_unique<kernels::ClDequantizeKernel>();
41  k->configure(compile_context, src, dst);
42  _kernel = std::move(k);
43 }
SimpleTensor< float > src
Definition: DFT.cpp:155
#define ARM_COMPUTE_LOG_PARAMS(...)

◆ run()

void run ( ITensorPack tensors)
overridevirtual

Run the kernels contained in the function.

Parameters
[in]tensorsVector that contains the tensors to operate on.

Reimplemented from ICLOperator.

Definition at line 50 of file ClDequantize.cpp.

References ARM_COMPUTE_ERROR_ON_MSG, ITensorPack::empty(), CLScheduler::enqueue_op(), and CLScheduler::get().

51 {
52  ARM_COMPUTE_ERROR_ON_MSG(tensors.empty(), "No inputs provided");
53  CLScheduler::get().enqueue_op(*_kernel.get(), tensors);
54 }
static CLScheduler & get()
Access the scheduler singleton.
#define ARM_COMPUTE_ERROR_ON_MSG(cond, msg)
Definition: Error.h:456
void enqueue_op(ICLKernel &kernel, ITensorPack &tensors, bool flush=true)
Schedule the execution of the passed kernel if possible.

◆ validate()

Status validate ( const ITensorInfo src,
const ITensorInfo dst 
)
static

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

Similar to ClDequantize::configure()

Returns
a status

Definition at line 45 of file ClDequantize.cpp.

References ClDequantizeKernel::validate().

Referenced by CLDequantizationLayer::validate().

46 {
48 }
SimpleTensor< float > src
Definition: DFT.cpp:155
static Status validate(const ITensorInfo *src, const ITensorInfo *dst)
Static function to check if given info will lead to a valid configuration.

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