Skip to content

Conversation

@DanielSun11
Copy link
Contributor

PR Category

Execute Infrastructure

PR Types

Improvements

Description

#70098 对paddle.linalg.matrix_power 的前向kernel进行了修复,但是其反向kernel仍然报错。在PaddleAPITest中的报错信息如下:
8d49657c4b615ae0eedf9f65915c2394

原因是MatrixPowerGradKernel遇到0 size Tensor时没有及时返回导致继续调用cublas进而报cublas error 7。
修复过程:

  1. infermeta检查未发现错误。
  2. 修复MatrixPowerGradKernel,cpu和gpu共用同一个MatrixPowerGradKernel,其他硬件没有对应的实现。
  3. 添加单测
  4. PaddleAPITest回测,回测结果:
    878362c37229ce0ee13f02d19ef265d1
    所有失败的用例全部通过。

Pcard-67164

- MatrixPowerGradKernel support 0-size Tensor
@paddle-bot
Copy link

paddle-bot bot commented May 19, 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.

@DanielSun11
Copy link
Contributor Author

/re-run clone

Copy link
Contributor

@wanghuancoder wanghuancoder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@wanghuancoder wanghuancoder merged commit e7ae67a into PaddlePaddle:develop May 20, 2025
54 checks passed
co63oc pushed a commit to co63oc/Paddle that referenced this pull request May 22, 2025
…trix_power API. (PaddlePaddle#72790)

* fix MatrixPowerGradKernel , add unittest
- MatrixPowerGradKernel support 0-size Tensor

* Update matrix_power_grad_kernel_impl.h

fix error

* Update matrix_power_grad_kernel_impl.h
@DanielSun11 DanielSun11 deleted the fix_0-size_matrix_power branch September 18, 2025 06:25
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