Updated build_tests to support different random generators

All generator functions now take RNG argument to allow different
random number generators, rather than relying on global RNG
Default behaviour is the same as before using global RNG
Added stable random generation mode
* shape rng based on operator, rank and datatype
* arguments rng based on operator, shape and datatype
* build operands and data rng based on op, shape, datatype and args
Add optional stable RNG test generation to conformance_generator

Signed-off-by: Jeremy Johnson <jeremy.johnson@arm.com>
Change-Id: I5ee4ff85575a81177fd74ed1617e946bfa3a0769
diff --git a/verif/generator/tosa_verif_build_tests.py b/verif/generator/tosa_verif_build_tests.py
index 47c351a..83c06d7 100644
--- a/verif/generator/tosa_verif_build_tests.py
+++ b/verif/generator/tosa_verif_build_tests.py
@@ -80,6 +80,13 @@
         help="Random seed for test generation",
     )
 
+    parser.add_argument(
+        "--stable-random-generation",
+        dest="stable_rng",
+        action="store_true",
+        help="Produces less variation (when the test-generator changes) in the test output using the same options",
+    )
+
     filter_group.add_argument(
         "--filter",
         dest="filter",
@@ -395,7 +402,7 @@
         else:
             # Use the random number generator to shuffle the test list
             # and select the per op tests from it
-            tests = testList.select(ttg.rng)
+            tests = testList.select(ttg.global_rng)
 
         if args.list_tests:
             for test in tests: