return;
}
- auto output_alloc = static_cast<::neurun::backend::acl_cl::operand::Object *>(
- _tensor_builder->wrapTensor(ofm_index).get());
+ auto output_alloc = _tensor_builder->at(ofm_index).get();
- std::vector<::neurun::backend::acl_cl::operand::Object *> input_allocs;
+ std::vector<operand::ICLTensor *> input_allocs;
for (auto &ifm_ind : input_indexes)
- input_allocs.emplace_back(static_cast<::neurun::backend::acl_cl::operand::Object *>(
- _tensor_builder->wrapTensor(ifm_ind).get()));
+ input_allocs.emplace_back(_tensor_builder->at(ifm_ind).get());
auto fn = nnfw::cpp14::make_unique<::neurun::backend::acl_cl::kernel::ConcatLayer>();
const auto rank = _ctx.at(ofm_index).shape().rank();
const auto frontend_layout = _current_subg_layout;
- const auto backend_layout = output_alloc->ptr()->layout();
+ const auto backend_layout = output_alloc->layout();
const auto fixed_axis =
acl_common::ToARMComputeAxis(rank, axis, frontend_layout, backend_layout).value();
for (auto input : _input_allocs)
{
- assert(_output_alloc->ptr()->layout() == input->ptr()->layout());
- assert(matchSizeExceptAxis(_output_alloc->ptr(), input->ptr(), _axis));
- axis_sum += input->ptr()->info()->dimension(_axis);
+ assert(_output_alloc->layout() == input->layout());
+ assert(matchSizeExceptAxis(_output_alloc, input, _axis));
+ axis_sum += input->info()->dimension(_axis);
}
- assert(_output_alloc->ptr()->info()->dimension(_axis) == axis_sum);
+ assert(_output_alloc->info()->dimension(_axis) == axis_sum);
}
VERBOSE(Concat_RUN) << "START Concat" << std::endl;
return true;
}
-void ConcatLayer::configure(
- const std::vector<::neurun::backend::acl_cl::operand::Object *> &input_allocs, int32_t axis,
- ::neurun::backend::acl_cl::operand::Object *output_alloc)
+void ConcatLayer::configure(const std::vector<operand::ICLTensor *> &input_allocs, int32_t axis,
+ operand::ICLTensor *output_alloc)
{
_input_allocs = input_allocs;
_output_alloc = output_alloc;
_axis = axis;
- _input_type = input_allocs[0]->ptr()->data_type();
+ _input_type = input_allocs[0]->data_type();
}
void ConcatLayer::run()
#include <arm_compute/runtime/IFunction.h>
#include <arm_compute/core/Types.h>
-#include "operand/Object.h"
+#include "operand/ICLTensor.h"
namespace neurun
{
ConcatLayer();
public:
- void configure(const std::vector<::neurun::backend::acl_cl::operand::Object *> &input_allocs,
+ void configure(const std::vector<operand::ICLTensor *> &input_allocs,
int32_t axis /* NNAPI tensor axis from NHWC order */,
- ::neurun::backend::acl_cl::operand::Object *output_alloc);
+ operand::ICLTensor *output_alloc);
void run();
template <typename T> bool concatenate();
private:
- std::vector<::neurun::backend::acl_cl::operand::Object *> _input_allocs;
- ::neurun::backend::acl_cl::operand::Object *_output_alloc;
+ std::vector<operand::ICLTensor *> _input_allocs;
+ operand::ICLTensor *_output_alloc;
int32_t _axis;
arm_compute::DataType _input_type;
};