tensorflow/compiler/mlir/tensorflow/transforms/replica_id_to_device_ordinal.cc
// Returns whether op requires `device_ordinal` attribute.
Returns whether op requires `device_ordinal` attribute.
Returns whether op requires ` device_ordinal ` attribute .
bool RequiresDeviceOrdinalAttribute(Operation* op) {
  return (llvm::isa<TF::EnqueueTPUEmbeddingSparseTensorBatchOp,
                    TF::EnqueueTPUEmbeddingRaggedTensorBatchOp,
                    TF::EnqueueTPUEmbeddingArbitraryTensorBatchOp>(op) &&
          op->hasAttr(kDeviceOrdinalAttr) && op->hasAttr(kReplicaIdAttr));
}
bool RequiresDeviceOrdinalAttribute ( Operation * op ) { return ( llvm :: isa < TF :: EnqueueTPUEmbeddingSparseTensorBatchOp , TF :: EnqueueTPUEmbeddingRaggedTensorBatchOp , TF :: EnqueueTPUEmbeddingArbitraryTensorBatchOp > ( op ) && op -> hasAttr ( kDeviceOrdinalAttr ) && op -> hasAttr ( kReplicaIdAttr ) ) ; }
Returns whether op requires `device_ordinal` attribute.
Returns whether op requires ` device_ordinal ` attribute .