|
@ -19,21 +19,21 @@ |
|
|
|
|
|
|
|
|
#include "BenchmarkHelpers.cpp"
|
|
|
#include "BenchmarkHelpers.cpp"
|
|
|
|
|
|
|
|
|
#define MODE_HBM
|
|
|
|
|
|
|
|
|
#define MODE_PREFETCH
|
|
|
|
|
|
|
|
|
////////////////////////////////
|
|
|
////////////////////////////////
|
|
|
/// BENCHMARK SETUP
|
|
|
/// BENCHMARK SETUP
|
|
|
|
|
|
|
|
|
constexpr size_t WL_SIZE_B = 4_GiB; |
|
|
|
|
|
|
|
|
constexpr size_t WL_SIZE_B = 2_GiB; |
|
|
constexpr uint32_t WARMUP_ITERATION_COUNT = 5; |
|
|
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 = 256_MiB; |
|
|
|
|
|
constexpr uint32_t GROUP_COUNT = 4; |
|
|
|
|
|
constexpr uint32_t TC_SCANA = 4; |
|
|
|
|
|
|
|
|
constexpr size_t CHUNK_SIZE_B = 128_MiB; |
|
|
|
|
|
constexpr uint32_t GROUP_COUNT = ; |
|
|
|
|
|
constexpr uint32_t TC_SCANA = 1; |
|
|
constexpr uint32_t TC_SCANB = 1; |
|
|
constexpr uint32_t TC_SCANB = 1; |
|
|
constexpr uint32_t TC_AGGRJ = 4; |
|
|
|
|
|
|
|
|
constexpr uint32_t TC_AGGRJ = 1; |
|
|
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[] = "prefetch"; |
|
|
constexpr char MODE_STRING[] = "prefetch"; |
|
@ -111,6 +111,8 @@ inline uint16_t* get_mask(uint16_t* base, const size_t chunk_index) { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
void scan_b(size_t gid, size_t tid) { |
|
|
void scan_b(size_t gid, size_t tid) { |
|
|
|
|
|
using namespace std::chrono_literals; |
|
|
|
|
|
|
|
|
LAUNCH_.wait(); |
|
|
LAUNCH_.wait(); |
|
|
|
|
|
|
|
|
if constexpr (PERFORM_CACHING) { |
|
|
if constexpr (PERFORM_CACHING) { |
|
@ -121,11 +123,12 @@ void scan_b(size_t gid, size_t tid) { |
|
|
uint64_t* chunk_ptr = get_chunk(DATA_B_, chunk_index); |
|
|
uint64_t* chunk_ptr = get_chunk(DATA_B_, chunk_index); |
|
|
|
|
|
|
|
|
data = CACHE_.Access(reinterpret_cast<uint8_t *>(chunk_ptr), CHUNK_SIZE_B / TC_AGGRJ); |
|
|
data = CACHE_.Access(reinterpret_cast<uint8_t *>(chunk_ptr), CHUNK_SIZE_B / TC_AGGRJ); |
|
|
|
|
|
std::this_thread::sleep_for(100ms); |
|
|
|
|
|
data->WaitOnCompletion(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
data->WaitOnCompletion(); |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
BARRIERS_[gid]->arrive_and_drop(); |
|
|
BARRIERS_[gid]->arrive_and_drop(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|