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 Python Helper Function to Get Block Inputs/Outputs #34121

Merged
merged 3 commits into from
Jul 14, 2021

Conversation

zhhsplendid
Copy link
Member

PR types

New features

PR changes

APIs

Describe

As the title, add Python helper function to get block Inputs/Outputs. This function is helpful to distributed computing for sharding.

@@ -429,3 +429,31 @@ def try_get_constant_shape_from_tensor(shape_tensor):
return None

return None


def get_inputs_outputs_in_block(block, program):
Copy link
Contributor

Choose a reason for hiding this comment

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

The parameter program not use?

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks, deleted

Copy link
Contributor

@Aurelius84 Aurelius84 left a comment

Choose a reason for hiding this comment

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

LGTM

@zhhsplendid zhhsplendid merged commit 7f26453 into PaddlePaddle:develop Jul 14, 2021
@zhhsplendid zhhsplendid deleted the block_in_out branch July 15, 2021 04:10
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