pytorch
29c5cb79 - [NNC] Fuse loops that have the same bounds as expressions (#55997)

Commit
3 years ago
[NNC] Fuse loops that have the same bounds as expressions (#55997) Summary: This PR allows fusing loops whose bounds are specified as expressions that are equal. For example: ``` for (int j = 0; j < M + N; j++) { A[j] = 10 * j; } for (int k = 0; k < M + N; k++) { B[k] = 20 * k; } ``` `fuseLoops(j, k)` is possible since the stop bounds of the two loops are equal though they are different `Expr*` and will result in: ``` for (int j = 0; j < M + N; j++) { A[j] = 10 * j; B[j] = 20 * j; } ``` Pull Request resolved: https://github.com/pytorch/pytorch/pull/55997 Reviewed By: bertmaher Differential Revision: D27841270 Pulled By: navahgar fbshipit-source-id: a64e4503b7f8f28bc0c9823225bc923177bb4c2e
Author
Parents
Loading