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

[LowerToAIE] Fix for non-deterministic error (observed with convolution) #694

Merged
merged 2 commits into from
Aug 23, 2024

Conversation

newling
Copy link
Contributor

@newling newling commented Aug 22, 2024

What was happening was

  1. Value/Operation inserted into IRMapping
  2. IRRewriter erased Value/Op
  3. New Value/Op created with same address as erased Value/Op
  4. Bad state: new Value/Op is a key in IRMapping, even though it was never added.

That's my analysis, at least. Either way, this change makes my failure rate go from 10/20 to 0/20.

An alternative to this PR might be to postpone erasing of ops even longer, so that only after all CoreOps have been processed are the ops erased.

@makslevental
Copy link
Collaborator

makslevental commented Aug 22, 2024

Isn't the "correct" thing to do to use Conversion instead of just an OperationPass? Like doesn't a conversion both handle the mapping for you and actually defer the erases (that last part is definitely true).

@makslevental
Copy link
Collaborator

I mean we should probably just merge this and be done with it because why rewrite a pass that we won't need soon.

@newling newling merged commit 5b2953f into nod-ai:main Aug 23, 2024
3 checks passed
@newling newling deleted the fix_irmapping_failure branch August 29, 2024 18:26
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.

2 participants