37 : _inst_norm_kernel(),
54 auto w = std::make_unique<CLComputeMeanVariance>();
55 w->configure(compile_context,
input, &_mean_var_tensor, use_mixed_precision);
56 _mean_var_kernel = std::move(
w);
57 auto k = std::make_unique<CLInstanceNormalizationLayerKernel>();
59 _inst_norm_kernel = std::move(k);
70 ARM_COMPUTE_ERROR_ON_MSG(!_inst_norm_kernel,
"The child class didn't set the CL kernel or function isn't configured");
static Status validate(const ITensorInfo *input, const ITensorInfo *output, float gamma=1.0f, float beta=0.0f, float epsilon=1e-12f, bool use_mixed_precision=true)
Static function to check if given info will lead to a valid configuration of CLInstanceNormalizationL...
void schedule_kernel_on_ctx(CLRuntimeContext *ctx, ICLKernel *kernel, bool flush=true)
Schedules a kernel using the context if not nullptr else uses the legacy scheduling flow.
static CLKernelLibrary & get()
Access the KernelLibrary singleton.
Store the tensor's metadata.
CLTensorAllocator * allocator()
Return a pointer to the tensor's allocator.
Copyright (c) 2017-2021 Arm Limited.
Interface to enqueue OpenCL kernels and get/set the OpenCL CommandQueue and ICLTuner.
static Status validate(const ITensorInfo *input, const ITensorInfo *output, const InstanceNormalizationLayerKernelInfo &info)
Static function to check if given info will lead to a valid configuration of CLInstanceNormalizationL...
~CLInstanceNormalizationLayer()
Default destructor.
#define ARM_COMPUTE_ERROR_ON_MSG(cond, msg)
void configure(ICLTensor *input, ICLTensor *output, float gamma=1.0f, float beta=0.0f, float epsilon=1e-12f, bool use_mixed_precision=true)
Set the input and output tensors.
void allocate() override
Allocate size specified by TensorInfo of OpenCL memory.
Interface for OpenCL tensor.
CLInstanceNormalizationLayer(CLRuntimeContext *ctx=nullptr)
Constructor.
void run() override
Run the kernels contained in the function.