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 unittest, backward of array read/write op #5409

Merged
merged 14 commits into from
Nov 7, 2017

Conversation

reyoung
Copy link
Collaborator

@reyoung reyoung commented Nov 6, 2017

No description provided.

@reyoung reyoung changed the title Feature/sum of array Add unittest, backward of array read/write op Nov 6, 2017
@@ -388,6 +391,20 @@ class RuntimeInferShapeContext : public InferShapeContext {
}
}

VarDesc::VarType GetVarType(const std::string& name) const override {
Variable* var = scope_.FindVar(name);
if (var->IsType<LoDTensor>()) {

Choose a reason for hiding this comment

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

this logic should be under Variable, something like return var->GetType().

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done.

}
}
}
PADDLE_THROW("Unexpected branch");

Choose a reason for hiding this comment

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

More helpful message, something like "Unexpected Type %s", x_vars[0]->GetType()

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done.

}
}
} else {
PADDLE_THROW("Unexpected branch");

Choose a reason for hiding this comment

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

More helpful message, something like "Unexpected Type %s", out_var->GetType()

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done

Copy link

@tonyyang-svail tonyyang-svail left a comment

Choose a reason for hiding this comment

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

LGTM

@reyoung reyoung merged commit 6cde889 into PaddlePaddle:develop Nov 7, 2017
@reyoung reyoung deleted the feature/sum_of_array branch December 26, 2017 09:31
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