class_docstr: Test d9m-unimplemented exceptions from the segment reduction ops.
  
  Test that tf.errors.UnimplementedError is thrown or not thrown, as
  appropriate, by the GPU code-paths for segment reduction ops when
  deterministic ops are enabled.
  
  This test assumes that the base op test runs all the same test cases when
  deterministic ops are not enabled and will therefore detect erroneous
  exception throwing in those cases.
class_docstr_tok: ["Test","d9m-unimplemented","exceptions","from","the","segment","reduction","ops",".","Test","that","tf.errors.UnimplementedError","is","thrown","or","not","thrown",",","as","appropriate",",","by","the","GPU","code-paths","for","segment","reduction","ops","when","deterministic","ops","are","enabled",".","This","test","assumes","that","the","base","op","test","runs","all","the","same","test","cases","when","deterministic","ops","are","not","enabled","and","will","therefore","detect","erroneous","exception","throwing","in","those","cases","."]
code: def testGatherBackprop(self):
      dtypes_to_test = [dtypes.float16, dtypes.float32, dtypes.float64]
      if not test.is_built_with_rocm():
          dtypes_to_test += [dtypes.complex64, dtypes.complex128]
      for data_type in dtypes_to_test:
          for segment_ids_type in [dtypes.int32, dtypes.int64]:
              with self.cached_session(force_gpu=True):
                  params, indices, _ = self._input(
                      data_type, segment_ids_type
                  )
                  params = variables.Variable(params)
                  with backprop.GradientTape() as tape:
                      tape.watch(params)
                      op_output = array_ops.gather(params, indices)
                  gradient = tape.gradient(op_output, params)
                  self.evaluate(params.assign(gradient))
  
file_path: tensorflow/tensorflow/python/kernel_tests/math_ops/segment_reduction_ops_d9m_test.py
imports: from tensorflow.python.eager import backprop
  from tensorflow.python.framework import config
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import indexed_slices
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import variables
  from tensorflow.python.platform import test
label_desc: Use image node_id 6 for calling the SegmentReductionDeterminismExceptionsTest obj's underlying member method code with example usage: obj.testGatherBackprop() without return types