Skip to content
This repository was archived by the owner on Apr 23, 2021. It is now read-only.
This repository was archived by the owner on Apr 23, 2021. It is now read-only.

AffineApplyNormalizer::renumber returns invalid map #89

Open

Description

@bondhugula

AffineApplyNormalizer::renumber isn't a publicly exposed method - it however generates invalid maps in some cases. Reproduce with two normalizers created with the maps below:

( )[s0] -> (s0) (%v1)
( )[s0] -> (s0) (%v2)

Calling renumber on the first with the second as argument yields:
( ) (s0) -> (s1) // invalid

The expressions it generates are correct, but the returned map's input dim/symbol count is incorrect (one instead of two here).

AffineMap renumber(const AffineApplyNormalizer &other);

Activity

  1. bondhugula commented on Aug 23, 2019

    @bondhugula
    ContributorAuthor

    @nicolasvasilache I think the last line of AffineApplyNormalizer::renumber should have been

    return map.replaceDimsAndSymbols(dimRemapping, symRemapping,
                                       reorderedDims.size(),
                                       concatenatedSymbols.size());
    

    instead of

    return map.replaceDimsAndSymbols(dimRemapping, symRemapping,
                                       dimRemapping.size(), symRemapping.size())
    

    ?

    return map.replaceDimsAndSymbols(dimRemapping, symRemapping,

    It doesn't affect any of the current test cases, but I think that's the bug here that may cause incorrect behavior if someone adds another helper method that reuses renumber.

  2. nicolasvasilache commented on Aug 26, 2019

    @nicolasvasilache
  3. antiagainst commented on Aug 26, 2019

    @antiagainst
    Contributor

    Oops, sorry my bad. Didn't notice @nicolasvasilache is OOO since this week. Reassigning to @andydavis1.

  4. antiagainst commented on Aug 26, 2019

    @antiagainst
    Contributor

    Somehow I cannot set @andydavis1 as the assignee. So just @ here.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions