17#include "../KernelGenerator.h"
18#include "../Validator.h"
25void Validator::visit(
const ir::operation::Reverse &) {
_supported =
true; }
27void KernelGenerator::visit(
const ir::operation::Reverse &node)
29 const auto ofm_index{node.getOutputs().at(0)};
33 auto ofm_tensor = _tensor_reg->getAclTensor(ofm_index);
34 auto ifm_tensor = _tensor_reg->getAclTensor(ifm_index);
35 auto axis_tensor = _tensor_reg->getAclTensor(axis_index);
39 if (_ctx.
at(axis_index).isConstant() &&
40 (axis_tensor->handle()->info()->data_type() == arm_compute::DataType::S32))
42 axis_tensor->handle()->info()->set_data_type(arm_compute::DataType::U32);
45 auto fn = acl_common::generateLayer<arm_compute::CLReverse>(
46 ifm_tensor->handle(), ofm_tensor->handle(), axis_tensor->handle(),
false);
std::unique_ptr< exec::IFunction > _return_fn
const Object & at(const Index &index) const
Get the object that is associated with the given index.
std::unique_ptr< AclFunction > asAclFunction(std::unique_ptr<::arm_compute::IFunction > &&layer)