upgrade pytorch-paddle mapping table generating process #6752
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
更新了 PyTorch-Paddle 映射目录的构建方式:
REFERENCE-MAPPING-ITEM
宏REFERENCE-MAPPING-TABLE
宏,用于指定表格规则,用法为REFERENCE-MAPPING-TABLE(prefix, max_depth=255)
max_depth
(torch.asin
深度为 1,torch.Tensor.asin
深度为 2,torch.nn.functional.adaptive_max_pool2d
深度为 3),如果检查失败则尝试匹配后续表格。ALIAS-REFERENCE-ITEM
:用于指定别名,该宏仍然保留,因为其数据依赖PaConvert
的api_alias_mapping.json
文件,因此手动维护更新;NOT-IMPLEMENT-ITEM
:用于构建尚未支持的 API,该宏仍然保留,因为尚未支持的 API 列表数据无法通过其他文件推导。本次更新后,该文件
docs/guides/model_convert/convert_from_pytorch/pytorch_api_mapping_cn.md
将不再需要手动维护其中的映射项,而是自动基于api_difference
目录下的映射文档进行生成,从而确保能够展示所有内容,并避免出现失同步的现象。