-
Notifications
You must be signed in to change notification settings - Fork 522
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[lib/conversion] Create seed only if needed in `convert-torch-convers… (
#3926) …ion-to-mlprogram` pass This PR changes `convert-torch-conversion-to-mlprogram` pass implementation by moving seed generation inside `ConvertGetNextSeedOp` pattern. Previously, global seed was being created by this pass, even when its only consumer `torch_c.get_next_seed` op is not present in the IR. This pass is part of Torch->Linalg conversion pipeline. Always creating global seed created an issue for the case when downstream compiler doesn't expect/support `ml_program` dialect in linalg on tensor IR format. However, when starting torch IR has `torch_c.get_next_seed` op, `ml_program` will still be present and will need to be handled by downstream compilers.
- Loading branch information
1 parent
62eb38b
commit 040aec9
Showing
3 changed files
with
21 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters