tensorflow/compiler/mlir/tensorflow/analysis/side_effect_analysis.cc
// Returns an XlaResourceOpInfo (or nullptr if it does not exist) that specifies
// the resource access type of the op. It tells whether the op is read only,
// etc.
//
// TODO(yuanzx): Define this information in a different place. Currently we use
// tensorflow/compiler/tf2xla/resource_operation_table.h.
Returns an XlaResourceOpInfo (or nullptr if it does not exist) that specifies
the resource access type of the op. It tells whether the op is read only,
etc.

Define this information in a different place.
Returns an XlaResourceOpInfo ( or nullptr if it does not exist ) that specifies the resource access type of the op . It tells whether the op is read only etc . Define this information in a different place .
const tensorflow::XlaResourceOpInfo* GetResourceInfoForOp(Operation* op) {
  auto op_name = op->getName().getStringRef().str();
  if (op->getName().getDialect() !=
      TF::TensorFlowDialect::getDialectNamespace()) {
    return nullptr;
  }
  return tensorflow::GetResourceOpInfoForOp(
      op->getName().getStringRef().split('.').second.str());
}
const tensorflow :: XlaResourceOpInfo * GetResourceInfoForOp ( Operation * op ) { auto op_name = op -> getName ( ) . getStringRef ( ) . str ( ) ; if ( op -> getName ( ) . getDialect ( ) != TF :: TensorFlowDialect :: getDialectNamespace ( ) ) { return nullptr ; } return tensorflow :: GetResourceOpInfoForOp ( op -> getName ( ) . getStringRef ( ) . split ( ' ' ) . second . str ( ) ) ; }
Returns an XlaResourceOpInfo (or nullptr if it does not exist) that specifies
the resource access type of the op.
Returns an XlaResourceOpInfo ( or nullptr if it does not exist ) that specifies the resource access type of the op .