void AclCppOpGenerator::visit(ops::ElementwiseOp& op) {
// Create the output tensor in the DOM and obtain its identifier.
auto out = genTensor(op, op.getOutputShape(0));
+ addToPersistentTensors(out);
auto& prev_nodes = op.getPrevNodes();
assert(prev_nodes.size() >= 2);
}
void AclCppOpGenerator::visit(ops::EluOp&) {
- throw AclCppException("Not supported by the ACL library yet.");
+ throw AclCppException("EluOp not supported by the ACL library yet.");
}
void AclCppOpGenerator::visit(ops::PadOp&) {
- throw AclCppException("Not supported by the ACL library yet.");
+ throw AclCppException("PadOp not supported by the ACL library yet.");
}
template <typename Op>
// Create a unit tensor in the DOM.
auto unit = genTensor(operation_name + "_unit", ir_unit_shape);
+ addToPersistentTensors(unit);
// Fill the unit tensor with the 1 value.
fillTensor(unit, "1");
// Create a tmp tensor in the DOM to store the result of 1 / in2.
auto tmp = genTensor(operation_name + "_tmp", ir_shape);
+ genTensorAllocation(_infBlock, tmp);
// Create an instance of the CLArithmeticDivision class as a member of the artifact class.
auto arithmetic_div_layer_var1 = _artifactClass->var(false, "arm_compute::CLArithmeticDivision",
// Generate the call: arithmetic_div_layer2.run();
_infBlock->call("run", {}, arithmetic_div_layer2);
+ genTensorDeallocation(_infBlock, tmp);
+
return out;
}