From b49bc6c1738cb7be627ff084878b5318b0839f8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Constantin=20F=C3=BCrst?= Date: Wed, 24 Jan 2024 02:59:48 +0100 Subject: [PATCH] push changes to benchmark --- qdp_project/src/Benchmark.cpp | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/qdp_project/src/Benchmark.cpp b/qdp_project/src/Benchmark.cpp index b6bef2f..c904e90 100644 --- a/qdp_project/src/Benchmark.cpp +++ b/qdp_project/src/Benchmark.cpp @@ -24,16 +24,16 @@ //////////////////////////////// /// BENCHMARK SETUP -constexpr size_t WL_SIZE_B = 2_GiB; +constexpr size_t WL_SIZE_B = 4_GiB; constexpr uint32_t WARMUP_ITERATION_COUNT = 5; constexpr uint32_t ITERATION_COUNT = 5; #ifdef MODE_PREFETCH -constexpr size_t CHUNK_SIZE_B = 128_MiB; -constexpr uint32_t GROUP_COUNT = ; +constexpr size_t CHUNK_SIZE_B = 64_MiB; +constexpr uint32_t GROUP_COUNT = 8; constexpr uint32_t TC_SCANA = 1; -constexpr uint32_t TC_SCANB = 1; -constexpr uint32_t TC_AGGRJ = 1; +constexpr uint32_t TC_SCANB = 8; +constexpr uint32_t TC_AGGRJ = 8; constexpr bool PERFORM_CACHING = true; constexpr bool DATA_IN_HBM = false; constexpr char MODE_STRING[] = "prefetch"; @@ -71,6 +71,8 @@ constexpr size_t RUN_COUNT = CHUNK_COUNT / GROUP_COUNT; constexpr size_t MASK_ELEMENT_SIZE = 16; constexpr size_t MASK_STEP_SIZE = CHUNK_SIZE_ELEMENTS / MASK_ELEMENT_SIZE; +static_assert(RUN_COUNT > 0); + using filter = Filter; using aggregation = Aggregation; @@ -111,23 +113,23 @@ inline uint16_t* get_mask(uint16_t* base, const size_t chunk_index) { } void scan_b(size_t gid, size_t tid) { - using namespace std::chrono_literals; + constexpr size_t split = RUN_COUNT / TC_SCANB; + const size_t start = tid * split; + const size_t end = start + split; LAUNCH_.wait(); if constexpr (PERFORM_CACHING) { - std::unique_ptr data; - - for (size_t i = 0; i < RUN_COUNT; i++) { + for (size_t i = start; i < end; i++) { const size_t chunk_index = get_chunk_index(gid, tid, i); uint64_t* chunk_ptr = get_chunk(DATA_B_, chunk_index); - data = CACHE_.Access(reinterpret_cast(chunk_ptr), CHUNK_SIZE_B / TC_AGGRJ); - std::this_thread::sleep_for(100ms); + const auto data = CACHE_.Access(reinterpret_cast(chunk_ptr), CHUNK_SIZE_B / TC_AGGRJ); + sched_yield(); + data->WaitOnCompletion(); } } - BARRIERS_[gid]->arrive_and_drop(); }