message: Disable collective ops for MS.
diff: @@ -304,7 +304,7 @@ class MirroredExtended(distribute_lib.StrategyExtendedV1):
  # If this is set to True, use NCCL collective ops instead of NCCL cross device
  # ops.
  - _prefer_collective_ops = True
  + _prefer_collective_ops = False
  def __init__(self, container_strategy, devices=None, cross_device_ops=None):
  super(MirroredExtended, self).__init__(container_strategy)
  @@ -327,8 +327,12 @@ class MirroredExtended(distribute_lib.StrategyExtendedV1):
  assert devices, ("Got an empty `devices` list and unable to recognize "
  "any local devices.")
  self._cross_device_ops = cross_device_ops
  + if self._prefer_collective_ops:
  self._communication_options = collective_util.Options(
  implementation=collective_util.CommunicationImplementation.NCCL)
  + else:
  + # TODO(wxinyi): is this missing?
  + self._communication_options = collective_util.Options()
  self._collective_ops_in_use = False
  self._collective_key_base = container_strategy._collective_key_base
  self._initialize_strategy(devices)
  @@ -349,10 +353,9 @@ class MirroredExtended(distribute_lib.StrategyExtendedV1):
  "No duplicates allowed in `devices` argument: %s" % (devices,))
  if _is_device_list_single_worker(devices):
  self._initialize_single_worker(devices)
  - if self._prefer_collective_ops and isinstance(
  - self._cross_device_ops,
  - cross_device_ops_lib.NcclAllReduce) or isinstance(
  - self._inferred_cross_device_ops,
  + if self._prefer_collective_ops and (
  + isinstance(self._cross_device_ops, cross_device_ops_lib.NcclAllReduce)
  + or isinstance(self._inferred_cross_device_ops),
  cross_device_ops_lib.NcclAllReduce):
  self._use_collective_ops(devices)
  self._inferred_cross_device_ops = None
  @@ -692,15 +695,16 @@ class MirroredExtended(distribute_lib.StrategyExtendedV1):
  return updated_config
  def _get_cross_device_ops(self, value):
  + if self._collective_ops_in_use:
  if isinstance(value, values.DistributedValues):
  value_int32 = True in {
  dtypes.as_dtype(v.dtype) == dtypes.int32 for v in value.values
  }
  else:
  value_int32 = dtypes.as_dtype(value.dtype) == dtypes.int32
  - if self._collective_ops_in_use and value_int32:
  + if value_int32:
  return cross_device_ops_lib.ReductionToOneDevice()
  - else:
  +
  return self._cross_device_ops or self._inferred_cross_device_ops
  def _gather_to_implementation(self, value, destinations, axis, options):
  