tensorflow/compiler/mlir/tensorflow/translate/derived_attr_populator_gen.cc
// Emits TensorFlow derived attribute name collector function taking an
// Operation as argument.
Emits TensorFlow derived attribute name collector function taking an
Operation as argument.
Emits TensorFlow derived attribute name collector function taking an Operation as argument .
static void EmitInstAttrNameCollector(const std::vector<Operator> &ops,
                                      raw_ostream *ostream) {
  raw_ostream &os = *ostream;
  OUT(0) << "static void CollectDerivedAttrsName(mlir::Operation* op, "
            "llvm::SmallDenseSet<llvm::StringRef>* values) {\n";
  for (const auto &op : ops) {
    auto op_name = op.getCppClassName();
    OUT(2) << "if (auto tf_op = llvm::dyn_cast<mlir::TF::" << op_name
           << ">(op)) {\n";
    OUT(4) << "Collect" << op_name << "DerivedAttrsName(tf_op, values);\n";
    OUT(2) << "}\n";
  }
  OUT(2) << "return;\n";
  OUT(0) << "}\n\n";
}
static void EmitInstAttrNameCollector ( const std :: vector < Operator > & ops , raw_ostream * ostream ) { raw_ostream & os = * ostream ; OUT ( 0 ) << " " " \n " ; for ( const auto & op : ops ) { auto op_name = op . getCppClassName ( ) ; OUT ( 2 ) << " " << op_name << " \n " ; OUT ( 4 ) << " " << op_name << " \n " ; OUT ( 2 ) << " \n " ; } OUT ( 2 ) << " \n " ; OUT ( 0 ) << " \n \n " ; }
Emits TensorFlow derived attribute name collector function taking an
Operation as argument.
Emits TensorFlow derived attribute name collector function taking an Operation as argument .
// Emit function signature. // Emit conditional for the op and then call collect for the op on match.