Skip to content

Conversation

@pinzhenx
Copy link
Contributor

@pinzhenx pinzhenx commented Jun 23, 2020

Disable mix precision in model fusion, since mixed precision in fusion cannot bring any benefits for inference, but will lead to a little bit loss of accuracy, noticed by @jiayisunx

@pinzhenx
Copy link
Contributor Author

@EikanWang Please help merge it. As we found it will decrease the rn50 top1 accuracy by 0.08%.

@EikanWang
Copy link
Contributor

If we disable the BN, does it impact the perf? Because there are two reorder here.

@pinzhenx
Copy link
Contributor Author

pinzhenx commented Jun 24, 2020

@EikanWang What do you mean by disable the BN?

Two reorders f32-bf16 during convbn folding came from mul and sum.

@pinzhenx pinzhenx marked this pull request as draft June 24, 2020 02:15
@pinzhenx pinzhenx marked this pull request as ready for review June 24, 2020 02:26
@pinzhenx
Copy link
Contributor Author

@EikanWang I've also removed auto mixed precision in dil_clone. Because users are not expecting that calling deepcopy(model) will cause a loss of precision. Does that make sense?

@pinzhenx pinzhenx changed the title disable mixed precision in bn fusion disable mixed precision in bn fusion & clone Jun 24, 2020
@EikanWang EikanWang merged commit 64d4ad8 into intel:master Jun 24, 2020
@pinzhenx pinzhenx deleted the nomix branch June 24, 2020 05:27
zhuhaozhe pushed a commit to zhuhaozhe/intel-extension-for-pytorch that referenced this pull request Jun 24, 2020
* disable mixed precision in bn fusion

* disable mixed precision in dil_clone
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants