Skip to content

Commit

Permalink
[Phi] delete extra codes for mv
Browse files Browse the repository at this point in the history
  • Loading branch information
windstamp committed Mar 4, 2022
1 parent d20e52f commit 9f5e398
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 9 deletions.
4 changes: 0 additions & 4 deletions paddle/phi/infermeta/binary.cc
Original file line number Diff line number Diff line change
Expand Up @@ -444,10 +444,6 @@ void GatherTreeMeta(const MetaTensor& ids,
}

void MvInferMeta(const MetaTensor& x, const MetaTensor& vec, MetaTensor* out) {
// OP_INOUT_CHECK(context->HasInput("X"), "Input", "X", "mv");
// OP_INOUT_CHECK(context->HasInput("Vec"), "Input", "Vec", "mv");
// OP_INOUT_CHECK(context->HasOutput("Out"), "Output", "Out", "mv");

auto dim_x = x.dims();
auto dim_vec = vec.dims();
PADDLE_ENFORCE_EQ(
Expand Down
1 change: 1 addition & 0 deletions paddle/phi/infermeta/binary.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ void GatherNdInferMeta(const MetaTensor& x,
void GatherTreeMeta(const MetaTensor& ids,
const MetaTensor& parents,
MetaTensor* out);

void MvInferMeta(const MetaTensor& x, const MetaTensor& vec, MetaTensor* out);

} // namespace phi
5 changes: 0 additions & 5 deletions paddle/phi/ops/compat/mv_sig.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@

namespace phi {

KernelSignature MvOpArgumentMapping(const ArgumentMappingContext& ctx) {
return KernelSignature("mv", {"X", "Vec"}, {}, {"Out"});
}

KernelSignature MvGradOpArgumentMapping(const ArgumentMappingContext& ctx) {
return KernelSignature("mv_grad",
{"X", "Vec", GradVarName("Out")},
Expand All @@ -29,5 +25,4 @@ KernelSignature MvGradOpArgumentMapping(const ArgumentMappingContext& ctx) {

} // namespace phi

PD_REGISTER_ARG_MAPPING_FN(mv, phi::MvOpArgumentMapping);
PD_REGISTER_ARG_MAPPING_FN(mv_grad, phi::MvGradOpArgumentMapping);

0 comments on commit 9f5e398

Please sign in to comment.