Skip to content

Conversation

@DongBaiYue
Copy link
Contributor

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.any x input axis dim
paddle.Tensor.any axis dim
paddle.argsort x input axis dim
paddle.argsort axis dim
paddle.chunk x input axis dim
paddle.Tensor.chunk axis dim

Usage Example:

# Traditional Paddle call
output = paddle.chunk(input=tensor_x, dim=1)

# New PyTorch-compatible call
output = paddle.chunk(x=tensor_x, axis=1)
  1. Added PyTorch-compatible parameter out

paddle.any and paddle.Tensor.any

def any(
        x: Tensor,
        axis: int | Sequence[int] | None = None,
        keepdim: bool = False,
        name: str | None = None,
        *,
        out: Tensor | None = None
    ) -> Tensor

pcard-67164

@paddle-bot
Copy link

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

@DongBaiYue
Copy link
Contributor Author

/re-run all-failed

1 similar comment
@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

@DongBaiYue
Copy link
Contributor Author

/re-run all-failed

@codecov-commenter
Copy link

Codecov Report

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

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

wanghuancoder
wanghuancoder previously approved these changes Aug 21, 2025
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

@DongBaiYue
Copy link
Contributor Author

/re-run all-failed

@DongBaiYue
Copy link
Contributor Author

/re-run build

@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

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 955e32c into PaddlePaddle:develop Aug 22, 2025
106 of 113 checks passed
Luckycheng222 pushed a commit to Luckycheng222/Paddle that referenced this pull request Aug 25, 2025
* [API compatibility] argsort, chunk, any

* delete, type ignore and fix TestChunkOpError

* delete old ir test

* add out test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants