|
@ -24,16 +24,16 @@ |
|
|
////////////////////////////////
|
|
|
////////////////////////////////
|
|
|
/// BENCHMARK SETUP
|
|
|
/// 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 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 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_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 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"; |
|
@ -71,6 +71,8 @@ constexpr size_t RUN_COUNT = CHUNK_COUNT / GROUP_COUNT; |
|
|
constexpr size_t MASK_ELEMENT_SIZE = 16; |
|
|
constexpr size_t MASK_ELEMENT_SIZE = 16; |
|
|
constexpr size_t MASK_STEP_SIZE = CHUNK_SIZE_ELEMENTS / MASK_ELEMENT_SIZE; |
|
|
constexpr size_t MASK_STEP_SIZE = CHUNK_SIZE_ELEMENTS / MASK_ELEMENT_SIZE; |
|
|
|
|
|
|
|
|
|
|
|
static_assert(RUN_COUNT > 0); |
|
|
|
|
|
|
|
|
using filter = Filter<uint64_t, LT, load_mode::Stream, false>; |
|
|
using filter = Filter<uint64_t, LT, load_mode::Stream, false>; |
|
|
using aggregation = Aggregation<uint64_t, Sum, load_mode::Stream>; |
|
|
using aggregation = Aggregation<uint64_t, Sum, load_mode::Stream>; |
|
|
|
|
|
|
|
@ -111,24 +113,24 @@ 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; |
|
|
|
|
|
|
|
|
constexpr size_t split = RUN_COUNT / TC_SCANB; |
|
|
|
|
|
const size_t start = tid * split; |
|
|
|
|
|
const size_t end = start + split; |
|
|
|
|
|
|
|
|
LAUNCH_.wait(); |
|
|
LAUNCH_.wait(); |
|
|
|
|
|
|
|
|
if constexpr (PERFORM_CACHING) { |
|
|
if constexpr (PERFORM_CACHING) { |
|
|
std::unique_ptr<dsacache::CacheData> 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<TC_AGGRJ>(gid, tid, i); |
|
|
const size_t chunk_index = get_chunk_index<TC_AGGRJ>(gid, tid, i); |
|
|
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); |
|
|
|
|
|
std::this_thread::sleep_for(100ms); |
|
|
|
|
|
|
|
|
const auto data = CACHE_.Access(reinterpret_cast<uint8_t *>(chunk_ptr), CHUNK_SIZE_B / TC_AGGRJ); |
|
|
|
|
|
sched_yield(); |
|
|
|
|
|
|
|
|
data->WaitOnCompletion(); |
|
|
data->WaitOnCompletion(); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
BARRIERS_[gid]->arrive_and_drop(); |
|
|
BARRIERS_[gid]->arrive_and_drop(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|