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

Method Compute

tensorflow/core/kernels/mkl_identity_op.cc:37–47  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35 explicit MklIdentityOp(OpKernelConstruction* context) : OpKernel(context) {}
36
37 void Compute(OpKernelContext* context) override {
38 MklDnnShape dnn_shape_input;
39 const int kInputIdx = 0, kOutputIdx = 0;
40 GetMklShape(context, kInputIdx, &dnn_shape_input);
41
42 if (dnn_shape_input.IsMklTensor()) {
43 ForwardMklTensorInToOut(context, kInputIdx, kOutputIdx);
44 } else {
45 ForwardTfTensorInToOut(context, kInputIdx, kOutputIdx);
46 }
47 }
48
49 // TensorFlow's IdentityOp has the following member function, so kept it
50 // as it is.

Callers

nothing calls this directly

Calls 4

GetMklShapeFunction · 0.85
ForwardMklTensorInToOutFunction · 0.85
ForwardTfTensorInToOutFunction · 0.85
IsMklTensorMethod · 0.80

Tested by

no test coverage detected