Skip to content

Conversation

tensor-tang
Copy link
Contributor

Avoid cpu conflicting when use_mkldnn=False

@tensor-tang tensor-tang requested a review from luotao1 September 27, 2017 09:10
@luotao1
Copy link
Contributor

luotao1 commented Sep 27, 2017

避免CPU竞争后,在Intel(R) Xeon(R) CPU E5-2620 0 @ 2.00GHz 上,对train vgg 64 False(使用MKLML)测得的对比数据如下:

  • 优化前的脚本:一个batch需要72s。
I0927 17:22:12.967727 11210 TrainerInternal.cpp:165]  Batch=1 samples=64 AvgCost=6.90691 CurrentCost=6.90691 Eval:  CurrentEval: 

I0927 17:23:24.291543 11210 TrainerInternal.cpp:165]  Batch=2 samples=128 AvgCost=6.89256 CurrentCost=6.8782 Eval:  CurrentEval: 

I0927 17:24:35.678067 11210 TrainerInternal.cpp:165]  Batch=3 samples=192 AvgCost=6.86233 CurrentCost=6.80187 Eval:  CurrentEval: 

I0927 17:25:46.317230 11210 TrainerInternal.cpp:165]  Batch=4 samples=256 AvgCost=6.80972 CurrentCost=6.65189 Eval:  CurrentEval:
  • 优化后的脚本:一个batch仅需30s
I0927 17:30:13.134626 31875 TrainerInternal.cpp:165]  Batch=1 samples=64 AvgCost=6.97192 CurrentCost=6.97192 Eval:  CurrentEval: 

I0927 17:30:43.715212 31875 TrainerInternal.cpp:165]  Batch=2 samples=128 AvgCost=6.92188 CurrentCost=6.87183 Eval:  CurrentEval: 

I0927 17:31:15.349555 31875 TrainerInternal.cpp:165]  Batch=3 samples=192 AvgCost=6.86882 CurrentCost=6.7627 Eval:  CurrentEval: 

I0927 17:31:45.824867 31875 TrainerInternal.cpp:165]  Batch=4 samples=256 AvgCost=6.81989 CurrentCost=6.67311 Eval:  CurrentEval: 

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.

效果很棒。但建议脚本进行简化,现在脚本的分支太多了。

@tensor-tang
Copy link
Contributor Author

Done,

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.

LGTM

@luotao1 luotao1 merged commit 9928eb8 into PaddlePaddle:develop Sep 27, 2017
@tensor-tang tensor-tang deleted the mkldnn branch September 27, 2017 12:08
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