Skip to content

[API Compatibility] Add view_as_complex and view_as_real APIs #74466

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Aug 14, 2025

Conversation

LittleHeroZZZX
Copy link
Contributor

@LittleHeroZZZX LittleHeroZZZX commented Aug 7, 2025

PR Category

User Experience

PR Types

New features

Description

新增 view_as_complex 和 view_as_real 两个 API。二者参数与 torch 一致,并将 input 转发到 as_complex 和 as_real。在框架默认开启 Stride 机制的情况下,将返回输入 Tensor 的 view。

PaConvert:PaddlePaddle/PaConvert#618
Docs:PaddlePaddle/docs#7377

Copy link

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

Codecov Report

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

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

@LittleHeroZZZX
Copy link
Contributor Author

/re-run all-failed

@LittleHeroZZZX
Copy link
Contributor Author

/re-run all-failed

Copy link
Contributor

@zhwesky2010 zhwesky2010 left a comment

Choose a reason for hiding this comment

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

LGTM

@zhwesky2010 zhwesky2010 requested a review from SigureMo August 13, 2025 12:15
@LittleHeroZZZX
Copy link
Contributor Author

/rerun all-failed

@LittleHeroZZZX
Copy link
Contributor Author

/re-run all-failed

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

@LittleHeroZZZX
Copy link
Contributor Author

/re-run all-failed

@zhwesky2010 zhwesky2010 merged commit 8321bbb into PaddlePaddle:develop Aug 14, 2025
139 of 153 checks passed
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.

5 participants