docstr: Tests that a CPU RNG can split into RNGs on GPU.
code: def testCrossDeviceSplit(self, alg):
      """Tests that a CPU RNG can split into RNGs on GPU."""
      with ops.device("/device:CPU:0"):
          gen = random.Generator.from_seed(
              1234, alg=alg
          )  # gen is on CPU
          self.assertRegex("CPU", gen.state.device)
      if alg == random_ops_util.Algorithm.THREEFRY:
          # We don't have CPU/GPU kernels for ThreeFry yet.
          return
      with ops.device(test_util.gpu_device_name()):
          gens = gen.split(count=10)  # gens are on GPU
          self.assertRegex("GPU", gens[0].state.device)
  
imports: import os
  import re
  from absl.testing import parameterized
  import numpy
  from tensorflow.python.checkpoint import checkpoint
  from tensorflow.python.eager import context
  from tensorflow.python.eager import def_function
  from tensorflow.python.framework import config
  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 test_util
  from tensorflow.python.kernel_tests.random import util
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import gen_random_ops
  from tensorflow.python.ops import gen_stateful_random_ops
  from tensorflow.python.ops import logging_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 test
label_desc: Use image node_id 7 for calling the StatefulRandomOpsTest obj's underlying member method code with example usage: obj.testCrossDeviceSplit(alg) without return types