mirror of
https://github.com/saymrwulf/pytorch.git
synced 2026-05-15 21:00:47 +00:00
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
|
||
|---|---|---|
| .. | ||
| bottleneck | ||
| cpp | ||
| cpp_extensions | ||
| custom_operator | ||
| data | ||
| error_messages | ||
| expect | ||
| ffi/src | ||
| onnx | ||
| optim | ||
| test_module | ||
| common_cuda.py | ||
| common_methods_invocations.py | ||
| common_nn.py | ||
| common_utils.py | ||
| expecttest.py | ||
| run_test.py | ||
| test_autograd.py | ||
| test_c10d.py | ||
| test_cpp_extensions.py | ||
| test_cuda.py | ||
| test_cuda_primary_ctx.py | ||
| test_dataloader.py | ||
| test_distributed.py | ||
| test_distributions.py | ||
| test_expecttest.py | ||
| test_indexing.py | ||
| test_indexing_cuda.py | ||
| test_jit.py | ||
| test_multiprocessing.py | ||
| test_multiprocessing_spawn.py | ||
| test_nccl.py | ||
| test_nn.py | ||
| test_numba_integration.py | ||
| test_optim.py | ||
| test_sparse.py | ||
| test_thd_distributed.py | ||
| test_torch.py | ||
| test_type_hints.py | ||
| test_type_info.py | ||
| test_utils.py | ||