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.33, 34 Migrate paddle.shape, paddle.numel into pir #57330

Merged
merged 1 commit into from
Sep 15, 2023

Conversation

huangjiyi
Copy link
Member

PR types

Others

PR changes

Others

Description

class Test1NumelOpComplex64(TestNumelOpComplex):
class TestNumelOp1Complex64(TestNumelOpComplex):
Copy link
Member Author

@huangjiyi huangjiyi Sep 14, 2023

Choose a reason for hiding this comment

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

改这些单测的名字是因为 unittest 好像是按照文件中单测名字的顺序执行每个单测的,然后改之前 Test1NumelOpComplex64 这几个单测执行在 TestNumelAPI 的前面,同时在加上 check_new_ir=Truecheck_output 会把当前环境下的 static_mode 变为 dynamic_mode,导致应该在 static_mode 下执行的 TestNumelAPI 变成在 dynamic_mode 下执行,然后就报错了

加上 check_new_ir=Truecheck_output 改变 static_mode 的相关代码我定位了,但我不知道这是不是正常的:

def __exit__(self, exc_type, exc_val, exc_tb):
paddle.framework.set_flags({"FLAGS_enable_new_ir_api": False})
self._switch_to_old_ir()
paddle.disable_static()

@paddle-bot paddle-bot bot added the contributor External developers label Sep 14, 2023
@luotao1 luotao1 added the HappyOpenSource 快乐开源活动issue与PR label Sep 15, 2023
@Aurelius84 Aurelius84 merged commit 2312831 into PaddlePaddle:develop Sep 15, 2023
danleifeng pushed a commit to danleifeng/Paddle that referenced this pull request Nov 14, 2023
@huangjiyi huangjiyi deleted the pir_shape_numel branch January 9, 2024 12:04
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