tensorflow/compiler/mlir/tensorflow/ir/tf_ops_tensor_helper.cc
// Returns the RankedTensorType for the given operand. TensorFlow constant ops
// may have non-static shape because the shape is not propagated during constant
// folding. If the defining op for the given operand is a constant op, this
// routine uses the constant op's attribute to get the actual shape.
Returns the RankedTensorType for the given operand. TensorFlow constant ops
may have non-static shape because the shape is not propagated during constant
folding. If the defining op for the given operand is a constant op, this
routine uses the constant op's attribute to get the actual shape.
Returns the RankedTensorType for the given operand . TensorFlow constant ops may have non - static shape because the shape is not propagated during constant folding . If the defining op for the given operand is a constant op this routine uses the constant op ' s attribute to get the actual shape .
RankedTensorType GetRankedTensorTypeForOperand(Value operand) {
  DenseElementsAttr attr;
  if (matchPattern(operand, m_Constant(&attr))) {
    return attr.getType().dyn_cast<RankedTensorType>();
  }
  return operand.getType().dyn_cast<RankedTensorType>();
}
RankedTensorType GetRankedTensorTypeForOperand ( Value operand ) { DenseElementsAttr attr ; if ( matchPattern ( operand , m_Constant ( & attr ) ) ) { return attr . getType ( ) . dyn_cast < RankedTensorType > ( ) ; } return operand . getType ( ) . dyn_cast < RankedTensorType > ( ) ; }
Returns the RankedTensorType for the given operand.
Returns the RankedTensorType for the given operand .