message: Do not constrain the is_variable_initialized ops to be on cpu.
diff: @@ -1723,6 +1723,8 @@ def report_uninitialized_variables(var_list=None,
  var_list.append(op.outputs[0])
  with ops.name_scope(name):
  # Run all operations on CPU
  + if var_list:
  + init_vars = [state_ops.is_variable_initialized(v) for v in var_list]
  with ops.device("/cpu:0"):
  if not var_list:
  # Return an empty tensor so we only need to check for returned tensor
  @@ -1730,9 +1732,7 @@ def report_uninitialized_variables(var_list=None,
  return array_ops.constant([], dtype=dtypes.string)
  else:
  # Get a 1-D boolean tensor listing whether each variable is initialized.
  - variables_mask = math_ops.logical_not(
  - array_ops.stack(
  - [state_ops.is_variable_initialized(v) for v in var_list]))
  + variables_mask = math_ops.logical_not(array_ops.stack(init_vars))
  # Get a 1-D string tensor containing all the variable names.
  variable_names_tensor = array_ops.constant(
  [s.op.name for s in var_list])
  