gpu-compute: Add warn for random_seed == 0 case

Addresses:
https://github.com/gem5/gem5/pull/140#pullrequestreview-1552383650

Change-Id: Ia09a2bc74f35d3d6cb066efaf9d113db6caf4557
This commit is contained in:
Bobby R. Bruce
2023-07-28 10:02:04 -07:00
parent 48ac1ea38d
commit 08a3762a14

View File

@@ -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;