Skip to content

remove unused code#5219

Merged
QiJune merged 3 commits intoPaddlePaddle:developfrom
QiJune:remove_unused_code
Oct 31, 2017
Merged

remove unused code#5219
QiJune merged 3 commits intoPaddlePaddle:developfrom
QiJune:remove_unused_code

Conversation

@QiJune
Copy link
Member

@QiJune QiJune commented Oct 30, 2017

Fix #5218
We should set GFLAGS using ParseCommandLineFlags interface

@QiJune QiJune requested review from gangliao and reyoung October 30, 2017 18:19
wangkuiyi
wangkuiyi previously approved these changes Oct 30, 2017
Copy link
Member

@jacquesqiao jacquesqiao left a comment

Choose a reason for hiding this comment

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

LGTM!

@QiJune QiJune merged commit afd1e84 into PaddlePaddle:develop Oct 31, 2017

GpuMemoryUsage(available, total);

if (IsEnvVarDefined(kEnvFractionGpuMemoryToUse)) {
Copy link
Collaborator

@wangkuiyi wangkuiyi Jan 30, 2018

Choose a reason for hiding this comment

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

I agree that we don't need platform/environment.{h,cc}, which looks too heavy. This segment of code could be

if (std::getenv(kEnvFractionGpuMemoryToUse)) {
  *FLAG_fraction_of_gpu_memory_to_use = std::strtod(std::getenv(kEnvFractionGpuMemoryToUse), nullptr);
  PADDLE_ENFORCE_GT(val, 0.0);		
  PADDLE_ENFORCE_LE(val, 1.0);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants