To fix extra memory allocation when using circular padding (#39273)
Summary:
For fixing https://github.com/pytorch/pytorch/issues/39256
Pull Request resolved: https://github.com/pytorch/pytorch/pull/39273
Reviewed By: anjali411
Differential Revision: D23471811
Pulled By: mruberry
fbshipit-source-id: fb324b51baea765311715cdf14642b334f335733