Skip to content

DecomposeAtenAminAmaxOp does not support mutliple axes with "-1" in a set. #4553

@voonter

Description

@voonter

I'm opening an issue regarding a bug found in IREE: iree-org/iree#24265

The problematic code is here:
https://github.com/iree-org/torch-mlir/blob/d2768f876d3cc16019dc1b3eb567c7f339935439/lib/Dialect/Torch/Transforms/DecomposeComplexOps.cpp#L2830

The intention is to reduce starting from the last axis, which is why the code sorts the dimensions in descending order. However, when -1 is used (representing the last dimension), the sorting becomes incorrect when there are other axes in our set.

To fix this, the dimensions should be converted with toPositiveDim before sorting and entering loop.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions