[ENHANCEMENT]: Device assertions in debug mode
Nobody has claimed this yet.
- Dominant language
- Cuda
- Stars
- 667
- Forks
- 120
- Avg merge
- 7d 5h
- Merged PRs (30d)
- 4
Description
Is your feature request related to a problem? Please describe.
Probing errors can be tedious to debug.
Some of these errors, such as inserting or probing for a sentinel, might even lead to silent failures.
Describe the solution you'd like
Add device-side assertions in debug mode for the following:
- inserting or probing for a sentinel key or payload
- probing took more than
capacity-many slots (this will also detect overflow state, i.e., inserting more elements than there are slots in the map) - out-of-bounds access to storage
assert in device code will impact performance negatively. Thus, I propose we conditionally enable it only if DEBUG is defined.
Describe alternatives you've considered
Instead of using the global DEBUG flag to enable assertions, we could define a new flag CUCO_DEBUG to get finer-grained control.
Additional context
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the device-side insertion, probing, and storage-access code in the repository, then inspect how the existing DEBUG flag is handled. Determine how the listed sentinel, probe-limit, overflow, and bounds cases are represented before deciding where assertions belong. Done means the requested checks are enabled only in debug mode and the affected behavior is covered by the relevant tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- hpc
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100