message: Support more unary ops.
diff: @@ -72,19 +72,26 @@ std::set<string> GetOpsFormatSupported() {
  // TODO(yaozhang): enable SumProcessor with auto-tuning. Currently disabled
  // because of the worse performance in some cases.
  std::set<string> GetOpsFormatAgnostic() {
  - std::set<string> ops_format_agnostic = {"Add",
  + std::set<string> ops_format_agnostic = {"Abs",
  + "Add",
  "AddN",
  "Acos",
  "Acosh",
  + "Angle",
  "Asin",
  "Asinh",
  "Atan",
  "Atanh",
  + "Bitcast",
  + "Cast",
  "Ceil",
  + "CheckNumerics",
  "Cos",
  "Cosh",
  + "ComplexAbs",
  "Concat",
  "ConcatV2",
  + "Conj",
  "Digamma",
  "Elu",
  "EluGrad",
  @@ -93,7 +100,9 @@ std::set<string> GetOpsFormatAgnostic() {
  "Exp",
  "Expm1",
  "Floor",
  + "GuaranteeConst",
  "Identity",
  + "Imag",
  "Inv",
  "InvGrad",
  "IsFinite",
  @@ -105,7 +114,10 @@ std::set<string> GetOpsFormatAgnostic() {
  "Merge",
  "Mul",
  "Neg",
  + "OnesLike",
  "Pad",
  + "PreventGradient",
  + "Real",
  "RealDiv",
  "Reciprocal",
  "ReciprocalGrad",
  @@ -124,10 +136,12 @@ std::set<string> GetOpsFormatAgnostic() {
  "Sin",
  "Sinh",
  "Slice",
  + "Snapshot",
  "Softplus",
  "SoftplusGrad",
  "Split",
  "Switch",
  + "RefIdentity",
  "RefMerge",
  "RefSwitch",
  "Round",
  @@ -138,10 +152,12 @@ std::set<string> GetOpsFormatAgnostic() {
  "Square",
  "SquaredDifference",
  "Squeeze",
  + "StopGradient",
  /*"Sum",*/ "Sub",
  "Tan",
  "Tanh",
  - "TanhGrad"};
  + "TanhGrad",
  + "ZerosLike"};
  return ops_format_agnostic;
  }
  @@ -586,11 +602,21 @@ class NodeProcessor : public GraphProcessor {
  if (op == "Transpose") {
  added_node_name = AddPrefixToNodeName(added_node_base_name,
  kTransposeNCHWToNHWC, "-");
  + DataType dtype;
  + if (op == "Imag" || op == "Real" || op == "Angle" ||
  + op == "Conj" || op == "ComplexAbs") {
  + TF_RETURN_IF_ERROR(HasAttribute(*node_, "Tout"));
  + dtype = node_->attr().at("Tout").type();
  + } else if (op == "Bitcast") {
  + TF_RETURN_IF_ERROR(HasAttribute(*node_, "type"));
  + dtype = node_->attr().at("type").type();
  + } else {
  TF_RETURN_IF_ERROR(HasAttribute(*node_, "T"));
  + dtype = node_->attr().at("T").type();
  + }
  TF_RETURN_IF_ERROR(HasAttribute(*node_, "_output_shapes"));
  AddNodeTranspose(
  - added_node_name, input, const_name,
  - node_->attr().at("T").type(),
  + added_node_name, input, const_name, dtype,
  node_->attr().at("_output_shapes").list().shape(0), false);
  } else if (op == "DataFormatVecPermute") {
  added_node_name = AddPrefixToNodeName(added_node_base_name,
  