Skip to content

Commit 1d7f137

Browse files
authored
Merge pull request #18 from oneapi-src/hashtable/code_update/2309
[hashtable] timing change + cmake update
2 parents f51e456 + db76b83 commit 1d7f137

File tree

7 files changed

+127
-97
lines changed

7 files changed

+127
-97
lines changed

hashtable/CUDA/CMakeLists.txt

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,25 @@ set(CMAKE_CXX_EXTENSIONS OFF) # use std instead of gnu
1818

1919
option(USE_SM "Build for specific SM" OFF)
2020

21-
# CMAKE_CXX_FLAGS
22-
if("${CMAKE_CXX_FLAGS}" STREQUAL "")
23-
message(STATUS "Using DEFAULT compilation flags for the application")
24-
set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} " -O3 -Wall -Wextra -Wno-unused-parameter ")
25-
else()
26-
message(STATUS "OVERRIDING compilation flags")
21+
set(DEF_WL_CXX_FLAGS " ")
22+
set(DEF_GENERAL_CXX_FLAGS " -O3 -Wall -Wextra -Wno-unused-parameter ")
23+
set(DEF_COMBINED_CXX_FLAGS "${DEF_GENERAL_CXX_FLAGS} ${DEF_WL_CXX_FLAGS}")
24+
25+
# -DCMAKE_CXX_FLAGS=" -blah -blah " overrides the default flags (BOTH general and WL specific)
26+
# -DOVERRIDE_GENERAL_CXX_FLAGS=" -blah -blah " overrides the general flags only (and not the workload specific flags)
27+
# passing in both CMAKE_CXX_FLAGS and OVERRIDE_GENERAL_CXX_FLAGS is not allowed, in order to prevent ambiguity
28+
29+
if(NOT "${CMAKE_CXX_FLAGS}" STREQUAL "" AND NOT "${OVERRIDE_GENERAL_CXX_FLAGS}" STREQUAL "")
30+
message(FATAL_ERROR "Both CMAKE_CXX_FLAGS and OVERRIDE_GENERAL_CXX_FLAGS cannot be passed in together")
31+
elseif("${CMAKE_CXX_FLAGS}" STREQUAL "" AND "${OVERRIDE_GENERAL_CXX_FLAGS}" STREQUAL "")
32+
message(STATUS "Using DEFAULT compilation flags")
33+
set(CMAKE_CXX_FLAGS "${DEF_COMBINED_CXX_FLAGS}")
34+
elseif(NOT "${OVERRIDE_GENERAL_CXX_FLAGS}" STREQUAL "")
35+
message(STATUS "OVERRIDING GENERAL compilation flags")
36+
set(CMAKE_CXX_FLAGS "${OVERRIDE_GENERAL_CXX_FLAGS}")
37+
string(APPEND CMAKE_CXX_FLAGS ${DEF_WL_CXX_FLAGS})
38+
elseif(NOT "${CMAKE_CXX_FLAGS}" STREQUAL "")
39+
message(STATUS "OVERRIDING GENERAL and WORKLOAD SPECIFIC compilation flags")
2740
endif()
2841

2942
add_compile_options(-DUSE_CUDA)

hashtable/CUDA/src/main.cpp

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -17,21 +17,18 @@
1717
#include "vector"
1818
#include "chrono"
1919
#include <cstring>
20+
#include "linearprobing.h"
2021

22+
// #define DEBUG_TIME
2123
#define CPP_MODULE "MAIN"
22-
#include "linearprobing.h"
2324

2425
#define TIMER_START() time_start = std::chrono::steady_clock::now();
2526
#define TIMER_END() \
2627
time_end = std::chrono::steady_clock::now(); \
2728
time_total = std::chrono::duration<double, std::milli>(time_end - time_start).count();
2829
#define TIMER_PRINT(name) std::cout << name <<": " << time_total / 1e3 << " s\n";
2930

30-
// #ifndef DEBUG_TIME
31-
// #define DEBUG_TIME
32-
// #endif
33-
34-
#ifdef DEBUGTIME
31+
#ifdef DEBUG_TIME
3532
#define START_TIMER() start_time = std::chrono::steady_clock::now();
3633
#define STOP_TIMER() \
3734
stop_time = std::chrono::steady_clock::now(); \
@@ -132,8 +129,6 @@ int main(int argc, char* argv[])
132129
std::chrono::steady_clock::time_point time_end;
133130
double time_total = 0.0;
134131

135-
TIMER_START()
136-
137132
try {
138133

139134
// To recreate the same random numbers across runs of the program, set seed to a specific
@@ -148,25 +143,30 @@ int main(int argc, char* argv[])
148143
// for (uint32_t n = 0; n < NUM_LOOPS; ++n) {
149144
// printf("Initializing keyvalue pairs with random numbers...\n");
150145

151-
std::vector<KeyValue> insert_kvs = generate_random_keyvalues(rnd, kNumKeyValues);
152-
std::vector<KeyValue> lookup_kvs = shuffle_keyvalues(rnd, insert_kvs, kNumKeyValues / 2);
153-
std::vector<KeyValue> delete_kvs = shuffle_keyvalues(rnd, insert_kvs, kNumKeyValues / 2);
154-
155-
// Begin test
156-
// printf("Testing insertion/deletion of %d/%d elements into GPU hash table...\n",
157-
// (uint32_t)insert_kvs.size(), (uint32_t)delete_kvs.size());
158-
159146
#ifdef DEBUG_TIME
160147
std::chrono::steady_clock::time_point start_time;
161148
std::chrono::steady_clock::time_point stop_time;
162149
double duration = 0.0;
163150
double tot_time = 0.0;
164151

152+
START_TIMER();
153+
#endif
154+
std::vector<KeyValue> insert_kvs = generate_random_keyvalues(rnd, kNumKeyValues);
155+
std::vector<KeyValue> lookup_kvs = shuffle_keyvalues(rnd, insert_kvs, kNumKeyValues / 2);
156+
std::vector<KeyValue> delete_kvs = shuffle_keyvalues(rnd, insert_kvs, kNumKeyValues / 2);
157+
158+
#ifdef DEBUG_TIME
159+
STOP_TIMER();
160+
PRINT_TIMER("generate_hashtable ");
161+
#endif
162+
163+
TIMER_START()
164+
165+
#ifdef DEBUG_TIME
165166
START_TIMER();
166167
#endif
167168
checkCUDA(cudaSetDevice(0));
168169

169-
// Time timer = start_timer();
170170
#ifdef DEBUG_TIME
171171
STOP_TIMER();
172172
PRINT_TIMER("init ");

hashtable/HIP/CMakeLists.txt

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,25 @@ set(CMAKE_MODULE_PATH "${ROCM_PATH}/hip/cmake" ${CMAKE_MODULE_PATH})
2727
set(HIP_INCLUDE_DIRS "${ROCM_PATH}/include" ${HIP_INCLUDE_DIRS})
2828
set(HIP_LIBRARIES "${ROCM_PATH}/lib" ${HIP_LIBRARIES})
2929

30-
# CMAKE_CXX_FLAGS
31-
if("${CMAKE_CXX_FLAGS}" STREQUAL "")
32-
message(STATUS "Using DEFAULT compilation flags for the application")
33-
set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} " -O3 -std=c++17 -ffast-math -D__HIP_PLATFORM_AMD__ ")
34-
else()
35-
message(STATUS "OVERRIDING compilation flags")
30+
set(DEF_WL_CXX_FLAGS " -D__HIP_PLATFORM_AMD__ ")
31+
set(DEF_GENERAL_CXX_FLAGS " -O3 -std=c++17 -ffast-math ")
32+
set(DEF_COMBINED_CXX_FLAGS "${DEF_GENERAL_CXX_FLAGS} ${DEF_WL_CXX_FLAGS}")
33+
34+
# -DCMAKE_CXX_FLAGS=" -blah -blah " overrides the default flags (BOTH general and WL specific)
35+
# -DOVERRIDE_GENERAL_CXX_FLAGS=" -blah -blah " overrides the general flags only (and not the workload specific flags)
36+
# passing in both CMAKE_CXX_FLAGS and OVERRIDE_GENERAL_CXX_FLAGS is not allowed, in order to prevent ambiguity
37+
38+
if(NOT "${CMAKE_CXX_FLAGS}" STREQUAL "" AND NOT "${OVERRIDE_GENERAL_CXX_FLAGS}" STREQUAL "")
39+
message(FATAL_ERROR "Both CMAKE_CXX_FLAGS and OVERRIDE_GENERAL_CXX_FLAGS cannot be passed in together")
40+
elseif("${CMAKE_CXX_FLAGS}" STREQUAL "" AND "${OVERRIDE_GENERAL_CXX_FLAGS}" STREQUAL "")
41+
message(STATUS "Using DEFAULT compilation flags")
42+
set(CMAKE_CXX_FLAGS "${DEF_COMBINED_CXX_FLAGS}")
43+
elseif(NOT "${OVERRIDE_GENERAL_CXX_FLAGS}" STREQUAL "")
44+
message(STATUS "OVERRIDING GENERAL compilation flags")
45+
set(CMAKE_CXX_FLAGS "${OVERRIDE_GENERAL_CXX_FLAGS}")
46+
string(APPEND CMAKE_CXX_FLAGS ${DEF_WL_CXX_FLAGS})
47+
elseif(NOT "${CMAKE_CXX_FLAGS}" STREQUAL "")
48+
message(STATUS "OVERRIDING GENERAL and WORKLOAD SPECIFIC compilation flags")
3649
endif()
3750

