Skip to content

Conversation

@Superjomn
Copy link
Contributor

No description provided.

@Superjomn Superjomn requested a review from panyx0718 June 1, 2018 03:25
// Create variables
// TODO(panyx0718): Why need to test share_variables here?
if (config_.share_variables) {
executor_->CreateVariables(*inference_program_, scope_.get(), 0);
Copy link
Contributor

Choose a reason for hiding this comment

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

why is this deleted?

&feed_targets,
&fetch_targets,
!config_.share_variables);
true /*create_variable*/);
Copy link
Contributor

Choose a reason for hiding this comment

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

if share_variable is true, this should be false by default?

// API.
// TODO(Superjomn) this should be modified when `Clone` is valid for
// multi-thread application.
executor_->CreateVariables(*inference_program_, scope_.get(), 0);
Copy link
Contributor Author

@Superjomn Superjomn Jun 1, 2018

Choose a reason for hiding this comment

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

I've restored the CreateVariable here. @panyx0718

int device;
float fraction_of_gpu_memory;
int device{0};
float fraction_of_gpu_memory{-1.f}; // Negative to notify initialization.
Copy link
Contributor

Choose a reason for hiding this comment

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

I suggest the default one to be a workable value.

@Superjomn Superjomn merged commit 18d6402 into PaddlePaddle:develop Jun 1, 2018
@Superjomn Superjomn deleted the feature/inference_api_simplify branch June 1, 2018 07:38
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