Skip to content
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

[NewIR] No.11 Migrate cast into pir #57159

Merged
merged 4 commits into from
Sep 14, 2023
Merged

[NewIR] No.11 Migrate cast into pir #57159

merged 4 commits into from
Sep 14, 2023

Conversation

GreatV
Copy link
Contributor

@GreatV GreatV commented Sep 10, 2023

PR types

Others

PR changes

Others

Description

[NewIR] No.11 Migrate cast into pir

@paddle-bot
Copy link

paddle-bot bot commented Sep 10, 2023

你的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 Sep 10, 2023
@luotao1 luotao1 added the HappyOpenSource 快乐开源活动issue与PR label Sep 11, 2023
@YuanRisheng
Copy link
Contributor

ci-py3的问题可以这样解决:
将test_cast_op.py中的cast_wrapper代码改成如下形式:

def cast_wrapper(x, out_dtype=None):
    paddle_dtype = paddle.dtype(out_dtype)
    #unify dtype to numpy_type for pir and dygraph
    numpy_dtype = paddle.base.data_feeder._PADDLE_DTYPE_2_NUMPY_DTYPE[paddle_dtype]
    return paddle.cast(x, numpy_dtype)

@0x45f 0x45f merged commit 5caed2a into PaddlePaddle:develop Sep 14, 2023
Copy link
Contributor

@xiaoguoguo626807 xiaoguoguo626807 left a comment

Choose a reason for hiding this comment

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

这个单测里还有check_output 中没加new_ir的是为什么

@GreatV GreatV deleted the migrate_cast_into_pir branch November 6, 2023 15:07
danleifeng pushed a commit to danleifeng/Paddle that referenced this pull request Nov 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributor External developers HappyOpenSource 快乐开源活动issue与PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants