Skip to content

Conversation

@HydrogenSulfate
Copy link
Contributor

@HydrogenSulfate HydrogenSulfate commented Feb 28, 2025

PR Category

Operator Mechanism

PR Types

Bug fixes

Description

Pcard-75624

修复 Sin/Cos Double Grad functor 中为判空直接获取输出指针的行为,将其移动到了判断分支的内部,避免出现类似如下的报错

RuntimeError: (NotFound) Unable to get phi::DenseTensor data of Output d2x in operator SinDoubleGrad. Possible reasons are:
  1. The d2x is not the Output of operator SinDoubleGrad;
  2. The d2x has no corresponding variable passed in;
  3. The d2x corresponding variable is not initialized.
  [Hint: pointer dX should not be null.] (at ../paddle/phi/kernels/funcs/activation_functor.h:178)

@paddle-bot
Copy link

paddle-bot bot commented Feb 28, 2025

你的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.

@zyfncg zyfncg merged commit 0b8e213 into PaddlePaddle:develop Mar 3, 2025
36 checks passed
@HydrogenSulfate HydrogenSulfate deleted the fix_cos_sin_double_grad_functor branch March 3, 2025 02:45
Enigmatisms pushed a commit to Enigmatisms/Paddle that referenced this pull request Mar 6, 2025
YqGe585 pushed a commit to YqGe585/Paddle that referenced this pull request May 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants