tensorflow/compiler/mlir/tfrt/jit/transforms/tf_cpurt_codegen_reduction.cc
// Match 2D row reduction. This is a starting point, we will relax this
// condition further down the road, when we add support for more reduction
// types.
Match 2D row reduction. This is a starting point, we will relax this
condition further down the road, when we add support for more reduction
types.
Match 2D row reduction . This is a starting point we will relax this condition further down the road when we add support for more reduction types .
bool is2DRowOrColumnReduction(Operation *op) {
  auto reduction = dyn_cast<GenericOp>(op);
  if (!reduction) return false;
  if (reduction.getNumOutputs() != 1 || reduction.getNumLoops() != 2)
    return false;
  return reduction.getNumReductionLoops() == 1;
}
bool is2DRowOrColumnReduction ( Operation * op ) { auto reduction = dyn_cast < GenericOp > ( op ) ; if ( ! reduction ) return false ; if ( reduction . getNumOutputs ( ) != 1 || reduction . getNumLoops ( ) != 2 ) return false ; return reduction . getNumReductionLoops ( ) == 1 ; }
Match 2D row reduction.
Match 2D row reduction .