[JIT] Add Lower Tuples Call & Run remove mutation after list unrolling (#36829)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/36829
This changes the IR complexity from the previous PR for the following tests:
```
('Name', 'Ifs/Loops', 'non-tensor ops')
Before: ('max_unpool1d', 0, 3)
After: ('max_unpool1d', 0, 0)
Before: ('max_unpool2d', 0, 3)
After: ('max_unpool2d', 0, 0)
Before: ('max_unpool3d', 0, 4)
After: ('max_unpool3d', 0, 0)
Before: ('adaptive_max_pool2d', 0, 3)
After: ('adaptive_max_pool2d', 0, 0)
Before: ('adaptive_max_pool3d', 0, 4)
After: ('adaptive_max_pool3d', 0, 0)
Before: ('adaptive_avg_pool2d', 0, 3)
After: ('adaptive_avg_pool2d', 0, 0)
Before: ('adaptive_avg_pool3d', 0, 4)
After: ('adaptive_avg_pool3d', 0, 0)
Before: ('upsample', 13, 68)
After: ('upsample', 4, 28)
Before: ('upsample', 13, 68)
After: ('upsample', 0, 5)
Before: ('interpolate', 14, 68)
After: ('interpolate', 0, 4)
Before: ('interpolate', 13, 67)
After: ('interpolate', 4, 27)
Before: ('interpolate', 14, 68)
After: ('interpolate', 0, 4)
Before: ('interpolate', 14, 68)
After: ('interpolate', 0, 4)
Before: ('interpolate', 13, 67)
After: ('interpolate', 4, 27)
Before: ('interpolate', 14, 68)
After: ('interpolate', 0, 4)
Before: ('interpolate', 14, 68)
After: ('interpolate', 0, 4)
Before: ('interpolate', 13, 67)
After: ('interpolate', 4, 27)
Before: ('interpolate', 14, 68)
After: ('interpolate', 0, 4)
Before: ('interpolate', 14, 68)
After: ('interpolate', 0, 4)
Before: ('interpolate', 13, 67)
After: ('interpolate', 4, 27)
Before: ('interpolate', 14, 68)
After: ('interpolate', 0, 4)
Before: ('interpolate', 14, 59)
After: ('interpolate', 0, 3)
Before: ('interpolate', 13, 57)
After: ('interpolate', 4, 21)
Before: ('interpolate', 14, 59)
After: ('interpolate', 0, 3)
Before: ('interpolate', 14, 59)
After: ('interpolate', 0, 3)
Before: ('interpolate', 13, 57)
After: ('interpolate', 4, 21)
Before: ('interpolate', 14, 59)
After: ('interpolate', 0, 3)
Before: ('interpolate', 14, 59)
After: ('interpolate', 0, 3)
Before: ('interpolate', 13, 57)
After: ('interpolate', 4, 21)
Before: ('interpolate', 14, 59)
After: ('interpolate', 0, 3)
Before: ('interpolate', 13, 77)
After: ('interpolate', 4, 33)
Before: ('interpolate', 14, 77)
After: ('interpolate', 0, 5)
Before: ('interpolate', 14, 77)
After: ('interpolate', 0, 5)
Before: ('interpolate', 13, 77)
After: ('interpolate', 4, 33)
Before: ('interpolate', 14, 77)
After: ('interpolate', 0, 5)
Before: ('interpolate', 14, 77)
After: ('interpolate', 0, 5)
Before: ('interpolate', 13, 77)
After: ('interpolate', 4, 33)
Before: ('interpolate', 14, 77)
After: ('interpolate', 0, 5)
Before: ('interpolate', 14, 68)
After: ('interpolate', 0, 4)
Before: ('interpolate', 14, 68)
After: ('interpolate', 0, 4)
Before: ('interpolate', 15, 103)
After: ('interpolate', 1, 23)
Before: ('interpolate', 14, 70)
After: ('interpolate', 0, 6)
Before: ('interpolate', 15, 103)
After: ('interpolate', 1, 21)
Before: ('interpolate', 14, 70)
After: ('interpolate', 0, 6)
Before: ('interpolate', 15, 91)
After: ('interpolate', 1, 13)
Before: ('interpolate', 14, 59)
After: ('interpolate', 0, 3)
Before: ('interpolate', 15, 93)
After: ('interpolate', 1, 16)
Before: ('interpolate', 14, 61)
After: ('interpolate', 0, 5)
Before: ('interpolate', 15, 111)
After: ('interpolate', 1, 28)
Before: ('interpolate', 14, 77)
After: ('interpolate', 0, 5)
Before: ('interpolate', 15, 113)
After: ('interpolate', 1, 27)
Before: ('interpolate', 14, 79)
After: ('interpolate', 0, 7)
Before: ('test_nn_AdaptiveMaxPool2d_single', 0, 3)
After: ('test_nn_AdaptiveMaxPool2d_single', 0, 0)
Before: ('test_nn_AdaptiveMaxPool2d_tuple', 0, 3)
After: ('test_nn_AdaptiveMaxPool2d_tuple', 0, 0)
Before: ('test_nn_AdaptiveMaxPool3d_single', 0, 4)
After: ('test_nn_AdaptiveMaxPool3d_single', 0, 0)
Before: ('test_nn_AdaptiveMaxPool3d_tuple', 0, 4)
After: ('test_nn_AdaptiveMaxPool3d_tuple', 0, 0)
Before: ('test_nn_AdaptiveMaxPool3d_single_nonatomic', 0, 4)
After: ('test_nn_AdaptiveMaxPool3d_single_nonatomic', 0, 0)
Before: ('test_nn_AdaptiveMaxPool3d_tuple_nonatomic', 0, 4)
After: ('test_nn_AdaptiveMaxPool3d_tuple_nonatomic', 0, 0)
Before: ('test_nn_AdaptiveAvgPool2d_single', 0, 3)
After: ('test_nn_AdaptiveAvgPool2d_single', 0, 0)
Before: ('test_nn_AdaptiveAvgPool2d_single_1x1output', 0, 3)
After: ('test_nn_AdaptiveAvgPool2d_single_1x1output', 0, 0)
Before: ('test_nn_AdaptiveAvgPool2d_tuple', 0, 3)
After: ('test_nn_AdaptiveAvgPool2d_tuple', 0, 0)
Before: ('test_nn_AdaptiveAvgPool3d_single', 0, 4)
After: ('test_nn_AdaptiveAvgPool3d_single', 0, 0)
Before: ('test_nn_AdaptiveAvgPool3d_tuple', 0, 4)
After: ('test_nn_AdaptiveAvgPool3d_tuple', 0, 0)
```
Test Plan: Imported from OSS
Differential Revision: D21160758
Pulled By: eellison
fbshipit-source-id: 68ccbf3af74398e8dbad7e6bedb639635dafdb2e