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 exponential op #58029

Merged
merged 16 commits into from
Oct 26, 2023
Merged

Conversation

xingmingyyj
Copy link
Contributor

@xingmingyyj xingmingyyj commented Oct 11, 2023

PR types

Others

PR changes

Others

Description

  • fix exponential op
  • 为什么添加no check ?
    exponential op的输出值具有随机性,新Ir下的测试逻辑是在旧Ir下运行一次op,新Ir下运行一次op,比较两者的输出结果。因为exponential op的两次输出不相同所以现有的测试逻辑不适用。

@paddle-bot
Copy link

paddle-bot bot commented Oct 11, 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 Oct 11, 2023
@paddle-ci-bot
Copy link

paddle-ci-bot bot commented Oct 24, 2023

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

Copy link
Contributor

@kangguangli kangguangli left a comment

Choose a reason for hiding this comment

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

在PR里把为什么要添加No Check的原因详细描述下,可以记个TODO,这类问题要集中记录下,留待以后解决

@@ -1387,6 +1387,10 @@ foreach(IR_OP_TEST ${NEW_IR_OP_TESTS})
set_tests_properties(
${IR_OP_TEST} PROPERTIES ENVIRONMENT
"FLAGS_NEW_IR_OPTEST_WHITE_LIST=True")
if(${IR_OP_TEST} STREQUAL "test_exponential_op")
Copy link
Contributor

Choose a reason for hiding this comment

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

没有扩展性,建议改为列表实现,类似 #55857

Copy link
Contributor Author

Choose a reason for hiding this comment

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

已修改

@xingmingyyj
Copy link
Contributor Author

在PR里把为什么要添加No Check的原因详细描述下,可以记个TODO,这类问题要集中记录下,留待以后解决

已补充

@@ -1439,6 +1439,8 @@ def _check_ir_output(self, place, program, feed_map, fetch_list, outs):
check_method = lambda x, y, z: np.testing.assert_allclose(
x, y, err_msg=z, atol=1e-6, rtol=1e-6
)
if os.getenv("FLAGS_FLAGS_NEW_IR_NO_CHECK", None):
Copy link
Contributor

Choose a reason for hiding this comment

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

这个flag为什么和上面CMake里设置的不一样?而且他能生效?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

已修改 这里感觉应该单测失败才对

Copy link
Contributor

Choose a reason for hiding this comment

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

我怀疑这种写法是不是有问题,它会不会总是生效的?可以验证下这个flag对别的单测是不是也起效果了

Copy link
Contributor Author

Choose a reason for hiding this comment

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

确实有问题,if os.getenv("FLAGS_NEW_IR_NO_CHECK", None)只会检查这个环境变量是否存在,如果是0的话也会执行if后面的逻辑,现在改为if os.getenv("FLAGS_NEW_IR_NO_CHECK", None)==“True”只有得到环境变量为“True”才会执行

Copy link
Contributor

@kangguangli kangguangli left a comment

Choose a reason for hiding this comment

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

LGTM

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 YAML

@kangguangli kangguangli merged commit d94f039 into PaddlePaddle:develop Oct 26, 2023
@xingmingyyj xingmingyyj deleted the fix_exponential_op branch October 31, 2023 09:50
danleifeng pushed a commit to danleifeng/Paddle that referenced this pull request Nov 14, 2023
* fix exponential op

* 更新 op_compat.yaml

* fix parser

* 更新 utils.cc

* fix_exponential_op

* add flag FLAGS_FLAGS_NEW_IR_NO_CHECK

* add flag FLAGS_FLAGS_NEW_IR_NO_CHECK

* add flag FLAGS_FLAGS_NEW_IR_NO_CHECK

* add flag FLAGS_FLAGS_NEW_IR_NO_CHECK

* add flag FLAGS_FLAGS_NEW_IR_NO_CHECK

* Update new_ir_op_test_no_check_list

* Update op_test.py

* Update op_test.py

* Update CMakeLists.txt

* fix getenv
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.

4 participants