17#include "../KernelGenerator.h"
18#include "../Validator.h"
26void Validator::visit(
const ir::operation::Concat &) {
_supported =
true; }
28void KernelGenerator::visit(
const ir::operation::Concat &node)
30 const auto ofm_index{node.getOutputs().at(0)};
32 std::vector<ir::OperandIndex> input_indexes;
34 for (
const auto &input : node.getInputs())
35 input_indexes.emplace_back(
input);
37 const auto axis = node.param().axis;
40 bool eliminated = _tensor_builder->areSubTensorsOf(ofm_index, node.getInputs());
44 VERBOSE(acl_cl_KernelGenerator_Concat) <<
"Concat eliminated" << std::endl;
45 _return_fn = std::make_unique<exec::NopFunction>();
50 std::vector<const ::arm_compute::ICLTensor *> input_tensors;
51 for (
const auto &ifm_ind : input_indexes)
52 input_tensors.emplace_back(_tensor_reg->getAclTensor(ifm_ind)->handle());
54 std::unique_ptr<::arm_compute::IFunction> fn;
55 if (input_indexes.size() < 2)
57 ::arm_compute::ICLTensor *input_tesor =
58 _tensor_reg->getAclTensor(input_indexes.at(0))->handle();
60 fn = acl_common::generateLayer<arm_compute::CLCopy>(input_tesor,
output_tensor->handle());
64 const auto rank = _ctx.
at(ofm_index).shape().rank();
66 fn = acl_common::generateLayer<::arm_compute::CLConcatenateLayer>(
This file defines NopFunction.
uint32_t value(void) const
std::unique_ptr< exec::IFunction > _return_fn
const Object & at(const Index &index) const
Get the object that is associated with the given index.
#define VERBOSE(name, lv)
ARMComputeAxis ToARMComputeAxis(uint32_t rank, uint32_t axis)
std::unique_ptr< AclFunction > asAclFunction(std::unique_ptr<::arm_compute::IFunction > &&layer)