Skip to content

Conversation

@Enigmatisms
Copy link
Contributor

@Enigmatisms Enigmatisms commented May 12, 2025

PR Category

CINN

PR Types

Bug fixes

Description

此前 #72598 中实现的 arange CINN 支持,没有支持 float16 和 bfloat16,本PR已经加上。如下两个简单的测试可以验证 (在test_cinn_arange.py 单测中)。内部计算 shape 时使用 float 计算。

def test_arange_postfuse_float16(self): def func(): return paddle.arange(0, 1024, 2.1, dtype="float16") * 0.2 + 1 self.eval(func, []) def test_arange_postfuse_bfloat16(self): def func(): return paddle.arange(0, 128, 8, dtype="bfloat16") * 2 + 1 self.eval(func, [])

Pcard-89620

@paddle-bot
Copy link

paddle-bot bot commented May 12, 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.

@lshpku lshpku merged commit 387259f into PaddlePaddle:develop May 12, 2025
45 of 48 checks passed
GITD245 pushed a commit to GITD245/Paddle that referenced this pull request May 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants