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

Method Compute

tensorflow/core/kernels/function_ops.cc:44–54  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

42}
43
44void ArgOp::Compute(OpKernelContext* ctx) {
45 auto frame = ctx->call_frame();
46 OP_REQUIRES(ctx, frame != nullptr, errors::Internal("no call frame"));
47 Tensor val;
48 OP_REQUIRES_OK(ctx, frame->GetArg(index_, &val));
49 OP_REQUIRES(ctx, val.dtype() == dtype_,
50 errors::InvalidArgument("Type mismatch: actual ",
51 DataTypeString(val.dtype()),
52 " vs. expect ", DataTypeString(dtype_)));
53 ctx->set_output(0, val);
54}
55
56RetvalOp::RetvalOp(OpKernelConstruction* ctx) : OpKernel(ctx) {
57 OP_REQUIRES_OK(ctx, ctx->GetAttr("T", &dtype_));

Callers

nothing calls this directly

Calls 9

InternalFunction · 0.85
InvalidArgumentFunction · 0.85
DataTypeStringFunction · 0.50
call_frameMethod · 0.45
GetArgMethod · 0.45
dtypeMethod · 0.45
set_outputMethod · 0.45
inputMethod · 0.45
SetRetvalMethod · 0.45

Tested by

no test coverage detected