code: def test_threefry_split(target, dev):
      # test that results of split do not equal eachother or the input
      gen = tvm.relay.random.threefry_key(0).data.numpy()
      a, b = threefry_split(target, dev, gen)
      assert (a != b).any() and (
          a != gen
      ).any(), "Splitting a gen should result in different output gens"
      # unittest some split inputs
      assert (
          a
          == np.array(
              [0, 0, 0, 0, 0, 0, 0, 0, 1 << 62, 0], dtype="uint64"
          )
      ).all()
      assert (
          b
          == np.array(
              [0, 0, 0, 0, 1 << 63, 0, 0, 0, 1 << 62, 0], dtype="uint64"
          )
      ).all()
  
      # test enough splits to go over path length
      for i in range(129):
          a, b = threefry_split(target, dev, b)
      assert (
          a[0:4] == b[0:4]
      ).all(), "State part of split should be the same"
      assert (b[0:4] != np.zeros(4, dtype="uint64")).any()
  
      # check that split then generate does not generate the same for both sides
      a, a_rands = threefry_generate(target, dev, a, (100,))
      b, b_rands = threefry_generate(target, dev, b, (100,))
      assert (
          a_rands != b_rands
      ).all(), "Numbers generated from different initial states should be different"
  
      # check repeatability
      _, rands1 = threefry_generate(target, dev, a, (100,))
      _, rands2 = threefry_generate(target, dev, a, (100,))
      assert (
          rands1 == rands2
      ).all(), "Numbers generated from the same initial state should be the same"
  
      a1, b1 = threefry_split(target, dev, a)
      a2, b2 = threefry_split(target, dev, a)
      assert (a1 == a2).all() and (
          b1 == b2
      ).all(), (
          "Split called on the same input should return the same result"
      )
  
file_path: tvm/tests/python/topi/test_topi_prng.py
imports: import tvm
  import tvm.relay
  import tvm.testing
  import tvm.topi
  import numpy
  import scipy.stats
label_desc: Use image node_id 5 for calling a global function with example usage: test_threefry_split(target, dev) without return types