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

fix uniform_random_bf16_op #58904

Merged

Conversation

xingmingyyj
Copy link
Contributor

@xingmingyyj xingmingyyj commented Nov 10, 2023

PR types

Others

PR changes

Others

Description

修复fix uniform_random_bf16_op单测

  • 为什么会修改单测在run方法中加入feed?
           outs = exe.run(
                train_program,
                feed={"input": np.zeros((1, 3)).astype('uint16')},
                fetch_list=[out_1],
            )

因为如果没有feed,在python侧_StandaloneExecutor执行run函数时传入的feed_names为空,在旧IR中会在program_interpreter中执行run函数,对于program_interpreter初始化Variable的机制,他会在构建Varibale是就将其初始化。而pir_interpreter不会先初始化Variable,它根据feed_names为输入变量初始化,所以如果feed_names为空,会导致input不会被初始化,导致后面运行报错。

@paddle-bot paddle-bot bot added the contributor External developers label Nov 10, 2023
Copy link

paddle-ci-bot bot commented Nov 19, 2023

Sorry to inform you that d85a898's CIs have passed for more than 7 days. To prevent PR conflicts, you need to re-run all CIs manually.

Copy link
Contributor

@zyfncg zyfncg left a comment

Choose a reason for hiding this comment

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

LGTM for op_compat.yaml

Copy link
Contributor

@heavyrain-lzy heavyrain-lzy left a comment

Choose a reason for hiding this comment

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

LGTM for op_compat.yaml

@kangguangli kangguangli merged commit 4acb752 into PaddlePaddle:develop Nov 23, 2023
28 checks passed
@xingmingyyj xingmingyyj deleted the fix_unique_random_bf16_op branch November 23, 2023 07:55
SecretXV pushed a commit to SecretXV/Paddle that referenced this pull request Nov 28, 2023
* fix uniform_random_bf16_op

* fix

* Update pir_op_test_no_check_list
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributor External developers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants