Skip to content

slice_onnx standard/lean leaks #282

Closed
@MirkoCalvi

Description

@MirkoCalvi

Description

lean_slice_onnx() method leaks for a dynamic allocation of the output tensor. The lean version of a mathematical operation MUST NOT dynamically allocate any Tensor!
The standard version of the operation must allocate/create the output tensor tensor, so also computing the output shape, and pass the already created Tensor to the operation_lean() method!

Inside lean_slice_onnx() instead is both computed the output shape (without eaven calling get_slice_output_shape() and the outputTensor.data is dynamically allocated.

Image

Image

All the checks must be inside the standard version.

Metadata

Metadata

Assignees

Labels

MathRelated to TensorMathbugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions