Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
4feb671
Add online CUDA lookup and GPU benchmark scaffolding
tpn Mar 30, 2026
28d8058
Fix benchmark review findings
tpn Mar 30, 2026
a8c6bce
Fix CUDA emitter and verifier bugs
tpn Mar 30, 2026
690f2c7
Fix portability and emitter edge cases
tpn Mar 30, 2026
48bd4a9
Fix emitter string and empty-build guards
tpn Mar 30, 2026
53fa8d0
Tighten benchmark verification and accounting
tpn Mar 30, 2026
ae21cf3
Fix exports and emitted CUDA naming
tpn Mar 30, 2026
3e80d18
Fix query extraction and probe stream limits
tpn Mar 30, 2026
51fed78
Fix runtime compatibility edge cases
tpn Mar 30, 2026
bb9f56d
Fix host probe arithmetic parity
tpn Mar 30, 2026
1541cb3
Fix benchmark runtime edge cases
tpn Mar 30, 2026
3e8983d
Make CPU verification opt-in by default
tpn Mar 30, 2026
9caf4d9
Fix public metadata mapping and ratio guards
tpn Mar 30, 2026
dd8398b
Fix example portability includes
tpn Mar 30, 2026
f36e8e6
Harden extractor inputs and emitter contract
tpn Mar 30, 2026
06ad297
Polish review follow-ups
tpn Mar 30, 2026
a1dff39
Apply final review nits
tpn Mar 30, 2026
06826de
Address PR review thread feedback
tpn Mar 31, 2026
acaf720
Tighten experimental lookup mode handling
tpn Mar 31, 2026
de24af1
Fix CI and verifier assumptions
tpn Mar 31, 2026
05a6fa4
Make direct probe validation bounds-safe
tpn Mar 31, 2026
2226fd5
Relax benchmark verification assumptions
tpn Mar 31, 2026
c56b0e2
Enforce unique build domains in extractors
tpn Mar 31, 2026
ab47462
Handle tail items and subset metadata explicitly
tpn Mar 31, 2026
59e8884
Fix experimental kernel tail handling and Q21 extraction
tpn Mar 31, 2026
5ace6ee
Harden tail handling and split timing
tpn Mar 31, 2026
86b6145
Restrict verification to safe modes
tpn Mar 31, 2026
8878af3
Guard split gather and CPU baseline assumptions
tpn Mar 31, 2026
b640ba9
Fix emitted namespace and Q21 grouping
tpn Mar 31, 2026
dd78eb4
Use table hash metadata for host analysis
tpn Mar 31, 2026
9145240
Fix blocksort shared memory accounting
tpn Mar 31, 2026
b4640a7
Tighten CUDA source export sizing and copies
tpn Mar 31, 2026
ea72ebd
Fix Windows export path and raise CUDA source reserve
tpn Mar 31, 2026
0240f39
Fix Windows copy macros and CUDA file-work source access
tpn Apr 18, 2026
94422ff
Address Copilot review comments
tpn Apr 18, 2026
2f19cf6
Fix current Windows warnings and assigned buffer fallback
tpn Apr 18, 2026
dcdefe3
Prefer local tree for example fallback builds
tpn Apr 18, 2026
4658f37
examples: prefer online core in jit finder
tpn Apr 18, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 56 additions & 0 deletions examples/cpp-console-cuco-static-map-bench/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
cmake_minimum_required(VERSION 3.20)

project(cpp-console-cuco-static-map-bench LANGUAGES CXX CUDA)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_CUDA_STANDARD 17)
set(CMAKE_CUDA_STANDARD_REQUIRED ON)
set(CMAKE_CUDA_EXTENSIONS OFF)

set(
CUCO_ROOT
""
CACHE PATH
"Path to a local cuCollections checkout."
)

find_package(CUDAToolkit REQUIRED)

find_path(
CUCO_INCLUDE_DIR
NAMES cuco/static_map.cuh
HINTS ${CUCO_ROOT}
PATH_SUFFIXES include
REQUIRED
)

add_executable(cpp-console-cuco-static-map-bench
src/main.cu
)

target_include_directories(
cpp-console-cuco-static-map-bench
PRIVATE
"${CUCO_INCLUDE_DIR}"
)

target_link_libraries(
cpp-console-cuco-static-map-bench
PRIVATE
CUDA::cudart
)

target_compile_options(
cpp-console-cuco-static-map-bench
PRIVATE
$<$<COMPILE_LANGUAGE:CUDA>:--expt-extended-lambda>
)

if(APPLE OR UNIX)
set_property(
TARGET cpp-console-cuco-static-map-bench
PROPERTY BUILD_RPATH "$<TARGET_FILE_DIR:CUDA::cudart>"
)
endif()
44 changes: 44 additions & 0 deletions examples/cpp-console-cuco-static-map-bench/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# cpp-console-cuco-static-map-bench

Standalone `cuCollections` baseline for the same raw `uint64_t` `.keys` domains
used by the PerfectHash GPU experiments.

This benchmark:

1. loads a `.keys` file as `uint64_t` keys,
2. builds a `cuco::static_map<uint64_t, uint32_t>` mapping `key -> ordinal`,
3. runs `find_async()` over the same key stream,
4. reports build and lookup timings, including normalized `ns/key`.

This is the closest simple `cuCollections` baseline to the current PerfectHash
GPU key-to-index lookup path.

## Build

```bash
cmake -S examples/cpp-console-cuco-static-map-bench \
-B build/examples/cpp-console-cuco-static-map-bench \
-DCUCO_ROOT=/path/to/cucollections

cmake --build build/examples/cpp-console-cuco-static-map-bench -j
```

## Run

```bash
./build/examples/cpp-console-cuco-static-map-bench/cpp-console-cuco-static-map-bench \
--keys-file /mnt/data/tpch/scale-10/perfecthash-keys/c_custkey_q03_ph-64.keys \
--load-factor 0.5
```

Optional arguments:

- `--keys-file <path>`
- `--max-keys <N>`
- `--load-factor <f>`
- `--device <ordinal>`
- `--warmup <N>`
- `--iterations <N>`
- `--csv`
- `--csv-header`
- `--no-verify`
Loading
Loading