[BugFix]fix bug of opt tool#8590
Merged
weishengying merged 1 commit intoPaddlePaddle:developfrom Mar 14, 2022
weishengying:optimize_lite_type_system
Merged
[BugFix]fix bug of opt tool#8590weishengying merged 1 commit intoPaddlePaddle:developfrom weishengying:optimize_lite_type_system
weishengying merged 1 commit intoPaddlePaddle:developfrom
weishengying:optimize_lite_type_system
Conversation
|
Thanks for your contribution! |
| VLOG(5) << "input datatype : " | ||
| << static_cast<int>(in->AsArg().type->id()); | ||
| VLOG(5) << "kernel bind datatype : " | ||
| << static_cast<int>(kernel.GetInputDeclType(argname)->id()); |
Collaborator
There was a problem hiding this comment.
这一部分实现有风险:
eg.
op {float in1 , int in2, float out}
place <CPU\NCHW\float32>
候选kernel
Kernel1 <CPU\NCHW\float32> {float in1 , float in2, float out}
Kernel2 <CPU\NCHW\float32> {float in1 , int in2, float out}
kernel2 更匹配,却实际选中了kernel 1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
修复mask_rcnn和fast_rcnn在opt转换过程中报错的bug。
主要改动如下:
1、增加更详细的log,以往的kernel_pick pass中的log无法知道当前候选kernel信息,当前op处于第几个block以及在block中的位置等信息,难以debug。
2、增加新的积分规则:
当候选kernel 绑定的input参数类型的数据类型 与 该op的输入变量的数据类型匹配时,将得分*2, 类似已经存在的输入精度匹配规则。
3、删除类型系统中无用数据结构。