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

[SOT] Update ut test_06_call_function to avoid type promotion error #64170

Conversation

SigureMo
Copy link
Member

@SigureMo SigureMo commented May 10, 2024

PR Category

Execute Infrastructure

PR Types

Not User Facing

Description

#63842 修改了动态图和老 IR 的类型提升行为,PIR 没有改,导致了 PIR 下动静不统一

import paddle

def add(x, y):
    return x + y

x = paddle.to_tensor(2, dtype="int32")
y = paddle.to_tensor(1.2, dtype="float32")

add_static = paddle.jit.to_static(add, full_graph=True)
z_dy = add(x, y)
z_st = add_static(x, y)
print(z_dy, z_st)

比如上述 case,开启 FLAGS_enable_pir_api=True 动静是不统一的,静态图结果并不符合预期

但 PIR 的类型提升短期内不会支持,暂时修改该单测,因为该单测只是为了测函数的各种调用形式的功能,并不测 dtype 类型提升

PCard-66972

Copy link

paddle-bot bot commented May 10, 2024

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

@SigureMo SigureMo merged commit 686d081 into PaddlePaddle:develop May 10, 2024
30 of 31 checks passed
@SigureMo SigureMo deleted the sot/update-ut-to-avoid-type-promotion-error branch May 10, 2024 15:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants