Repository navigation
Description
✨ 整体背景:
大家好,为了提升模型迁移的效率,我们建设了 代码自动转换工具: PaddlePaddle Code Convert Toolkits,为了降低 代码自动转换工具 中转换规则Matcher的开发难度,我们需要对部分框架API的功能和易用性进行增强。
🍻 你需要做的是:
我们已将任务记录在《在线任务明细表》,一共55个任务,其中 问题描述 这一列阐述了当前Paddle API的问题;修改方案 这一列阐述了该API的升级修改思路,即你需要开发的内容;预计成本 这一列阐述了该任务的预估难度及成本。大家可根据这三列信息,来评估和选择自己适合的任务,并自由认领任务,认领时直接在本issue下回复 任务ID 即可,欢迎大家来认领任务和提PR ~
✨ 注意:
-
该任务时间:PR 截止合入时间是2024/3/31。
-
开发流程与Paddle代码贡献流程完全一致,可参考Paddle官网文档:代码贡献流程
-
API修改时,请注意同时修改 API中文文档(位于doc repo中)、API英文文档。
-
PR请先通过CI检查后再发起review,避免增加不必要的review成本。
-
PR标题格式:No.1~35 paddle.xxx易用性提升,PR描述需要附上本issue,在提交PR后我们会内部指派reviewer,由该reviewer负责合入。
-
历史上的 good first issue 列表,也欢迎来提 PR 解决~ 欢迎联系花花加入社区,和我们一起快乐开源!
Overall Background:
Hello everyone, in order to improve the efficiency of model migration, we have built a code auto-conversion tool: PaddlePaddle Code Convert Toolkits. To reduce the development difficulty of conversion rules Matcher in the code auto-conversion tool, we need to enhance the functionality and usability of some framework APIs.
What You Need to Do:
We have recorded the tasks in the Online Task Details, totaling 35 tasks. The "Issue" column explains the current issues with the Paddle API, the "Solution" column outlines the upgrade and modification approach for that API, which is what you need to develop. The "Workload Estimate" column describes the estimated difficulty and cost of the task. You can evaluate and choose tasks that suit you based on these three columns and freely claim tasks. When claiming a task, simply reply with the task ID in this issue. Welcome everyone to claim tasks and submit PRs~
Note:
- The deadline for this task: The PR deadline for merging is October 31, 2023.
- The development process is completely consistent with the Paddle code contribution process. You can refer to the Paddle official website documentation: Code Contribution Process.
- When modifying APIs, please remember to update the API Chinese documentation (located in the doc repo) and API English documentation at the same time.
- Please initiate a review only after passing the CI checks to avoid unnecessary review costs.
- PR Title Format: No.1~35 paddle.xxx usability improvement. PR descriptions should include a reference to this issue. After submitting a PR, we will internally assign a reviewer responsible for merging.
- List of historical good first issues is also welcome for PR solutions~ Feel free to contact Hua Hua to join the community and enjoy open source together!
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone

Activity
[-]飞桨API易用性提升: paddle.diff[/-][+]飞桨框架API易用性提升开源任务[/+]zhwesky2010 commentedon Aug 2, 2023
🍻 任务列表(整体进度 8/34)
GreatV commentedon Aug 5, 2023
@snorfyang 任务明细表还没更新,估计还需要一段时间。
zhwesky2010 commentedon Aug 17, 2023
你好,已更新在线任务明细表
28 remaining items
YibinLiu666 commentedon Nov 15, 2023
我看maxpool调用的c op是在https://github.com/PaddlePaddle/Paddle/blob/develop/paddle/phi/api/yaml/legacy_ops.yaml 这个里面定义的pool2d,然后我看https://github.com/PaddlePaddle/Paddle/blob/develop/paddle/phi/kernels/pool_kernel.h 里面有个Pool2dGPUDNNKernel的接口也被注册到pool2d,这个实现是用cudnn实现的。
YibinLiu666 commentedon Nov 15, 2023
认领43、51
zhwesky2010 commentedon Nov 16, 2023
这个API有CPU、GPU(不适用cudnn)、GPUDNN(使用cudnn)的算子、XPU算子,使用cudnn应该也有办法实现,是将stride、dilation多个参数加工处理后,最终调用的cudnn接口。
YibinLiu666 commentedon Nov 16, 2023
好的,我再想一下怎么加工处理
YibinLiu666 commentedon Nov 16, 2023
关于问题43的问题:
在修复此问题的bug时发现paddle的take_along_axis与torch的gather行为也不一致,不一致的代码如下:
import torch
t = torch.tensor([[1, 2], [3, 4]])
i=torch.tensor([[1]])
result = torch.gather(t,1,i)
torch对应的输出是tensor([[2]]),而paddle输出结果是
Tensor(shape=[2, 1], dtype=int64, place=Place(gpu:0), stop_gradient=True, [[2], [4]])在完成该任务时需要一起解决吗
zhwesky2010 commentedon Nov 17, 2023
@YibinLiu666 需要一起解决的,应该是之前没有扫描到。
Olive-2019 commentedon Nov 28, 2023
关于任务27、28的问题:
任务27:paddle不支持
remove_duplicate,但是支持逻辑几乎一样的include_sublayers任务28:paddle不支持
memo,但是支持逻辑几乎一样的layers_set解决方案:
memo与remove_duplicate参数,保持与include_sublayers和layers_set的逻辑同步,允许使用pytorch的同名参数(不太建议,加入冗余代码)请问这两个任务采取哪种解决方案?
zhwesky2010 commentedon Nov 29, 2023
建议要拿torch代码测试一下,是否完全一致,如果完全一致或者有简单的转写方式,则不需要调整API,写入映射文档中即可。如果差异很大,则需要扩充API的功能才可支持转写。
YibinLiu666 commentedon Dec 13, 2023
第6题中
paddle.nn.functional.triplet_margin_with_distance_loss与torch中不一样的复现代码能否提供一下zhwesky2010 commentedon Dec 14, 2023
你好,这个验证后发现是参数的随机初始化导致结果不同,无需修改,关闭任务。
YibinLiu666 commentedon Dec 15, 2023
认领7、10、14、21