Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rearrange_dim and delete_pass bug fixes #600

Merged
merged 3 commits into from
Mar 27, 2024
Merged

Conversation

SamirDroubi
Copy link
Collaborator

  • delete_pass is a no-op when there are no passes.
    • We have previously used the external pattern matching API to implement
      delete_pass which throws an error when matches aren't found.
    • Now, we use the internal pattern matching which simply returns an
      empty list.
  • Fix bug in rearrange_dim value checking.
    • The original check didn't account for the case where the list
      contains all the numbers between 0 and N-1, but is longer than N.

* The original check didn't account for the case where the permutation
  is longer than N, but contains all the numbers between 0 and N-1.
* We have previously used the external pattern matching API to implement
  delete_pass which throws an error when matches aren't found.
* Now, we use the internal pattern matching which simply returns an
  empty list.
@yamaguchi1024
Copy link
Member

@skeqiqevian should review this

Copy link
Collaborator

@skeqiqevian skeqiqevian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@SamirDroubi SamirDroubi merged commit dda126f into main Mar 27, 2024
7 checks passed
@SamirDroubi SamirDroubi deleted the rearrange_dim_bug branch March 27, 2024 03:15
yamaguchi1024 pushed a commit that referenced this pull request Apr 24, 2024
- delete_pass is a no-op when there are no passes.
    * We have previously used the external pattern matching API to implement
   delete_pass which throws an error when matches aren't found.
    * Now, we use the internal pattern matching which simply returns an empty list.
- Fix bug in rearrange_dim value checking.
    * The original check didn't account for the case where the list
      contains all the numbers between 0 and N-1, but is longer than N.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants