-
Notifications
You must be signed in to change notification settings - Fork 11.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[mlir:OpFormatGen] Add Support for
$_ctxt
in the transformer.
This is useful for "build tuple" type ops. In my case, in npcomp, I have an op: ``` // Result type is `!torch.tuple<!torch.tensor, !torch.tensor>`. torch.prim.TupleConstruct %0, %1 : !torch.tensor, !torch.tensor ``` and the context is required for the `Torch::TupleType::get` call (for the case of an empty tuple). The handling of these FmtContext's in the code is pretty ad-hoc -- I didn't attempt to rationalize it and just made a targeted fix. As someone unfamiliar with the code I had a hard time seeing how to more broadly fix the situation. Differential Revision: https://reviews.llvm.org/D104274
- Loading branch information
Showing
4 changed files
with
14 additions
and
0 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
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