| 838 | } |
| 839 | |
| 840 | inline void CopyTfTensorInToOutWithShape(OpKernelContext* context, int idx_in, |
| 841 | int idx_out, |
| 842 | const TensorShape& shape) { |
| 843 | int num_inputs = context->num_inputs(); |
| 844 | int num_outputs = context->num_outputs(); |
| 845 | int idx_data_in = GetTensorDataIndex(idx_in, num_inputs); |
| 846 | int idx_data_out = GetTensorDataIndex(idx_out, num_outputs); |
| 847 | |
| 848 | const Tensor& data = context->input(idx_data_in); |
| 849 | MklDnnShape mkl_shape_output; |
| 850 | mkl_shape_output.SetMklTensor(false); |
| 851 | AllocateOutputSetMklShape(context, idx_out, mkl_shape_output); |
| 852 | Tensor output(data.dtype()); |
| 853 | // TODO(intel_tf): alternatively, call forward_input_to_output_with_shape(...) |
| 854 | CHECK(output.CopyFrom(data, shape)); |
| 855 | context->set_output(idx_data_out, output); |
| 856 | } |
| 857 | |
| 858 | inline void ForwardTfTensorInToOut(OpKernelContext* context, int idx_in, |
| 859 | int idx_out) { |
no test coverage detected