MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / AllocateOutputSetMklShape

Function AllocateOutputSetMklShape

tensorflow/core/util/mkl_util.h:747–758  ·  view source on GitHub ↗

Allocate the second output tensor that will contain the OneDNN shape serialized

Source from the content-addressed store, hash-verified

745// Allocate the second output tensor that will contain
746// the OneDNN shape serialized
747inline 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

Callers 15

ComputeMethod · 0.85
AllocateOutputTensorMethod · 0.85
MklDefaultToEigenMethod · 0.85
AllocateOutputTensorMethod · 0.85
MklDefaultToEigenMethod · 0.85
ComputeMethod · 0.85
AllocateOutputTensorMethod · 0.85
AllocateOutputTensorMethod · 0.85
AllocateOutputTensorMethod · 0.85

Calls 9

GetTensorMetaDataIndexFunction · 0.85
GetTensorDataIndexFunction · 0.85
allocate_outputMethod · 0.80
SerializeMklDnnShapeMethod · 0.80
AddDimMethod · 0.45
num_outputsMethod · 0.45
dataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected