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

Function IdentityOp

tensorflow/c/eager/c_api_test_util.cc:149–160  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

147}
148
149TFE_Op* IdentityOp(TFE_Context* ctx, TFE_TensorHandle* a) {
150 TF_Status* status = TF_NewStatus();
151
152 TFE_Op* op = TFE_NewOp(ctx, "Identity", status);
153 CHECK_EQ(TF_OK, TF_GetCode(status)) << TF_Message(status);
154 TFE_OpAddInput(op, a, status);
155 CHECK_EQ(TF_OK, TF_GetCode(status)) << TF_Message(status);
156 TF_DeleteStatus(status);
157 TFE_OpSetAttrType(op, "T", TFE_TensorHandleDataType(a));
158
159 return op;
160}
161
162TFE_Op* ShapeOp(TFE_Context* ctx, TFE_TensorHandle* a) {
163 TF_Status* status = TF_NewStatus();

Callers 1

BM_Execute_IdentityFunction · 0.70

Calls 8

TF_NewStatusFunction · 0.85
TFE_NewOpFunction · 0.85
TF_GetCodeFunction · 0.85
TF_MessageFunction · 0.85
TFE_OpAddInputFunction · 0.85
TF_DeleteStatusFunction · 0.85
TFE_OpSetAttrTypeFunction · 0.85
TFE_TensorHandleDataTypeFunction · 0.85

Tested by

no test coverage detected