Skip to content

Conversation

DongBaiYue
Copy link
Contributor

@DongBaiYue DongBaiYue commented Aug 14, 2025

PR Category

Operator Mechanism

PR Types

Improvements

Description

This PR introduces PyTorch API compatibility aliases and resolves type checking issues:

  1. Added PyTorch-compatible parameter aliases:
API param1 alias1 param2 alias2
torch.nn.functional.softmax x input axis dim
torch.nonzero x input out
torch.randn shape *size

Usage Example:

# Traditional Paddle call
output = paddle.rand([2,3])

# New PyTorch-compatible call
output = paddle.rand(2,3)

pcard-67164

Copy link

paddle-bot bot commented Aug 14, 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.

@codecov-commenter
Copy link

codecov-commenter commented Aug 14, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (develop@8321bbb). Learn more about missing BASE report.

Additional details and impacted files
@@             Coverage Diff             @@
##             develop    #74623   +/-   ##
===========================================
  Coverage           ?   100.00%           
===========================================
  Files              ?         3           
  Lines              ?         8           
  Branches           ?         0           
===========================================
  Hits               ?         8           
  Misses             ?         0           
  Partials           ?         0           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@DongBaiYue
Copy link
Contributor Author

/re-run all-failed

@DongBaiYue
Copy link
Contributor Author

/re-run all-failed

2 similar comments
@DongBaiYue
Copy link
Contributor Author

/re-run all-failed

@DongBaiYue
Copy link
Contributor Author

/re-run all-failed

Copy link
Contributor

@XiaoguangHu01 XiaoguangHu01 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@sunzhongkai588 sunzhongkai588 left a comment

Choose a reason for hiding this comment

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

LGTM,中文文档同步修改

@DongBaiYue
Copy link
Contributor Author

/re-run all-failed

@zhangbo9674 zhangbo9674 merged commit ac88893 into PaddlePaddle:develop Aug 19, 2025
126 of 135 checks passed
Luckycheng222 pushed a commit to Luckycheng222/Paddle that referenced this pull request Aug 25, 2025
* [API compatibility] softmax, nonzero, randn

* delete chinese

* deleta *shape

* fix comment example

* fix

* fix
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.

5 participants