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

Function ComputeBinOp

tensorflow/core/common_runtime/collective_util.cc:97–109  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

95}
96
97Status ComputeBinOp(OpKernelContext* op_ctx, OpKernelContext::Params* params,
98 Device* device, OpKernel* op, Tensor* output,
99 Tensor* input) {
100 // Prepare an OpKernelContext that is identical to that of the original Op
101 // (i.e. the collective), except for the input output sizes and identities and
102 // the Op itself.
103 // TODO(ayushd, tucker): Is it possible to cache and reuse these objects?
104 // They're mostly identical inside one device execution.
105 std::unique_ptr<SubContext> sub_ctx(
106 new SubContext(op_ctx, params, op, output, input));
107 device->Compute(op, sub_ctx->sub_ctx_.get());
108 return sub_ctx->sub_ctx_->status();
109}
110
111} // namespace collective_util
112} // namespace tensorflow

Callers 2

RunAsyncPartsMethod · 0.85
RunMethod · 0.85

Calls 3

ComputeMethod · 0.45
getMethod · 0.45
statusMethod · 0.45

Tested by

no test coverage detected