ONE - On-device Neural Engine
|
Class to perform EmbeddingLookup operation with opencl kernel. More...
#include <CLEmbeddingLookupKernel.h>
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) | |
CLEmbeddingLookupKernel & | operator= (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. | |
CLEmbeddingLookupKernel & | operator= (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. | |
Class to perform EmbeddingLookup operation with opencl kernel.
Definition at line 59 of file CLEmbeddingLookupKernel.h.
CLEmbeddingLookupKernel::CLEmbeddingLookupKernel | ( | ) |
Construct a CLEmbeddingLookupKernel object.
Definition at line 73 of file CLEmbeddingLookupKernel.cpp.
|
delete |
Prevent instances of this class from being copied (As this class contains pointers)
|
default |
Construct a CLEmbeddingLookupKernel object by using default move constructor.
[in] | CLEmbeddingLookupKernel | object to move |
|
default |
Destruct this object.
References validate().
void CLEmbeddingLookupKernel::configure | ( | const ICLTensor * | input, |
ICLTensor * | output, | ||
const ICLTensor * | lookups | ||
) |
Set the input and output of the kernel.
[in] | input | Source tensor. Data type supported: U8/S8/QASYMM8/U16/S16/U32/S32/F16/F32 |
[out] | output | Destination tensor. Data type supported: Same as input |
[in] | lookups | Lookups are 1D tensor that values are indices into the first dimension of input. Data types supported: S32. |
Definition at line 94 of file CLEmbeddingLookupKernel.cpp.
References arm_compute::CLKernelLibraryEx::create_kernel(), arm_compute::CLKernelLibraryEx::get(), and validate().
|
default |
Move assignment operator.
[in] | CLEmbeddingLookupKernel | object to move |
|
delete |
Prevent instances of this class from being copied (As this class contains pointers)
|
override |
Enqueue the OpenCL kernel to process the given window on the passed OpenCL command queue.
[in] | window | Region on which to execute the kernel. (Must be a valid region of the window returned by window()). |
[in,out] | queue | Command queue on which to enqueue the kernel. |
Definition at line 123 of file CLEmbeddingLookupKernel.cpp.
Referenced by package.infer.session::inference().
|
static |
Static function to check if given info will lead to a valid configuration of CLEmbeddingLookupKernel.
[in] | input | The input tensor info. Data types supported: U8/S8/QASYMM8/U16/S16/U32/S32/F16/F32 |
[in] | output | The output tensor info, Data types supported: same as input1 . |
[in] | lookups | Lookups info. Data types supported: S32. |
Definition at line 78 of file CLEmbeddingLookupKernel.cpp.
Referenced by configure(), and ~CLEmbeddingLookupKernel().