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

Function ReductionOp

tensorflow/core/kernels/collective_nccl_reducer.cc:27–38  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25
26namespace {
27Status ReductionOp(const string& merge_op, ncclRedOp_t* reduction_op) {
28 if (merge_op == "Add") {
29 *reduction_op = ncclSum;
30 return Status::OK();
31 } else if (merge_op == "Mul") {
32 *reduction_op = ncclProd;
33 return Status::OK();
34 } else {
35 return errors::Internal("Expected merge_op to be either Add or Mul, found ",
36 merge_op);
37 }
38}
39} // namespace
40
41void NcclReducer::Run(StatusCallback done) {

Callers 1

RunMethod · 0.70

Calls 1

InternalFunction · 0.85

Tested by

no test coverage detected