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.

Activity

added
bugSomething isn't working
MathRelated to TensorMath
on Apr 6, 2025
huly-for-github

huly-for-github commented on Apr 6, 2025

@huly-for-github

Connected to Huly®: X_PI-348

MirkoCalvi

MirkoCalvi commented on Apr 6, 2025

@MirkoCalvi
MemberAuthor

Image

this is the correct format. get_neg_output_shape() in called so that is also tested in unit_tests

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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

      Participants

      @Hitomamacs@MirkoCalvi

      Issue actions

        slice_onnx standard/lean leaks · Issue #282 · ZantFoundation/Z-Ant