3851
find_package(HIP REQUIRED)

hashtable/HIP/src/main.cpp

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -17,21 +17,18 @@
1717
#include "vector"
1818
#include "chrono"
1919
#include <cstring>
20+
#include "linearprobing.h"
2021

22+
// #define DEBUG_TIME
2123
#define CPP_MODULE "MAIN"
22-
#include "linearprobing.h"
2324

2425
#define TIMER_START() time_start = std::chrono::steady_clock::now();
2526
#define TIMER_END() \
2627
time_end = std::chrono::steady_clock::now(); \
2728
time_total = std::chrono::duration<double, std::milli>(time_end - time_start).count();
2829
#define TIMER_PRINT(name) std::cout << name <<": " << time_total / 1e3 << " s\n";
2930

30-
// #ifndef DEBUG_TIME
31-
// #define DEBUG_TIME
32-
// #endif
33-
34-
#ifdef DEBUGTIME
31+
#ifdef DEBUG_TIME
3532
#define START_TIMER() start_time = std::chrono::steady_clock::now();
3633
#define STOP_TIMER() \
3734
stop_time = std::chrono::steady_clock::now(); \
@@ -132,8 +129,6 @@ int main(int argc, char* argv[])
132129
std::chrono::steady_clock::time_point time_end;
133130
double time_total = 0.0;
134131

