Skip to content

Commit

Permalink
[NPU] enhance unittest for shuffle_channel, unsqueeze, pool (#2730)
Browse files Browse the repository at this point in the history
* [NPU] enhance unittest for shuffle_channel, unsqueeze, pool

test=develop
  • Loading branch information
zhupengyang authored Jan 8, 2020
1 parent 8e7906d commit 08afd3a
Show file tree
Hide file tree
Showing 9 changed files with 457 additions and 592 deletions.
2 changes: 2 additions & 0 deletions lite/kernels/npu/bridges/paddle_use_bridges.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,5 @@ USE_SUBGRAPH_BRIDGE(sqrt, kNPU);
USE_SUBGRAPH_BRIDGE(square, kNPU);
USE_SUBGRAPH_BRIDGE(transpose, kNPU);
USE_SUBGRAPH_BRIDGE(transpose2, kNPU);
USE_SUBGRAPH_BRIDGE(unsqueeze, kNPU);
USE_SUBGRAPH_BRIDGE(unsqueeze2, kNPU);
252 changes: 0 additions & 252 deletions lite/kernels/npu/bridges/pool_op_test.cc

This file was deleted.

117 changes: 0 additions & 117 deletions lite/kernels/npu/bridges/shuffle_channel_op_test.cc

This file was deleted.

3 changes: 1 addition & 2 deletions lite/kernels/npu/bridges/unsqueeze_op.cc
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,12 @@ int UnsqueezeConverter(void* ctx, OpLite* op, KernelBase* kernel) {

auto x_name = op_info->Input("X").front();
auto x_type = kernel->GetInputDeclType("X");
CHECK(x_type->precision() == PRECISION(kFloat));
CHECK(x_type->layout() == DATALAYOUT(kNCHW));
auto x = scope->FindMutableTensor(x_name);
auto x_dims = x->dims();

auto out_name = op_info->Output("Out").front();
auto out_type = kernel->GetOutputDeclType("Out");
CHECK(out_type->precision() == PRECISION(kFloat));
CHECK(out_type->layout() == DATALAYOUT(kNCHW));
auto out_shape = scope->FindTensor(out_name)->dims().Vectorize();
CHECK(op_info->HasAttr("axes"))
Expand Down
Loading

0 comments on commit 08afd3a

Please sign in to comment.