Skip to content

Commit 1cd6325

Browse files
authored
新增映射文档 (#7319)
* update docs * resolve conflict * update api_mapping * update validate_mapping_files
1 parent 872cb85 commit 1cd6325

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

docs/guides/model_convert/convert_from_pytorch/pytorch_api_mapping_cn.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -453,6 +453,8 @@
453453
| ALIAS-REFERENCE-ITEM(`torch.utils.data.sampler.WeightedRandomSampler`, `torch.utils.data.WeightedRandomSampler`) |
454454
| ALIAS-REFERENCE-ITEM(`torch.utils.model_zoo.load_url`, `torch.hub.load_state_dict_from_url`) |
455455
| ALIAS-REFERENCE-ITEM(`torch.xlogy`, `torch.special.xlogy`) |
456+
| ALIAS-REFERENCE-ITEM(`torch.cuda.reset_max_memory_cached`, `torch.cuda.reset_max_memory_reserved`) |
457+
| ALIAS-REFERENCE-ITEM(`torch.cuda.reset_peak_memory_stats`, `torch.cuda.reset_max_memory_allocated`) |
456458

457459
## <span id="id25">功能缺失的 API 列表</span>
458460

@@ -1161,6 +1163,4 @@
11611163
| IN-DEVELOPMENT-PATTERN(`torch.cuda.comm.gather`, https://pytorch.org/docs/stable/generated/torch.cuda.comm.gather.html#torch-cuda-comm-gather) |
11621164
| IN-DEVELOPMENT-PATTERN(`torch.cuda.StreamContext`, https://pytorch.org/docs/stable/generated/torch.cuda.StreamContext.html#torch.cuda.StreamContext) |
11631165
| IN-DEVELOPMENT-PATTERN(`torch.Tensor.lu_solve`, https://pytorch.org/docs/stable/generated/torch.Tensor.lu_solve.html#torch-tensor-lu-solve) |
1164-
| IN-DEVELOPMENT-PATTERN(`torch.cuda.reset_peak_memory_stats`, https://pytorch.org/docs/stable/generated/torch.cuda.reset_peak_memory_stats.html#torch-cuda-reset-peak-memory-stats) |
1165-
| IN-DEVELOPMENT-PATTERN(`torch.cuda.reset_max_memory_cached`, https://pytorch.org/docs/stable/generated/torch.cuda.reset_max_memory_cached.html#torch-cuda-reset-max-memory-cached) |
11661166
| IN-DEVELOPMENT-PATTERN(`torch.autograd.Function.jvp`, https://pytorch.org/docs/stable/generated/torch.autograd.Function.jvp.html#torch-autograd-function-jvp) |

docs/guides/model_convert/convert_from_pytorch/tools/validate_mapping_files.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,7 @@
1313

1414
PADDLE_DOCS_BASE_URL = "https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/"
1515

16-
validate_whitelist = [
17-
r"torch.pi.md",
18-
]
16+
validate_whitelist = []
1917

2018
mapping_type_levels = [
2119
# type 0

0 commit comments

Comments
 (0)