#include "model/operand/Index.h"
#include "model/operand/DataType.h"
+#include "compiler/IExecutionBuilder.h"
#include "util/logging.h"
class ActivationBuilder
{
public:
- ActivationBuilder(IExecutionBuilder &builder) : _builder(builder)
+ ActivationBuilder(compiler::IExecutionBuilder &builder) : _builder(builder)
{
// DO NOTHING
}
void append(FuseCode code, ::arm_compute::ICLTensor *tensor);
private:
- IExecutionBuilder &_builder;
+ compiler::IExecutionBuilder &_builder;
};
void ActivationBuilder::appendReLU(::arm_compute::ICLTensor *ifm_alloc)
auto tensors = _tensor_builder;
- returnStage([tensors, param](IExecutionBuilder &builder) {
+ returnStage([tensors, param](compiler::IExecutionBuilder &builder) {
auto ofm_alloc = tensors->at(param.ofm_index).get();
auto ifm_alloc = tensors->at(param.ifm_index).get();
auto tensors = _tensor_builder;
- returnStage([tensors, param](IExecutionBuilder &builder) {
+ returnStage([tensors, param](compiler::IExecutionBuilder &builder) {
auto ofm_alloc = tensors->at(param.ofm_index).get();
auto ifm_alloc = tensors->at(param.ifm_index).get();
auto ker_alloc = tensors->at(param.ker_index).get();
auto tensors = _tensor_builder;
- returnStage([tensors, param](IExecutionBuilder &builder) {
+ returnStage([tensors, param](compiler::IExecutionBuilder &builder) {
auto ofm_alloc = tensors->at(param.ofm_index).get();
auto ifm_alloc = tensors->at(param.ifm_index).get();
auto ker_alloc = tensors->at(param.ker_index).get();
auto tensors = _tensor_builder;
- returnStage([tensors, param](IExecutionBuilder &builder) {
+ returnStage([tensors, param](compiler::IExecutionBuilder &builder) {
auto ofm_alloc = tensors->at(param.ofm_index).get();
auto ifm_alloc = tensors->at(param.ifm_index).get();
auto tensors = _tensor_builder;
- returnStage([tensors, param](IExecutionBuilder &builder) {
+ returnStage([tensors, param](compiler::IExecutionBuilder &builder) {
auto ofm_alloc = tensors->at(param.ofm_index).get();
auto ifm_alloc = tensors->at(param.ifm_index).get();
auto tensors = _tensor_builder;
- returnStage([tensors, param](IExecutionBuilder &builder) {
+ returnStage([tensors, param](compiler::IExecutionBuilder &builder) {
// If tensor allocator allocate as subtensor
bool canEliminate = true;
for (auto ifm_ind : param.input_indexes)
param.needs_reshape = needs_reshape;
param.reshape = reshape;
- returnStage([tensors, param](IExecutionBuilder &builder) {
+ returnStage([tensors, param](compiler::IExecutionBuilder &builder) {
auto output_alloc = tensors->at(param.output_index).get();
auto input_alloc = tensors->at(param.input_index).get();
auto weight_alloc = tensors->at(param.weight_index).get();
auto tensors = _tensor_builder;
- returnStage([tensors, param](IExecutionBuilder &builder) {
+ returnStage([tensors, param](compiler::IExecutionBuilder &builder) {
auto ofm_alloc = tensors->at(param.ofm_index).get();
auto lhs_alloc = tensors->at(param.lhs_index).get();
auto rhs_alloc = tensors->at(param.rhs_index).get();
tensors->dimCorrection(input_index, false);
tensors->dimCorrection(output_index, false);
- returnStage([tensors, param](IExecutionBuilder &builder) {
+ returnStage([tensors, param](compiler::IExecutionBuilder &builder) {
auto output_alloc = tensors->at(param.output_index).get();
auto input_alloc = tensors->at(param.input_index).get();
auto tensors = _tensor_builder;
- returnStage([tensors, param](IExecutionBuilder &builder) {
+ returnStage([tensors, param](compiler::IExecutionBuilder &builder) {
auto output_alloc = tensors->at(param.output_index).get();
auto input_alloc = tensors->at(param.input_index).get();
auto tensors = _tensor_builder;
- returnStage([tensors, param](IExecutionBuilder &builder) {
+ returnStage([tensors, param](compiler::IExecutionBuilder &builder) {
auto output_alloc = tensors->at(param.output_index).get();
auto input_alloc = tensors->at(param.input_index).get();
auto tensors = _tensor_builder;
- returnStage([tensors, param](IExecutionBuilder &builder) {
+ returnStage([tensors, param](compiler::IExecutionBuilder &builder) {
auto outputData_alloc = tensors->at(param.outputData_index).get();
auto inputData_alloc = tensors->at(param.inputData_index).get();
auto tensors = _tensor_builder;
- returnStage([tensors, param](IExecutionBuilder &builder) {
+ returnStage([tensors, param](compiler::IExecutionBuilder &builder) {
auto ofm_alloc = tensors->at(param.ofm_index).get();
auto lhs_alloc = tensors->at(param.lhs_index).get();
auto rhs_alloc = tensors->at(param.rhs_index).get();
auto tensors = _tensor_builder;
- returnStage([tensors, param](IExecutionBuilder &builder) {
+ returnStage([tensors, param](compiler::IExecutionBuilder &builder) {
auto ofm_alloc = tensors->at(param.ofm_index).get();
auto lhs_alloc = tensors->at(param.lhs_index).get();
auto rhs_alloc = tensors->at(param.rhs_index).get();
auto tensors = _tensor_builder;
- returnStage([tensors, param](IExecutionBuilder &builder) {
+ returnStage([tensors, param](compiler::IExecutionBuilder &builder) {
auto ofm_alloc = tensors->at(param.ofm_index).get();
auto lhs_alloc = tensors->at(param.lhs_index).get();
auto rhs_alloc = tensors->at(param.rhs_index).get();
#include "backend/BackendManager.h"
#include "backend/interface/IConfig.h"
+#include "compiler/IExecutionBuilder.h"
#include "util/logging.h"
auto tensors = _tensor_builder;
- returnStage([tensors, param](IExecutionBuilder &builder) {
+ returnStage([tensors, param](compiler::IExecutionBuilder &builder) {
auto ofm_alloc = tensors->at(param.ofm_index);
auto ifm_alloc = tensors->at(param.ifm_index);
auto ker_alloc = tensors->at(param.ker_index);
auto tensors = _tensor_builder;
- returnStage([tensors, param](IExecutionBuilder &builder) {
+ returnStage([tensors, param](compiler::IExecutionBuilder &builder) {
auto ofm_alloc = tensors->at(param.ofm_index);
auto ifm_alloc = tensors->at(param.ifm_index);
auto ker_alloc = tensors->at(param.ker_index);
auto tensors = _tensor_builder;
- returnStage([tensors, param](IExecutionBuilder &builder) {
+ returnStage([tensors, param](compiler::IExecutionBuilder &builder) {
auto ofm_alloc = tensors->at(param.ofm_index).get();
auto ifm_alloc = tensors->at(param.ifm_index).get();
auto tensors = _tensor_builder;
- returnStage([tensors, param](IExecutionBuilder &builder) {
+ returnStage([tensors, param](compiler::IExecutionBuilder &builder) {
auto ofm_alloc = tensors->at(param.ofm_index).get();
auto ifm_alloc = tensors->at(param.ifm_index).get();
auto tensors = _tensor_builder;
- returnStage([tensors, param](IExecutionBuilder &builder) {
+ returnStage([tensors, param](compiler::IExecutionBuilder &builder) {
auto output_alloc = tensors->at(param.output_index).get();
std::vector<const uint8_t *> input_buffers;
auto tensors = _tensor_builder;
- returnStage([tensors, param](IExecutionBuilder &builder) {
+ returnStage([tensors, param](compiler::IExecutionBuilder &builder) {
auto output_alloc = tensors->at(param.output_index).get();
auto input_alloc = tensors->at(param.input_index).get();
auto weight_alloc = tensors->at(param.weight_index).get();
auto tensors = _tensor_builder;
- returnStage([tensors, param](IExecutionBuilder &builder) {
+ returnStage([tensors, param](compiler::IExecutionBuilder &builder) {
auto output_alloc = tensors->at(param.output_index).get();
auto input_alloc = tensors->at(param.input_index).get();
auto tensors = _tensor_builder;
- returnStage([tensors, param](IExecutionBuilder &builder) {
+ returnStage([tensors, param](compiler::IExecutionBuilder &builder) {
auto output_alloc = tensors->at(param.output_index).get();
auto input_alloc = tensors->at(param.input_index).get();
// assert(param.shape == _ctx.at(input_index));
- returnStage([param](IExecutionBuilder &builder) {
+ returnStage([param](compiler::IExecutionBuilder &builder) {
auto output_object = param.output_backend->tensor_builder()->wrapTensor(param.output_index);
auto input_object = param.input_backend->tensor_builder()->wrapTensor(param.input_index);