-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
refine the initial cpu memory flag for mkldnn #11525
Conversation
paddle/fluid/platform/cpu_info.cc
Outdated
"Default initial 500MB of CPU memory for PaddlePaddle, in MD unit."); | ||
DEFINE_uint64(initial_cpu_memory_in_mb, | ||
#ifdef PADDLE_WITH_MKLDNN | ||
1000, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add some comments to tell why 1000 works.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, I am not sure why this exactly 1000 number may works.
I was trying to give more space, here gives 2x of original, for MKLDNN according to the comment from mozga-intel.
And that's why I add @mozga-intel to help to review.
Please @mozga-intel, could you please help check if it's this enough.
BTW, I add this flag to env, so users can change this from env if this default 1000MB is not enough.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tensor-tang Of course.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tensor-tang IMO I think that 1000MB of space of memory is too small. The good result is obtained when the memory is greater than 5000 MB
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, thanks @mozga-intel, I will replace it with 5000 MB.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks @mozga-intel as well.
resolve #11481