-
Notifications
You must be signed in to change notification settings - Fork 105
static_reduction_map #98
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
033d2bc
fe606cd
fd3b98f
a3678fb
5a65bf6
28e0995
8dc64ee
573bce2
d9236e5
89ed44e
e28db80
0eeac20
fa31c81
ab81b2b
46f9b73
8aebabb
9fb930e
24261b2
e635e31
d749445
ca9f7d6
9eebd17
212b8f6
cda527a
7c1af0f
3f1b59d
71a0122
2a38d70
f2d1a26
3c79701
8261d93
c6daa09
62a99ab
a526c16
c1fe449
fb9c0ec
e8e5461
1d97a6f
b4351fc
80ef0ee
54e2022
cc853c3
28069d0
26787ad
e2a81b3
9807d8f
0c1bd4d
58a2ead
f4979b1
01e75bd
1e86659
21be2e1
53bfe27
f4c703a
492b4cc
ec76e8a
961e88b
5931c9f
902b93a
d440243
4339b2b
6293117
cddd733
c43f7fb
8f965b1
bef9aa6
a99b56f
e87fc9d
607f79f
6d05ebb
5f24429
c2e4e62
e1361a3
d196de5
e904dca
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| #============================================================================= | ||
| # Copyright (c) 2018-2021, NVIDIA CORPORATION. | ||
| # Copyright (c) 2018-2022, NVIDIA CORPORATION. | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
|
|
@@ -39,11 +39,11 @@ CPMAddPackage( | |
| ################################################################################################### | ||
|
|
||
| ################################################################################################### | ||
| function(ConfigureBench BENCH_NAME BENCH_SRC) | ||
| add_executable(${BENCH_NAME} "${BENCH_SRC}") | ||
| function(ConfigureBench BENCH_NAME) | ||
| add_executable(${BENCH_NAME} ${ARGN}) | ||
| set_target_properties(${BENCH_NAME} PROPERTIES | ||
| POSITION_INDEPENDENT_CODE ON | ||
| RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/gbenchmarks") | ||
| RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/benchmarks") | ||
| target_include_directories(${BENCH_NAME} PRIVATE | ||
| "${CMAKE_CURRENT_SOURCE_DIR}") | ||
| target_compile_options(${BENCH_NAME} PRIVATE --expt-extended-lambda --expt-relaxed-constexpr -Xcompiler -Wno-subobject-linkage) | ||
|
|
@@ -59,10 +59,10 @@ function(ConfigureNVBench BENCH_NAME) | |
| add_executable(${BENCH_NAME} ${ARGN}) | ||
| set_target_properties(${BENCH_NAME} PROPERTIES | ||
| POSITION_INDEPENDENT_CODE ON | ||
| RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/nvbenchmarks") | ||
| RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/benchmarks" | ||
| COMPILE_FLAGS -DNVBENCH_MODULE) | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What is the
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The idea was to reuse the #if defined(NVBENCH_MODULE)
#include <nvbench/nvbench.cuh>
NVBENCH_DECLARE_ENUM_TYPE_STRINGS(
// Enum type:
dist_type,
// Callable to generate input strings:
// Short identifier used for tables, command-line args, etc.
// Used when context is available to figure out the enum type.
[](dist_type d) {
switch (d) {
case dist_type::GAUSSIAN: return "GAUSSIAN";
case dist_type::GEOMETRIC: return "GEOMETRIC";
case dist_type::UNIFORM: return "UNIFORM";
case dist_type::UNIQUE: return "UNIQUE";
case dist_type::SAME: return "SAME";
default: return "ERROR";
}
},
// Callable to generate descriptions:
// If non-empty, these are used in `--list` to describe values.
// Used when context may not be available to figure out the type from the
// input string.
// Just use `[](auto) { return std::string{}; }` if you don't want these.
[](auto) { return std::string{}; })
#endif
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is there another way of detecting if nvbench is included? I initially thought I could use the include guard definition but nvbench uses
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah, I see. This is fine then. I'd suggest renaming to |
||
| target_include_directories(${BENCH_NAME} PRIVATE | ||
| "${CMAKE_CURRENT_SOURCE_DIR}") | ||
| #"${NVBench_SOURCE_DIR}") | ||
| target_compile_options(${BENCH_NAME} PRIVATE --expt-extended-lambda --expt-relaxed-constexpr) | ||
| target_link_libraries(${BENCH_NAME} PRIVATE | ||
| nvbench::main | ||
|
|
@@ -76,13 +76,27 @@ endfunction(ConfigureNVBench) | |
|
|
||
| ################################################################################################### | ||
| # - dynamic_map benchmarks ------------------------------------------------------------------------ | ||
| set(DYNAMIC_MAP_BENCH_SRC "${CMAKE_CURRENT_SOURCE_DIR}/hash_table/dynamic_map_bench.cu") | ||
| ConfigureBench(DYNAMIC_MAP_BENCH "${DYNAMIC_MAP_BENCH_SRC}") | ||
| ConfigureBench(DYNAMIC_MAP_BENCH | ||
| hash_table/dynamic_map_bench.cu) | ||
|
|
||
| ################################################################################################### | ||
| # - static_map benchmarks ------------------------------------------------------------------------- | ||
| set(STATIC_MAP_BENCH_SRC "${CMAKE_CURRENT_SOURCE_DIR}/hash_table/static_map_bench.cu") | ||
| ConfigureBench(STATIC_MAP_BENCH "${STATIC_MAP_BENCH_SRC}") | ||
| ConfigureBench(STATIC_MAP_BENCH | ||
| hash_table/static_map_bench.cu) | ||
|
|
||
| ################################################################################################### | ||
| # - static_reduction_map benchmarks --------------------------------------------------------------- | ||
| ConfigureNVBench(STATIC_REDUCTION_MAP_BENCH | ||
| hash_table/static_reduction_map/insert_bench.cu) | ||
| ConfigureNVBench(STATIC_REDUCTION_MAP_PARAM_SWEEP | ||
| hash_table/static_reduction_map/param_sweep.cu) | ||
|
|
||
| ################################################################################################### | ||
| # - reduce-by-key benchmarks ---------------------------------------------------------------------- | ||
| ConfigureNVBench(REDUCE_BY_KEY_BENCH | ||
| reduce_by_key/cuco_reduce_by_key_bench.cu | ||
| reduce_by_key/cub_reduce_by_key_bench.cu | ||
| reduce_by_key/thrust_reduce_by_key_bench.cu) | ||
|
|
||
| ################################################################################################### | ||
| # - static_multimap benchmarks -------------------------------------------------------------------- | ||
|
|
@@ -94,9 +108,4 @@ ConfigureNVBench(STATIC_MULTIMAP_BENCH | |
| hash_table/static_multimap/retrieve_bench.cu) | ||
|
|
||
| ConfigureNVBench(RETRIEVE_BENCH | ||
| hash_table/static_multimap/optimal_retrieve_bench.cu) | ||
|
|
||
| ################################################################################################### | ||
| # - reduce_by_key benchmarks ---------------------------------------------------------------------- | ||
| set(RBK_BENCH_SRC "${CMAKE_CURRENT_SOURCE_DIR}/reduce_by_key/reduce_by_key.cu") | ||
| ConfigureBench(RBK_BENCH "${RBK_BENCH_SRC}") | ||
| hash_table/static_multimap/optimal_retrieve_bench.cu) | ||
Large diffs are not rendered by default.
Uh oh!
There was an error while loading. Please reload this page.