_execution_builder->append(std::move(fn));
}
+void KernelGenerator::visit(const model::operation::Squeeze &node)
+{
+ const auto output_index{node.getOutputs().at(0)};
+ const auto input_index{node.getInputs().at(model::operation::Squeeze::Input::INPUT)};
+
+ const auto ofm_backend_descr = ::neurun::backend::cpu::kernel::getTensorDescriptor(
+ _ctx.at(output_index), _current_subg_layout);
+ const auto ifm_backend_descr = ::neurun::backend::cpu::kernel::getTensorDescriptor(
+ _ctx.at(input_index), _current_subg_layout);
+
+ auto output_alloc = _tensor_builder->at(output_index).get();
+ auto input_alloc = _tensor_builder->at(input_index).get();
+
+ // Squeeze can share same kernel with reshape
+ auto fn = nnfw::cpp14::make_unique<::neurun::backend::cpu::kernel::ReshapeLayer>();
+
+ fn->configure(input_alloc->buffer(), ifm_backend_descr, output_alloc->buffer(),
+ ofm_backend_descr);
+
+ _execution_builder->append(std::move(fn));
+}
+
void KernelGenerator::visit(const model::operation::Softmax &node)
{
const auto output_index{node.getOutputs().at(0)};
void visit(const model::operation::FullyConnected &) override;
void visit(const model::operation::Mul &) override;
void visit(const model::operation::Reshape &) override;
+ void visit(const model::operation::Squeeze &) override;
void visit(const model::operation::Softmax &) override;
void visit(const model::operation::Add &) override;
void visit(const model::operation::Sub &) override;
void ShapeFixer::visit(const model::operation::Reshape &) { /* DO NOTHING */}
+void ShapeFixer::visit(const model::operation::Squeeze &) { /* DO NOTHING */}
+
void ShapeFixer::visit(const model::operation::Softmax &) { /* DO NOTHING */}
void ShapeFixer::visit(const model::operation::Gather &) { /* DO NOTHING */}
void visit(const model::operation::FullyConnected &) override;
void visit(const model::operation::Mul &) override;
void visit(const model::operation::Reshape &) override;
+ void visit(const model::operation::Squeeze &) override;
void visit(const model::operation::Softmax &) override;
void visit(const model::operation::Add &) override;
void visit(const model::operation::Gather &) override;
GeneratedTests.batch_to_space*
GeneratedTests.div_*
GeneratedTests.space_to_batch*
-GeneratedTests.squeeze*
GeneratedTests.strided_slice*
GeneratedTests.sub_broadcast*
GeneratedTests.sub_quant*
GeneratedTests.batch_to_space*
GeneratedTests.div_*
GeneratedTests.space_to_batch*
-GeneratedTests.squeeze*
GeneratedTests.strided_slice*
GeneratedTests.sub_broadcast*
GeneratedTests.sub_quant*
reshape/reshape1
add
logistic
+squeeze
MODELS/inception_module
MODELS/mobilenet
max_pool_2d
softmax
reshape/reshape1
+squeeze
add
logistic
MODELS/inception_module