135-
TIMER_START()
136-
137132
try {
138133

139134
// To recreate the same random numbers across runs of the program, set seed to a specific
@@ -148,25 +143,30 @@ int main(int argc, char* argv[])
148143
// for (uint32_t n = 0; n < NUM_LOOPS; ++n) {
149144
// printf("Initializing keyvalue pairs with random numbers...\n");
150145

151-
std::vector<KeyValue> insert_kvs = generate_random_keyvalues(rnd, kNumKeyValues);
152-
std::vector<KeyValue> lookup_kvs = shuffle_keyvalues(rnd, insert_kvs, kNumKeyValues / 2);
153-
std::vector<KeyValue> delete_kvs = shuffle_keyvalues(rnd, insert_kvs, kNumKeyValues / 2);
154-
155-
// Begin test
156-
// printf("Testing insertion/deletion of %d/%d elements into GPU hash table...\n",
157-
// (uint32_t)insert_kvs.size(), (uint32_t)delete_kvs.size());
158-
159146
#ifdef DEBUG_TIME
160147
std::chrono::steady_clock::time_point start_time;
161148
std::chrono::steady_clock::time_point stop_time;
162149
double duration = 0.0;
163150
double tot_time = 0.0;
164151

152+
START_TIMER();
153+
#endif
154+
std::vector<KeyValue> insert_kvs = generate_random_keyvalues(rnd, kNumKeyValues);
155+
std::vector<KeyValue> lookup_kvs = shuffle_keyvalues(rnd, insert_kvs, kNumKeyValues / 2);
156+
std::vector<KeyValue> delete_kvs = shuffle_keyvalues(rnd, insert_kvs, kNumKeyValues / 2);
157+
158+
#ifdef DEBUG_TIME
159+
STOP_TIMER();
160+
PRINT_TIMER("generate_hashtable ");
161+
#endif
162+
163+
TIMER_START()
164+
165+
#ifdef DEBUG_TIME
165166
START_TIMER();
166167
#endif
167168
checkCUDA(hipSetDevice(0));
168169

169-
// Time timer = start_timer();
170170
#ifdef DEBUG_TIME
171171
STOP_TIMER();
172172
PRINT_TIMER("init ");

hashtable/README.md

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,12 @@
22

33
hashtable implements a simple hash table in GPU (original CUDA source code is from [here](https://github.com/nosferalatu/SimpleGPUHashTable)).
44

5-
## Cloning
6-
7-
To clone
8-
9-
```
10-
git clone https://github.com/oneapi-src/Velocity-Bench.git
11-
```
12-
135
## Supported versions
146

157
- CUDA: The original code was obtained from [here](https://github.com/nosferalatu/SimpleGPUHashTable)
168
- SYCL: The CUDA code was migrated using Intel DPCT, and then the resulting code was modified to remove the dpct headers.
179
- HIP: Created from CUDA version using hipify-perl script.
1810

19-
# Current Version:
20-
- Initial release of the workload
2111

2212
# Build Instructions
2313

hashtable/SYCL/CMakeLists.txt

Lines changed: 38 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -21,36 +21,50 @@ option(USE_NVIDIA_BACKEND "Build for NVIDIA backend" OFF)
2121
option(USE_AMDHIP_BACKEND "Build for AMD HIP backend" OFF)
2222
option(USE_SM "Build for specific SM" OFF)
2323

24-
set(INTEL_GPU_CXX_FLAGS " -O2 -fsycl -Wall -Wextra -Wno-unused-parameter ")
25-
set(NVIDIA_GPU_CXX_FLAGS " -O3 -fsycl -Wall -Wextra -Wno-unused-parameter ")
26-
set(AMD_GPU_CXX_FLAGS " -O3 -fsycl -Wall -Wextra -Wno-unused-parameter ")
24+
set(DEF_INTEL_WL_CXX_FLAGS " ")
25+
set(DEF_NVIDIA_WL_CXX_FLAGS " ")
26+
set(DEF_AMD_WL_CXX_FLAGS " ")
2727

28-
set(USE_DEFAULT_FLAGS ON)
29-
if("${CMAKE_CXX_FLAGS}" STREQUAL "")
28+
set(DEF_INTEL_GENERAL_CXX_FLAGS " -O2 -fsycl -Wall -Wextra -Wno-unused-parameter ")
29+
set(DEF_NVIDIA_GENERAL_CXX_FLAGS " -O3 -fsycl -Wall -Wextra -Wno-unused-parameter ")
30+
set(DEF_AMD_GENERAL_CXX_FLAGS " -O3 -fsycl -Wall -Wextra -Wno-unused-parameter ")
31+
32+
# -DCMAKE_CXX_FLAGS=" -blah -blah " overrides the default flags (BOTH general and WL specific)
33+
# -DOVERRIDE_GENERAL_CXX_FLAGS=" -blah -blah " overrides the general flags only (and not the workload specific flags)
34+
# passing in both CMAKE_CXX_FLAGS and OVERRIDE_GENERAL_CXX_FLAGS is not allowed, in order to prevent ambiguity
35+
36+
if(NOT "${CMAKE_CXX_FLAGS}" STREQUAL "" AND NOT "${OVERRIDE_GENERAL_CXX_FLAGS}" STREQUAL "")
37+
message(FATAL_ERROR "Both CMAKE_CXX_FLAGS and OVERRIDE_GENERAL_CXX_FLAGS cannot be passed in together")
38+
elseif("${CMAKE_CXX_FLAGS}" STREQUAL "" AND "${OVERRIDE_GENERAL_CXX_FLAGS}" STREQUAL "")
3039
message(STATUS "Using DEFAULT compilation flags")
31-
else()
32-
message(STATUS "Overriding DEFAULT compilation flags")
33-
set(USE_DEFAULT_FLAGS OFF)
40+
set(INTEL_GPU_CXX_FLAGS "${DEF_INTEL_GENERAL_CXX_FLAGS} ${DEF_INTEL_WL_CXX_FLAGS}")
41+
set(NVIDIA_GPU_CXX_FLAGS "${DEF_NVIDIA_GENERAL_CXX_FLAGS} ${DEF_NVIDIA_WL_CXX_FLAGS}")
42+
set(AMD_GPU_CXX_FLAGS "${DEF_AMD_GENERAL_CXX_FLAGS} ${DEF_AMD_WL_CXX_FLAGS}")
43+
elseif(NOT "${OVERRIDE_GENERAL_CXX_FLAGS}" STREQUAL "")
44+
message(STATUS "OVERRIDING GENERAL compilation flags")
45+
set(INTEL_GPU_CXX_FLAGS "${OVERRIDE_GENERAL_CXX_FLAGS} ${DEF_INTEL_WL_CXX_FLAGS}")
46+
set(NVIDIA_GPU_CXX_FLAGS "${OVERRIDE_GENERAL_CXX_FLAGS} ${DEF_NVIDIA_WL_CXX_FLAGS}")
47+
set(AMD_GPU_CXX_FLAGS "${OVERRIDE_GENERAL_CXX_FLAGS} ${DEF_AMD_WL_CXX_FLAGS}")
48+
elseif(NOT "${CMAKE_CXX_FLAGS}" STREQUAL "")
49+
message(STATUS "OVERRIDING GENERAL and WORKLOAD SPECIFIC compilation flags")
50+
set(INTEL_GPU_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
51+
set(NVIDIA_GPU_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
52+
set(AMD_GPU_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
3453
endif()
3554

36-
# AOT compilation
3755
if(GPU_AOT)
3856
message(STATUS "Enabling INTEL backend")
39-
if(USE_DEFAULT_FLAGS)
40-
set(CMAKE_CXX_FLAGS "${INTEL_GPU_CXX_FLAGS}") # Default flags for Intel backend
41-
endif()
42-
if( (${GPU_AOT} STREQUAL "pvc") OR (${GPU_AOT} STREQUAL "PVC") )
57+
set(CMAKE_CXX_FLAGS "${INTEL_GPU_CXX_FLAGS}")
58+
if((${GPU_AOT} STREQUAL "pvc") OR (${GPU_AOT} STREQUAL "PVC"))
4359
message(STATUS "Enabling Intel GPU AOT compilation for ${GPU_AOT}")
4460
string(APPEND CMAKE_CXX_FLAGS " -fsycl-targets=spir64_gen -Xs \"-device 0x0bd5 -revision_id 0x2f\" ")
4561
else()
4662
message(STATUS "Using custom AOT compilation flag ${GPU_AOT}")
47-
string(APPEND CMAKE_CXX_FLAGS " ${GPU_AOT} ")
63+
string(APPEND CMAKE_CXX_FLAGS " ${GPU_AOT} ") # User should be aware of advanced AOT compilation flags
4864
endif()
4965
elseif(USE_NVIDIA_BACKEND)
5066
message(STATUS "Enabling NVIDIA backend")
51-
if(USE_DEFAULT_FLAGS)
52-
set(CMAKE_CXX_FLAGS "${NVIDIA_GPU_CXX_FLAGS}") # Default flags for NV backend
53-
endif()
67+
set(CMAKE_CXX_FLAGS "${NVIDIA_GPU_CXX_FLAGS}")
5468
if(USE_SM)
5569
message("-- Building for SM_${USE_SM} compatibility")
5670
string(APPEND CMAKE_CXX_FLAGS " -fsycl-targets=nvptx64-nvidia-cuda -Xsycl-target-backend --cuda-gpu-arch=sm_${USE_SM} ")
@@ -60,12 +74,16 @@ elseif(USE_NVIDIA_BACKEND)
6074
endif()
6175
elseif(USE_AMDHIP_BACKEND)
6276
message(STATUS "Enabling AMD HIP backend for ${USE_AMDHIP_BACKEND} AMD architecture")
63-
if(USE_DEFAULT_FLAGS)
64-
set(CMAKE_CXX_FLAGS "${AMD_GPU_CXX_FLAGS}") # Default flags for AMD backend (gfx90a for MI250)
65-
endif()
77+
set(CMAKE_CXX_FLAGS "${AMD_GPU_CXX_FLAGS}")
6678
string(APPEND CMAKE_CXX_FLAGS " -fsycl-targets=amdgcn-amd-amdhsa -Xsycl-target-backend --offload-arch=${USE_AMDHIP_BACKEND} ")
79+
else()
80+
# JIT case
81+
message(STATUS "Enabling INTEL backend")
82+
set(CMAKE_CXX_FLAGS "${INTEL_GPU_CXX_FLAGS}")
6783
endif()
6884

85+
message(STATUS "CXX Compilation flags set to: ${CMAKE_CXX_FLAGS}")
86+
6987
set(SOURCES
7088
${CMAKE_SOURCE_DIR}/src/main.cpp
7189
${CMAKE_SOURCE_DIR}/src/test.cpp

hashtable/SYCL/src/main.cpp

Lines changed: 17 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -17,22 +17,17 @@
1717
#include "vector"
1818
#include "chrono"
1919
#include <cstring>
20-
21-
#define CPP_MODULE "MAIN"
2220
#include "linearprobing.h"
2321

24-
#include <sycl/sycl.hpp>
22+
// #define DEBUG_TIME
23+
#define CPP_MODULE "MAIN"
2524

2625
#define TIMER_START() time_start = std::chrono::steady_clock::now();
2726
#define TIMER_END() \
2827
time_end = std::chrono::steady_clock::now(); \
2928
time_total = std::chrono::duration<double, std::milli>(time_end - time_start).count();
3029
#define TIMER_PRINT(name) std::cout << name <<": " << time_total / 1e3 << " s\n";
3130

32-
// #ifndef DEBUG_TIME
33-
// #define DEBUG_TIME
34-
// #endif
35-
3631
#ifdef DEBUG_TIME
3732
#define START_TIMER() start_time = std::chrono::steady_clock::now();
3833
#define STOP_TIMER() \
@@ -134,8 +129,6 @@ int main(int argc, char* argv[])
134129
std::chrono::steady_clock::time_point time_end;
135130
double time_total = 0.0;
136131

137-
TIMER_START()
138-
139132
try {
140133

141134
// To recreate the same random numbers across runs of the program, set seed to a specific
@@ -150,26 +143,29 @@ int main(int argc, char* argv[])
150143
// for (uint32_t n = 0; n < NUM_LOOPS; ++n) {
151144
// printf("Initializing keyvalue pairs with random numbers...\n");
152145

153-
std::vector<KeyValue> insert_kvs = generate_random_keyvalues(rnd, kNumKeyValues);
154-
std::vector<KeyValue> lookup_kvs = shuffle_keyvalues(rnd, insert_kvs, kNumKeyValues / 2);
155-
std::vector<KeyValue> delete_kvs = shuffle_keyvalues(rnd, insert_kvs, kNumKeyValues / 2);
156-
157-
// Begin test
158-
// printf("Testing insertion/deletion of %d/%d elements into GPU hash table...\n",
159-
// (uint32_t)insert_kvs.size(), (uint32_t)delete_kvs.size());
160-
161146
#ifdef DEBUG_TIME
162147
std::chrono::steady_clock::time_point start_time;
163148
std::chrono::steady_clock::time_point stop_time;
164149
double duration = 0.0;
165150
double tot_time = 0.0;
166151

167-
START_TIMER();
152+
START_TIMER();
153+
#endif
154+
std::vector<KeyValue> insert_kvs = generate_random_keyvalues(rnd, kNumKeyValues);
155+
std::vector<KeyValue> lookup_kvs = shuffle_keyvalues(rnd, insert_kvs, kNumKeyValues / 2);
156+
std::vector<KeyValue> delete_kvs = shuffle_keyvalues(rnd, insert_kvs, kNumKeyValues / 2);
157+
158+
#ifdef DEBUG_TIME
159+
STOP_TIMER();
160+
PRINT_TIMER("generate_hashtable ");
168161
#endif
169-
sycl::device dht = sycl::device(sycl::default_selector_v);
170162

171-
// Time timer = start_timer();
172-
sycl::queue qht(dht);
163+
TIMER_START()
164+
165+
#ifdef DEBUG_TIME
166+
START_TIMER();
167+
#endif
168+
sycl::queue qht;
173169
#ifdef DEBUG_TIME
174170
STOP_TIMER();
175171
PRINT_TIMER("init ");

0 commit comments

Comments
 (0)