|
@ -19,7 +19,7 @@ |
|
|
|
|
|
|
|
|
#include "BenchmarkHelpers.cpp"
|
|
|
#include "BenchmarkHelpers.cpp"
|
|
|
|
|
|
|
|
|
#define MODE_PREFETCH
|
|
|
|
|
|
|
|
|
#define MODE_HBM
|
|
|
|
|
|
|
|
|
////////////////////////////////
|
|
|
////////////////////////////////
|
|
|
/// BENCHMARK SETUP
|
|
|
/// BENCHMARK SETUP
|
|
@ -29,14 +29,14 @@ constexpr uint32_t WARMUP_ITERATION_COUNT = 5; |
|
|
constexpr uint32_t ITERATION_COUNT = 5; |
|
|
constexpr uint32_t ITERATION_COUNT = 5; |
|
|
|
|
|
|
|
|
#ifdef MODE_PREFETCH
|
|
|
#ifdef MODE_PREFETCH
|
|
|
constexpr size_t CHUNK_SIZE_B = 128_MiB; |
|
|
|
|
|
|
|
|
constexpr size_t CHUNK_SIZE_B = 256_MiB; |
|
|
constexpr uint32_t GROUP_COUNT = 4; |
|
|
constexpr uint32_t GROUP_COUNT = 4; |
|
|
constexpr uint32_t TC_SCANA = 4; |
|
|
constexpr uint32_t TC_SCANA = 4; |
|
|
constexpr uint32_t TC_SCANB = 1; |
|
|
constexpr uint32_t TC_SCANB = 1; |
|
|
constexpr uint32_t TC_AGGRJ = 2; |
|
|
|
|
|
|
|
|
constexpr uint32_t TC_AGGRJ = 4; |
|
|
constexpr bool PERFORM_CACHING = true; |
|
|
constexpr bool PERFORM_CACHING = true; |
|
|
constexpr bool DATA_IN_HBM = false; |
|
|
constexpr bool DATA_IN_HBM = false; |
|
|
constexpr char MODE_STRING[] = "Dram"; |
|
|
|
|
|
|
|
|
constexpr char MODE_STRING[] = "prefetch"; |
|
|
#endif
|
|
|
#endif
|
|
|
#ifdef MODE_DRAM
|
|
|
#ifdef MODE_DRAM
|
|
|
constexpr size_t CHUNK_SIZE_B = 2_MiB; |
|
|
constexpr size_t CHUNK_SIZE_B = 2_MiB; |
|
@ -46,7 +46,7 @@ constexpr uint32_t TC_SCANB = 0; |
|
|
constexpr uint32_t TC_AGGRJ = 2; |
|
|
constexpr uint32_t TC_AGGRJ = 2; |
|
|
constexpr bool PERFORM_CACHING = false; |
|
|
constexpr bool PERFORM_CACHING = false; |
|
|
constexpr bool DATA_IN_HBM = false; |
|
|
constexpr bool DATA_IN_HBM = false; |
|
|
constexpr char MODE_STRING[] = "Prefetch"; |
|
|
|
|
|
|
|
|
constexpr char MODE_STRING[] = "dram"; |
|
|
#endif
|
|
|
#endif
|
|
|
#ifdef MODE_HBM
|
|
|
#ifdef MODE_HBM
|
|
|
constexpr size_t CHUNK_SIZE_B = 2_MiB; |
|
|
constexpr size_t CHUNK_SIZE_B = 2_MiB; |
|
@ -56,7 +56,7 @@ constexpr uint32_t TC_SCANB = 0; |
|
|
constexpr uint32_t TC_AGGRJ = 2; |
|
|
constexpr uint32_t TC_AGGRJ = 2; |
|
|
constexpr bool PERFORM_CACHING = false; |
|
|
constexpr bool PERFORM_CACHING = false; |
|
|
constexpr bool DATA_IN_HBM = true; |
|
|
constexpr bool DATA_IN_HBM = true; |
|
|
constexpr char MODE_STRING[] = "Hbm"; |
|
|
|
|
|
|
|
|
constexpr char MODE_STRING[] = "hbm"; |
|
|
#endif
|
|
|
#endif
|
|
|
|
|
|
|
|
|
/// DO NOT CONFIGURE BEYOND THIS
|
|
|
/// DO NOT CONFIGURE BEYOND THIS
|
|
@ -216,7 +216,7 @@ int main() { |
|
|
const auto time_end = std::chrono::steady_clock::now(); |
|
|
const auto time_end = std::chrono::steady_clock::now(); |
|
|
|
|
|
|
|
|
if (i >= WARMUP_ITERATION_COUNT) { |
|
|
if (i >= WARMUP_ITERATION_COUNT) { |
|
|
fout << i << ";" << std::chrono::duration_cast<std::chrono::nanoseconds>(time_end - time_start).count() << ";" << std::hex << DATA_DST_[0] << std::dec << ";" << std::endl; |
|
|
|
|
|
|
|
|
fout << i - WARMUP_ITERATION_COUNT << ";" << std::chrono::duration_cast<std::chrono::nanoseconds>(time_end - time_start).count() << ";" << std::hex << DATA_DST_[0] << std::dec << ";" << std::endl; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
for (std::barrier<NopStruct>* b : BARRIERS_) { |
|
|
for (std::barrier<NopStruct>* b : BARRIERS_) { |
|
|