Skip to content

[Cherry-pick][release/3.3] Fix the problem of size accuracy when using arange/range with different input and output types#78787

Merged
sneaxiy merged 1 commit intoPaddlePaddle:release/3.3from
omoYang:cherry-pick/release-3.3/arange-precision
May 8, 2026
Merged

[Cherry-pick][release/3.3] Fix the problem of size accuracy when using arange/range with different input and output types#78787
sneaxiy merged 1 commit intoPaddlePaddle:release/3.3from
omoYang:cherry-pick/release-3.3/arange-precision

Conversation

@omoYang
Copy link
Copy Markdown
Contributor

@omoYang omoYang commented Apr 24, 2026

PR Category

Operator Mechanism

PR Types

Bug fixes

Description

Fix the accuracy problem in paddle.arange() and paddle.range() caused by forced type transformation between input and output, which leads to incorrect size calculation.

Cherry-pick from #78747 to release/3.4
devPR:#78747

是否引起精度变化

@paddle-bot
Copy link
Copy Markdown

paddle-bot Bot commented Apr 24, 2026

你的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.

@paddle-bot paddle-bot Bot added the contributor External developers label Apr 24, 2026
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Apr 24, 2026

Codecov Report

❌ Patch coverage is 93.91304% with 7 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (release/3.3@2b9f8b6). Learn more about missing BASE report.

Files with missing lines Patch % Lines
paddle/phi/kernels/funcs/range_function.h 0.00% 4 Missing ⚠️
paddle/phi/kernels/cpu/range_kernel.cc 92.59% 2 Missing ⚠️
python/paddle/tensor/creation.py 95.00% 1 Missing ⚠️
Additional details and impacted files
@@              Coverage Diff               @@
##             release/3.3   #78787   +/-   ##
==============================================
  Coverage               ?   93.91%           
==============================================
  Files                  ?        7           
  Lines                  ?      115           
  Branches               ?        0           
==============================================
  Hits                   ?      108           
  Misses                 ?        7           
  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.

@omoYang omoYang force-pushed the cherry-pick/release-3.3/arange-precision branch from 96c9485 to bb30696 Compare April 30, 2026 09:14
…ent input and output types.

    Co-authored-by: omoYang <1115418865@qq.com>
    Co-authored-by: SigureMo <sigure.qaq@gmail.com>
@omoYang omoYang force-pushed the cherry-pick/release-3.3/arange-precision branch from bb30696 to 3d4b51d Compare May 1, 2026 17:13
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented May 1, 2026

CLA assistant check
All committers have signed the CLA.

@omoYang
Copy link
Copy Markdown
Contributor Author

omoYang commented May 4, 2026

/re-run all-failed

@omoYang
Copy link
Copy Markdown
Contributor Author

omoYang commented May 7, 2026

/re-run all-failed

@omoYang omoYang closed this May 7, 2026
@omoYang omoYang reopened this May 7, 2026
Copy link
Copy Markdown
Collaborator

@sneaxiy sneaxiy left a comment

Choose a reason for hiding this comment

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

LGTM

@sneaxiy sneaxiy merged commit 90b7b9f into PaddlePaddle:release/3.3 May 8, 2026
151 of 169 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants