gpu-compute, tests: Fix GPU_X86 compilation, add compiler tests (#64)
* gpu-compute: Remove use of 'std::random_shuffle' This was deprecated in C++14 and removed in C++17. This has been replaced with std::random. This has been implemented to ensure reproducible results despite (pseudo)random behavior. Change-Id: Idd52bc997547c7f8c1be88f6130adff8a37b4116 * dev-amdgpu: Add missing 'overrides' This causes warnings/errors in some compilers. Change-Id: I36a3548943c030d2578c2f581c8985c12eaeb0ae * dev: Fix Linux specific includes to be portable This allows for compilation in non-linux systems (e.g., Mac OS). Change-Id: Ib6c9406baf42db8caaad335ebc670c1905584ea2 * tests: Add 'VEGA_X86' build target to compiler-tests.sh Change-Id: Icbf1d60a096b1791a4718a7edf17466f854b6ae5 * tests: Add 'GCN3_X86' build target to compiler-tests.sh Change-Id: Ie7c9c20bb090f8688e48c8619667312196a7c123
This commit is contained in:
@@ -32,6 +32,8 @@
|
||||
#include "cpu/testers/gpu_ruby_test/address_manager.hh"
|
||||
|
||||
#include <algorithm>
|
||||
#include <climits>
|
||||
#include <random>
|
||||
|
||||
#include "base/intmath.hh"
|
||||
#include "base/logging.hh"
|
||||
@@ -58,8 +60,13 @@ AddressManager::AddressManager(int n_atomic_locs, int n_normal_locs_per_atomic)
|
||||
randAddressMap[i] = (Addr)((i + 128) << floorLog2(sizeof(Value)));
|
||||
}
|
||||
|
||||
// randomly shuffle randAddressMap
|
||||
std::random_shuffle(randAddressMap.begin(), randAddressMap.end());
|
||||
// randomly shuffle randAddressMap. The seed is determined by the random_mt
|
||||
// gem5 rng. This allows for deterministic randomization.
|
||||
std::shuffle(
|
||||
randAddressMap.begin(),
|
||||
randAddressMap.end(),
|
||||
std::default_random_engine(random_mt.random<unsigned>(0,UINT_MAX))
|
||||
);
|
||||
|
||||
// initialize atomic locations
|
||||
// first and last normal location per atomic location
|
||||
|
||||
Reference in New Issue
Block a user