Allocate the second output tensor that will contain the OneDNN shape serialized
| 745 | // Allocate the second output tensor that will contain |
| 746 | // the OneDNN shape serialized |
| 747 | inline void AllocateOutputSetMklShape(OpKernelContext* ctext, int n, |
| 748 | const MklDnnShape& mkl_shape) { |
| 749 | Tensor* second_tensor = nullptr; |
| 750 | TensorShape second_shape; |
| 751 | second_shape.AddDim(mkl_shape.GetSerializeBufferSize()); |
| 752 | OP_REQUIRES_OK(ctext, ctext->allocate_output( |
| 753 | GetTensorMetaDataIndex(n, ctext->num_outputs()), |
| 754 | second_shape, &second_tensor)); |
| 755 | mkl_shape.SerializeMklDnnShape( |
| 756 | second_tensor->flat<uint8>().data(), |
| 757 | second_tensor->flat<uint8>().size() * sizeof(uint8)); |
| 758 | } |
| 759 | |
| 760 | // Allocate the output tensor, create a second output tensor that will contain |
| 761 | // the OneDNN shape serialized |
no test coverage detected