Skip to content

Conversation

DongBaiYue
Copy link
Contributor

@DongBaiYue DongBaiYue commented Aug 21, 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
paddle.unsqueeze x input axis dim
paddle.transpose x input perm dim0&dim1

Usage Example:

# Traditional Paddle call
paddle.transpose(x=x, perm=[1, 0, 2])  # if x.ndim==3

# New PyTorch-compatible call
paddle.transpose(input=x, dim0=0, dim1=1)

pcard-67164

Copy link

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

@DongBaiYue
Copy link
Contributor Author

/re-run all-failed

@codecov-commenter
Copy link

codecov-commenter commented Aug 21, 2025

Codecov Report

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

Additional details and impacted files
@@             Coverage Diff             @@
##             develop    #74815   +/-   ##
===========================================
  Coverage           ?   100.00%           
===========================================
  Files              ?         3           
  Lines              ?        23           
  Branches           ?         0           
===========================================
  Hits               ?        23           
  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

1 similar comment
@DongBaiYue
Copy link
Contributor Author

/re-run all-failed

@wanghuancoder wanghuancoder merged commit 2dc4258 into PaddlePaddle:develop Aug 25, 2025
102 of 105 checks passed
Luckycheng222 pushed a commit to Luckycheng222/Paddle that referenced this pull request Aug 25, 2025
* [API compatibility] unsqueeze and transpose

* add document

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

3 participants