| 672 | } // namespace mgb |
| 673 | |
| 674 | void DctChannelSelectForward::get_output_var_shape( |
| 675 | const TensorShapeArray& inp_shape, TensorShapeArray& out_shape) const { |
| 676 | auto mo = megdnn_opr(); |
| 677 | TensorLayout dst; |
| 678 | dst.dtype = output(0)->dtype(); |
| 679 | if (inp_shape.size() == 1) { |
| 680 | mo->deduce_layout( |
| 681 | {inp_shape[0], input(0)->dtype(), input(0)->format()}, {}, {}, dst); |
| 682 | } else { |
| 683 | mgb_assert( |
| 684 | inp_shape.size() == 3, "no support input tensor num %zu", |
| 685 | inp_shape.size()); |
| 686 | mo->deduce_layout( |
| 687 | {inp_shape[0], input(0)->dtype(), input(0)->format()}, |
| 688 | {inp_shape[1], input(1)->dtype(), input(1)->format()}, |
| 689 | {inp_shape[2], input(2)->dtype(), input(2)->format()}, dst); |
| 690 | } |
| 691 | out_shape[0] = dst; |
| 692 | } |
| 693 | |
| 694 | size_t DctChannelSelectForward::get_workspace_size_bytes( |
| 695 | const TensorShapeArray& input_shapes, |
nothing calls this directly
no test coverage detected