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

Method Compute

tensorflow/core/common_runtime/function_testlib.cc:82–91  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

80 public:
81 explicit BlockingOp(OpKernelConstruction* ctx) : OpKernel(ctx) {}
82 void Compute(OpKernelContext* ctx) override {
83 blocking_op_state->MoveToState(0, 1);
84 blocking_op_state->AwaitState(2);
85 blocking_op_state->MoveToState(2, 3);
86
87 Tensor* out = nullptr;
88 const Tensor& in = ctx->input(0);
89 OP_REQUIRES_OK(ctx, ctx->allocate_output(0, in.shape(), &out));
90 out->flat<float>() = in.flat<float>();
91 }
92};
93REGISTER_KERNEL_BUILDER(Name("BlockingOp").Device(DEVICE_CPU), BlockingOp);
94REGISTER_OP("BlockingOp")

Callers

nothing calls this directly

Calls 5

MoveToStateMethod · 0.80
AwaitStateMethod · 0.80
allocate_outputMethod · 0.80
inputMethod · 0.45
shapeMethod · 0.45

Tested by

no test coverage detected