message: Getting rid of the cpu:0 binding during IteratorV2 creation.
diff: @@ -61,6 +61,8 @@ GLOBAL_ITERATORS = "iterators"
  def _device_stack_is_empty():
  + if context.executing_eagerly():
  + return context.context().device_name is None
  # pylint: disable=protected-access
  device_stack = ops.get_default_graph()._device_functions_outer_to_inner
  # pylint: enable=protected-access
  @@ -559,7 +561,14 @@ class IteratorV2(trackable.Trackable):
  """
  self._device = context.context().device_name
  + if (_device_stack_is_empty() or
  + context.context().device_spec.device_type != "CPU"):
  with ops.device("/cpu:0"):
  + self._create_iterator(dataset)
  + else:
  + self._create_iterator(dataset)
  +
  + def _create_iterator(self, dataset):
  # pylint: disable=protected-access
  dataset = dataset._apply_options()
  ds_variant = dataset._variant_tensor
  @@ -577,7 +586,6 @@ class IteratorV2(trackable.Trackable):
  handle=self._iterator_resource,
  device=self._device,
  deleter=self._deleter)
  - # pylint: enable=protected-access
  def __iter__(self):
  return self
  