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

add split ids op #9370

Merged
merged 6 commits into from
Mar 26, 2018
Merged

add split ids op #9370

merged 6 commits into from
Mar 26, 2018

Conversation

jacquesqiao
Copy link
Member

@jacquesqiao jacquesqiao commented Mar 26, 2018

project: #9211
fix: #9372

@jacquesqiao jacquesqiao mentioned this pull request Mar 26, 2018
15 tasks
Copy link
Contributor

@typhoonzero typhoonzero left a comment

Choose a reason for hiding this comment

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

Just one comment, all others LGTM


const size_t shard_num = outs.size();

std::vector<std::vector<T>> out_ids;
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe can remove this temp vector and push data directly to outs[i] to reduce one for loop.

Copy link
Member Author

@jacquesqiao jacquesqiao Mar 26, 2018

Choose a reason for hiding this comment

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

The problem is that we don't know the shape of outs[i], so we cannot call mutable_data to allocate memory for it. The first loop is used to get the shape of each outs.

Copy link
Contributor

Choose a reason for hiding this comment

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

True.

@typhoonzero
Copy link
Contributor

Don't know why build android on travis-ci stucks.

@jacquesqiao
Copy link
Member Author

@typhoonzero Ok, I will restart the CI.

Copy link
Contributor

@typhoonzero typhoonzero left a comment

Choose a reason for hiding this comment

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

LGTM!

@jacquesqiao jacquesqiao merged commit f3dc311 into PaddlePaddle:develop Mar 26, 2018
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.

add split_ids_op
2 participants