Rename DynamicType -> TensorType (#16787)
Summary:
```
import json
from subprocess import check_call
from pprint import pprint
renames = {
'c10::TensorType': 'DimentionedTensorType',
'c10::DynamicType': 'TensorType',
'c10::TensorTypePtr': 'DimentionedTensorTypePtr',
'c10::DynamicTypePtr': 'TensorTypePtr',
'c10::TypeKind::DynamicType': 'TensorType',
'c10::TypeKind::TensorType': 'DimentionedTensorType',
}
entries = json.loads(open('compile_commands.json', 'r').read())
build = None
sources = []
for e in entries:
name = e['file']
if not ('jit' in name or 'ATen/core' in name):
continue
build = e['directory']
sources.append(name)
args = ['clang-rename', '-i', '-force', '-pl']
for name in sorted(renames.keys()):
args += ['-qualified-name={}'.format(name), '-new-name={}'.format(renames[name])]
for source in sources:
cmd = args + [source]
pprint(args)
check_call(cmd, cwd=build)
check_call(['git', 'stash', 'push', '-m', 'rename'])
```
Pull Request resolved: https://github.com/pytorch/pytorch/pull/16787
Differential Revision: D13974132
Pulled By: zdevito
fbshipit-source-id: 8368fd53e17cff83707bbe77f2d7aad74f8ce60e