NVIDIA / NVIDIA/cuCollections

[ENHANCEMENT]: Device assertions in debug mode

Open
#563 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

good first issue P2: Nice to have type: improvement
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.