-
Notifications
You must be signed in to change notification settings - Fork 360
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Add lowering pass to resolve aten::Int.Tensor
- Implement lowering pass which detects canonical `aten::Int.Tensor` cases and recursively replaces input Value pointers until all 0D tensors have been resolved to their scalar components - Lowering pass is specialized to replacing strictly integer-typed Value pointers and can only trace through aten::mul and aten::floor_divide operators, which are two of the most common cases of use - Lowering pass traverses the graph until one of three base cases are encountered (or an invalid Value type is detected). These cases are `prim::NumToTensor`, `prim::Constant` (0D tensor), or simple integers. It then replaces the child nodes with the integer equivalents of the produced Tensors - Added extensive testing of new capabilities for accuracy, robustness, and functionality
- Loading branch information
Showing
4 changed files
with
298 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