Skip to content
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

remove unused code #5219

Merged
merged 3 commits into from
Oct 31, 2017
Merged

remove unused code #5219

merged 3 commits into from
Oct 31, 2017

Conversation

QiJune
Copy link
Member

@QiJune QiJune commented Oct 30, 2017

Fix #5218
We should set GFLAGS using ParseCommandLineFlags interface

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
@@ -75,13 +74,6 @@ size_t GpuMaxChunkSize() {

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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants