ONE - On-device Neural Engine
Loading...
Searching...
No Matches
arm_compute::CLEmbeddingLookupKernel Class Reference

Class to perform EmbeddingLookup operation with opencl kernel. More...

#include <CLEmbeddingLookupKernel.h>

Collaboration diagram for arm_compute::CLEmbeddingLookupKernel:

Public Member Functions

 CLEmbeddingLookupKernel ()
 Construct a CLEmbeddingLookupKernel object.
 
 CLEmbeddingLookupKernel (const CLEmbeddingLookupKernel &)=delete
 Prevent instances of this class from being copied (As this class contains pointers)
 
CLEmbeddingLookupKerneloperator= (const CLEmbeddingLookupKernel &)=delete
 Prevent instances of this class from being copied (As this class contains pointers)
 
 CLEmbeddingLookupKernel (CLEmbeddingLookupKernel &&)=default
 Construct a CLEmbeddingLookupKernel object by using default move constructor.
 
CLEmbeddingLookupKerneloperator= (CLEmbeddingLookupKernel &&)=default
 Move assignment operator.
 
 ~CLEmbeddingLookupKernel ()=default
 Destruct this object.
 
void configure (const ICLTensor *input, ICLTensor *output, const ICLTensor *lookups)
 Set the input and output of the kernel.
 
void run (const Window &window, cl::CommandQueue &queue) override
 Enqueue the OpenCL kernel to process the given window on the passed OpenCL command queue.
 

Static Public Member Functions

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

Detailed Description

Class to perform EmbeddingLookup operation with opencl kernel.

Definition at line 59 of file CLEmbeddingLookupKernel.h.

Constructor & Destructor Documentation

◆ CLEmbeddingLookupKernel() [1/3]

arm_compute::CLEmbeddingLookupKernel::CLEmbeddingLookupKernel ( )

Construct a CLEmbeddingLookupKernel object.

◆ CLEmbeddingLookupKernel() [2/3]

arm_compute::CLEmbeddingLookupKernel::CLEmbeddingLookupKernel ( const CLEmbeddingLookupKernel )
delete

Prevent instances of this class from being copied (As this class contains pointers)

◆ CLEmbeddingLookupKernel() [3/3]

arm_compute::CLEmbeddingLookupKernel::CLEmbeddingLookupKernel ( CLEmbeddingLookupKernel &&  )
default

Construct a CLEmbeddingLookupKernel object by using default move constructor.

Parameters
[in]CLEmbeddingLookupKernelobject to move

◆ ~CLEmbeddingLookupKernel()

arm_compute::CLEmbeddingLookupKernel::~CLEmbeddingLookupKernel ( )
default

Destruct this object.

Member Function Documentation

◆ configure()

void arm_compute::CLEmbeddingLookupKernel::configure ( const ICLTensor *  input,
ICLTensor *  output,
const ICLTensor *  lookups 
)

Set the input and output of the kernel.

Parameters
[in]inputSource tensor. Data type supported: U8/S8/QASYMM8/U16/S16/U32/S32/F16/F32
[out]outputDestination tensor. Data type supported: Same as input
[in]lookupsLookups are 1D tensor that values are indices into the first dimension of input. Data types supported: S32.
Returns
N/A

◆ operator=() [1/2]

CLEmbeddingLookupKernel & arm_compute::CLEmbeddingLookupKernel::operator= ( CLEmbeddingLookupKernel &&  )
default

Move assignment operator.

Parameters
[in]CLEmbeddingLookupKernelobject to move

◆ operator=() [2/2]

CLEmbeddingLookupKernel & arm_compute::CLEmbeddingLookupKernel::operator= ( const CLEmbeddingLookupKernel )
delete

Prevent instances of this class from being copied (As this class contains pointers)

◆ run()

void arm_compute::CLEmbeddingLookupKernel::run ( const Window &  window,
cl::CommandQueue &  queue 
)
override

Enqueue the OpenCL kernel to process the given window on the passed OpenCL command queue.

Note
The queue is not flushed by this method, and therefore the kernel will not have been executed by the time this method returns.
Parameters
[in]windowRegion on which to execute the kernel. (Must be a valid region of the window returned by window()).
[in,out]queueCommand queue on which to enqueue the kernel.
Returns
N/A
N/A

◆ validate()

static Status arm_compute::CLEmbeddingLookupKernel::validate ( const ITensorInfo *  input,
const ITensorInfo *  output,
const ITensorInfo *  lookups 
)
static

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

Parameters
[in]inputThe input tensor info. Data types supported: U8/S8/QASYMM8/U16/S16/U32/S32/F16/F32
[in]outputThe output tensor info, Data types supported: same as input1.
[in]lookupsLookups info. Data types supported: S32.
Returns
a status

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