class_docstr: Test cases for stateful random-number generator operators.
class_docstr_tok: ["Test","cases","for","stateful","random-number","generator","operators","."]
docstr: Tests Philox4x32 conforms to known results.
      
docstr_tok: ["Tests","Philox4x32","conforms","to","known","results","."]
code: def testPhilox4x32(self):
      """Tests Philox4x32 conforms to known results."""
      # Based on
      # https://github.com/DEShawResearch/Random123-Boost/blob/65e3d874b67aa7b3e02d5ad8306462f52d2079c0/libs/random/test/test_philox.cpp#L50-L52
  
      with ops.device(xla_device_name()):
          g = random.Generator.from_seed(
              seed=0, alg=random.RNG_ALG_PHILOX
          )
          self._compareToKnownOutputs(
              g,
              [0x00000000, 0x00000000, 0x00000000, 0x00000000],
              [0x00000000, 0x00000000],
              [0x6627E8D5, 0xE169C58D, 0xBC57AC4C, 0x9B00DBD8],
          )
          self._compareToKnownOutputs(
              g,
              [0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF],
              [0xFFFFFFFF, 0xFFFFFFFF],
              [0x408F276D, 0x41C83B0E, 0xA20BC7C6, 0x6D5451FD],
          )
          self._compareToKnownOutputs(
              g,
              [0x243F6A88, 0x85A308D3, 0x13198A2E, 0x03707344],
              [0xA4093822, 0x299F31D0],
              [0xD16CFE09, 0x94FDCCEB, 0x5001E420, 0x24126EA1],
          )
  
imports: import itertools
  import os
  from absl.testing import parameterized
  import numpy
  from tensorflow.compiler.tests import xla_test
  from tensorflow.python.client import device_lib
  from tensorflow.python.eager import def_function
  from tensorflow.python.framework import config
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import errors_impl
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import test_util
  from tensorflow.python.kernel_tests.random import util
  from tensorflow.python.ops import gen_stateful_random_ops
  from tensorflow.python.ops import random_ops_util
  from tensorflow.python.ops import stateful_random_ops
  from tensorflow.python.ops import variables
  from tensorflow.python.platform import flags
  from tensorflow.python.platform import test
label_desc: Use image node_id 5 for calling the StatefulRandomOpsTest obj's underlying member method code with example usage: obj.testPhilox4x32() without return types