tensorflow/python/framework/python_op_gen_main.cc
// Use the name of the current executable to infer the C++ source file
// where the REGISTER_OP() call for the operator can be found.
// Returns the name of the file.
// Returns an empty string if the current executable's name does not
// follow a known pattern.
Use the name of the current executable to infer the C++ source file
where the REGISTER_OP() call for the operator can be found.
Returns the name of the file.
Returns an empty string if the current executable's name does not
follow a known pattern.
Use the name of the current executable to infer the C ++ source file where the REGISTER_OP () call for the operator can be found . Returns the name of the file . Returns an empty string if the current executable ' s name does not follow a known pattern .
string InferSourceFileName(const char* argv_zero) {
  StringPiece command_str = io::Basename(argv_zero);
  const char* kExecPrefix = "gen_";
  const char* kExecSuffix = "_py_wrappers_cc";
  if (absl::ConsumePrefix(&command_str, kExecPrefix) &&
      str_util::EndsWith(command_str, kExecSuffix)) {
    command_str.remove_suffix(strlen(kExecSuffix));
    return strings::StrCat(command_str, ".cc");
  } else {
    return string("");
  }
}
string InferSourceFileName ( const char * argv_zero ) { StringPiece command_str = io :: Basename ( argv_zero ) ; const char * kExecPrefix = " " ; const char * kExecSuffix = " " ; if ( absl :: ConsumePrefix ( & command_str , kExecPrefix ) && str_util :: EndsWith ( command_str , kExecSuffix ) ) { command_str . remove_suffix ( strlen ( kExecSuffix ) ) ; return strings :: StrCat ( command_str , " " ) ; } else { return string ( " " ) ; } }
Use the name of the current executable to infer the C++ source file
where the REGISTER_OP() call for the operator can be found.
Use the name of the current executable to infer the C ++ source file where the REGISTER_OP () call for the operator can be found .
// For built-in ops, the Bazel build creates a separate executable // with the name gen_<op type>_ops_py_wrappers_cc containing the // operators defined in <op type>_ops.cc