fixes torch.jit.script lp_pool bug. (#73287)
Summary:
Fixes https://github.com/pytorch/pytorch/issues/60258
I used the solution proposed in https://github.com/pytorch/pytorch/issues/61275. His solution failed unit tests and there was no progress after 08/07/2021. I'm willing to fix problems if they arise during CI.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/73287
Reviewed By: navahgar, zou3519
Differential Revision: D35057812
Pulled By: eellison
fbshipit-source-id: 8e82e9f73b9536979aecf476c5c65336cdffc93a
(cherry picked from commit e85e912a4edec1111623c5cbbba4171fe3bc5b1d)