Refactor isinstance(x, TensorVariable) to x.is_tensor() (#169441)
Summary:
X-link: https://github.com/pytorch/pytorch/pull/169441
Approved by: https://github.com/zou3519
ghstack dependencies: #169006, #169341
Reviewed By: izaitsevfb
Differential Revision: D88657932
fbshipit-source-id: 774e1c95b8460adb49f93fecf29cbac44ef63dfb