tensorflow/python/framework/op_def_library_pybind.cc
// Returns the OpDef from the global registry. Raises runtime_error if the
// OpDef is not found.
Returns the OpDef from the global registry. Raises runtime_error if the
OpDef is not found.
Returns the OpDef from the global registry . Raises runtime_error if the OpDef is not found .
const OpDef* GetOpDef(const std::string& op_type_name, int producer_version) {
  const OpDef* op_def = nullptr;
  auto status = OpRegistry::Global()->LookUpOpDef(op_type_name, &op_def);
  if (!status.ok() || op_def == nullptr) {
    throw std::runtime_error(
        absl::StrCat("Unrecognized Op name ", op_type_name));
  }
  return op_def;
}
const OpDef * GetOpDef ( const std :: string & op_type_name , int producer_version ) { const OpDef * op_def = nullptr ; auto status = OpRegistry :: Global ( ) -> LookUpOpDef ( op_type_name , & op_def ) ; if ( ! status . ok ( ) || op_def == nullptr ) { throw std :: runtime_error ( absl :: StrCat ( " " , op_type_name ) ) ; } return op_def ; }
Returns the OpDef from the global registry.
Returns the OpDef from the global registry .