PaddlePaddle / Paddle

PArallel Distributed Deep LEarning: Machine Learning Framework from Industrial Practice (『飞桨』核心框架,深度学习&机器学习高性能单机、分布式训练和跨平台部署)
http://www.paddlepaddle.org/
Apache License 2.0
21.63k stars 5.44k forks source link

【Hackathon 6th No.35】support kwargs for recompute when use_reentrant == True fix #63880

Open AndSonder opened 1 week ago

AndSonder commented 1 week ago

PR Category

Auto Parallel

PR Types

Improvements

Description

对于如下情况

# 摘自 PaddleMIX:https://github.com/PaddlePaddle/PaddleMIX/blob/8b896d533811a3500af3064c5f1952b77003d4c8/ppdiffusers/ppdiffusers/models/unet_2d_blocks.py#L1149-L1155
def custom_forward(*inputs):

    ...

使用 bound_args.arguments 是错误的,无论传入多少个值,bound_args.arguments 只有一个值,就是打包后的 inputs。

由于 PyLayer 中 kwargs 没有梯度的这个 feature 被部分功能利用了,直接修改 PyLayer 会影响这些功能。

所以本PR 针对这种 Case,直接报错提示。

相关 PR:

paddle-bot[bot] commented 1 week ago

你的PR提交成功,感谢你对开源项目的贡献! 请关注后续CI自动化测试结果,详情请参考Paddle-CI手册。 Your PR has been submitted. Thanks for your contribution! Please wait for the result of CI firstly. See Paddle CI Manual for details.

paddle-ci-bot[bot] commented 2 days ago

Sorry to inform you that b71ac65's CIs have passed for more than 7 days. To prevent PR conflicts, you need to re-run all CIs manually.

AndSonder commented 13 hours ago

本 PR 申请 Coverage CI 豁免。本 PR 主要是对之前说的会出错的 case 进行拦截, 除了拦截的case,其他 case 对应的单测已经都加了 @luotao1