class_docstr: This is a medium test due to the moments computation taking some time.
class_docstr_tok: ["This","is","a","medium","test","due","to","the","moments","computation","taking","some","time","."]
code: def testCPUGPUMatch(self):
      for dt in dtypes.float16, dtypes.float32, dtypes.float64:
          results = {}
          for use_gpu in [False, True]:
              sampler = self._Sampler(
                  1000, 0.0, 1.0, dt, use_gpu=use_gpu, seed=12345
              )
              results[use_gpu] = sampler()
          if dt == dtypes.float16:
              self.assertAllClose(
                  results[False], results[True], rtol=1e-3, atol=1e-3
              )
          else:
              self.assertAllClose(
                  results[False], results[True], rtol=1e-6, atol=1e-6
              )
  
imports: import numpy
  from tensorflow.python.eager import context
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import errors
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import random_seed
  from tensorflow.python.framework import test_util
  from tensorflow.python.kernel_tests.random import util
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import random_ops
  from tensorflow.python.platform import test
  from tensorflow.python.platform import tf_logging
label_desc: Use image node_id 12 for calling the RandomGammaTest obj's underlying member method code with example usage: obj.testCPUGPUMatch() without return types