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

【OpPorting Example】DEMO OF FIX COMPILE&RUNTIME LOD_EQUALITY #22460

Merged
merged 6 commits into from
Feb 11, 2020

Conversation

DannyIsFunny
Copy link
Contributor

@DannyIsFunny DannyIsFunny commented Feb 5, 2020

【OP单测规范修改示例】OP规范中规定编译时和运行是Lod_level一致,当前不能一致。不能通过一致性规范的OP请参考本PR的实现方式修改OP的实现
【一般修改方法描述】
错误原因:编译时与运行时输出的lod_level不一致
对应代码:infershape函数中未针对compile-time时设置lod_level.
修改方法:

  1. 在OP的infershape函数中,添加编译时lod_level的设置方法
      // when compiling, the LodLevel of Out is set to be ***, which is consistent
      // with that in running time.
      ctx->SetLoDLevel("Out", lodlevel_in_runtime);
  1. 修改完成后,在白名单文件python/paddle/fluid/tests/unittests/white_list/compile_vs_runtime_white_list.py中除去修复的OP名称。

@DannyIsFunny DannyIsFunny changed the title 【OP规范修改】DEMO OF FIX COMPILE&RUNTIME LOD_EQUALITY 【OpPorting Example】DEMO OF FIX COMPILE&RUNTIME LOD_EQUALITY Feb 6, 2020
Copy link
Contributor

@luotao1 luotao1 left a comment

Choose a reason for hiding this comment

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

@xyzhou-puck 请review下sequence相关Op的修改逻辑是否正确

'retinanet_target_assign', 'filter_by_instag', 'fusion_seqpool_concat',
'multiclass_nms', 'multiclass_nms2', 'im2sequence',
'generate_proposal_labels', 'distribute_fpn_proposals', 'detection_map',
'locality_aware_nms', 'var_conv_2d'
Copy link
Contributor

@luotao1 luotao1 Feb 7, 2020

Choose a reason for hiding this comment

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

一个API一行,避免多人同时修改时冲突。

Copy link
Contributor Author

Choose a reason for hiding this comment

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

已经按照意见修改完毕

@luotao1 luotao1 requested a review from xyzhou-puck February 7, 2020 04:40
Copy link
Contributor

@xyzhou-puck xyzhou-puck left a comment

Choose a reason for hiding this comment

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

LGTM.

@luotao1 luotao1 closed this Feb 10, 2020
@luotao1 luotao1 reopened this Feb 10, 2020
@DannyIsFunny DannyIsFunny reopened this Feb 11, 2020
@DannyIsFunny DannyIsFunny reopened this Feb 11, 2020
@luotao1 luotao1 merged commit 9e29d3e into PaddlePaddle:develop Feb 11, 2020
@DannyIsFunny DannyIsFunny deleted the COMPILERUNTIME_FIX branch February 11, 2020 12:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants