Add utility methods to find an upgrader (#68355)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/68355
Test Plan: Imported from OSS
Reviewed By: samdow
Differential Revision: D33198156
Pulled By: tugsbayasgalan
fbshipit-source-id: 68380148f0d9bee96d8090bf01c8dfca8e1f8b12