Add online CUDA lookup and GPU/cuCollections benchmark scaffolding#83
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: adc9fe4f5a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
bf92a88 to
ea72ebd
Compare
There was a problem hiding this comment.
Pull request overview
This PR adds an “online CUDA export” surface to PerfectHash’s OnlineJit tables (CUDA source + table payload + metadata) and introduces standalone GPU benchmark/example drivers (NVRTC-based PerfectHash lookup plus cuCollections static_map/static_multiset baselines), along with TPC-H probe-stream extraction utilities for more realistic build/probe benchmarking.
Changes:
- Add OnlineJit APIs to export generated CUDA lookup source, table payload bytes, and exported table metadata.
- Add standalone GPU benchmark/example projects for NVRTC compilation + cuCollections baselines.
- Add Python utilities + docs to extract and post-process TPC-H query-driven build/probe streams.
Reviewed changes
Copilot reviewed 18 out of 19 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/PerfectHash/PerfectHashOnlineJit.c | Adds CUDA source/table export + table info API; adjusts compile fallback logic; adds Index32x2 wrapper. |
| include/PerfectHash/PerfectHashOnlineJit.h | Exposes new public structs/flags and CUDA export APIs. |
| src/PerfectHash/PerfectHash.def | Exports new OnlineJit CUDA/table-info symbols. |
| src/PerfectHash/Chm01FileWorkCudaSourceFile.c | Hardens generated CUDA source output (optional “library-only” emission; seed sourcing changes). |
| examples/cpp-console-online-jit/src/main.cpp | Adds CLI plumbing to dump generated CUDA source to stdout/file. |
| examples/cpp-console-online-jit/cmake/FindPerfectHashOnlineJit.cmake | Broadens header discovery for different include layouts. |
| examples/tpch-query-probes/* | Adds TPC-H probe extraction + hot/cold partitioning tools and README. |
| examples/cpp-console-online-cuda-nvrtc/* | New NVRTC-based PerfectHash GPU lookup benchmark/example with CPU baseline + verification. |
| examples/cpp-console-cuco-static-map-bench/* | New cuCollections static_map baseline benchmark + build scaffolding/docs. |
| examples/cpp-console-cuco-static-multiset-bench/* | New cuCollections static_multiset baseline benchmark + build scaffolding/docs. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Closes #78.
Summary
static_mapandstatic_multisetbaselinesValidation
cmake --build build-online-llvm-jit --config Release --target PerfectHashOnlineCore -j 8python -m py_compile examples/tpch-query-probes/extract_tpch_query_probes.py examples/tpch-query-probes/partition_hot_subset.pycmake --build /tmp/ph-cuco-map-build -j 8cmake --build /tmp/ph-cuco-multiset-build -j 8cmake -S examples/cpp-console-online-cuda-nvrtc -B /tmp/ph-online-cuda-build -DPERFECTHASH_GIT_REPOSITORY=file:///home/trentn/src/perfecthash -DPERFECTHASH_GIT_TAG=78-online-cuda-gpu-bench -DPERFECTHASH_BUILD_PROFILE=online-llvm-jit >/dev/null && cmake --build /tmp/ph-online-cuda-build -j 8Review
roborevbranch reviews were run during the rebase/update cycle401 Unauthorizedongpt-5.4), so the last clean review pass I used was viaclaude-code, followed by the remaining low-severity cleanup nits incorporated directly