From 08a3762a14d9905f3eda19d96a10e69ea7e45121 Mon Sep 17 00:00:00 2001 From: "Bobby R. Bruce" Date: Fri, 28 Jul 2023 10:02:04 -0700 Subject: [PATCH] gpu-compute: Add warn for `random_seed == 0` case Addresses: https://github.com/gem5/gem5/pull/140#pullrequestreview-1552383650 Change-Id: Ia09a2bc74f35d3d6cb066efaf9d113db6caf4557 --- src/cpu/testers/gpu_ruby_test/protocol_tester.cc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/cpu/testers/gpu_ruby_test/protocol_tester.cc b/src/cpu/testers/gpu_ruby_test/protocol_tester.cc index fdf30304f1..6b3f9e19f1 100644 --- a/src/cpu/testers/gpu_ruby_test/protocol_tester.cc +++ b/src/cpu/testers/gpu_ruby_test/protocol_tester.cc @@ -146,6 +146,15 @@ ProtocolTester::ProtocolTester(const Params &p) // This ensures a reproducable. if (p.random_seed != 0) { random_mt.init(p.random_seed); + } else { + warn( + "If `random_seed == 0` (or `random_seed` is unset) " + "ProtocolTester does not seed the RNG. This will NOT result in " + "the RNG generating different results each run. In this case the " + "RNG is seeded by a default value. This differs from behavior in " + "previous versions of gem5. Setting `random_seed` to a non-zero " + "value is strongly recommended." + ); } actionCount = 0;