[BUG]: repeated keys in static_map after a sequence of insertions and deletions
メンテナーはふだん 2 日以内に返信
評価
調査の方向性
まず、cuco::static_map について説明されている k1/k2 衝突シーケンスを再現し、次にその probing、erase、挿入のエントリポイントを調べます。すべてのキーと値を取得したときに、挿入と削除を繰り返しても重複キーが決して生成されなければ完了です。
索引モデルが issue の本文から書いたものです。
説明
Is this a duplicate?
- I confirmed there appear to be no duplicate issues for this bug (https://github.com/NVIDIA/cuCollections/issues)
Type of Bug
Silent Failure
Describe the bug
I've been seeing repeated keys when I retrieve all the keys and values from cuco::staic_map. This is the explanation that I've found for it.
Assume that k1 and k2 map to the same position on the map and cause a collision. if we insert at k1, then insert at k2, remove k1 and then insert at k2 again, with the current probing schemes, there will be 2 instances of k2 at the map. That's because when we remove k1, an erased key sentinel will be left at it's position and when we want to insert k2 again, the insert function sees the erased key sentinel first and doesn't check any further to see if k2 is placed anywhere else. as a result, there will be 2 k2s at our map.
How to Reproduce
- Construct a map
- find 2 keys k1 and k2 that collide with each other
- insert something at k1
- insert something at k2
- remove k1
- insert something at k2
- retrieve all the keys at the map
Result: There will be 2 instances of k2 when we retrieve all the elements from the map.
Expected behavior
At any time there should be only one instance of k2 in the map.
Reproduction link
No response
Operating System
Ubuntu 22.04.4 LTS
nvidia-smi output
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 550.100 Driver Version: 550.100 CUDA Version: 12.4 |
|-----------------------------------------+------------------------+----------------------+
| GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|=========================================+========================+======================|
| 0 NVIDIA GeForce RTX 4090 Off | 00000000:01:00.0 Off | Off |
| 0% 49C P8 19W / 500W | 31MiB / 24564MiB | 0% Default |
| | | N/A |
+-----------------------------------------+------------------------+----------------------+
NVCC version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2023 NVIDIA Corporation
Built on Tue_Aug_15_22:02:13_PDT_2023
Cuda compilation tools, release 12.2, V12.2.140
Build cuda_12.2.r12.2/compiler.33191640_0
- 主要言語
- Cuda
- スター
- 671
- フォーク
- 122
- 平均マージ
- 4日 19時間
- マージ済み PR(30日)
- 10
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
NVIDIA/cuCollections のほかの issue
-
Add cuco::detail::stream_sync(cuda::stream_ref) to centralize CCCL version-specific API naming再び着手できるかも @0z5a が 25 日前に担当しましたが、オープン中のプルリクエストはありません。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
NVIDIA/cuCollections#840 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信
-
nvidia-runners
難易度 1/5 1〜3時間 初心者へのやさしさ 25/100
NVIDIA/cuCollections#853 ·
メンテナーはふだん 2 日以内に返信
-
topic: performance type: feature request
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
NVIDIA/cuCollections#817 · コメント 7 件 · リアクション 1 件 ·
メンテナーはふだん 2 日以内に返信
-
good first issue P2: Nice to have type: improvement
難易度 4/5 3〜5日 初心者へのやさしさ 38/100
NVIDIA/cuCollections#805 · コメント 4 件 ·
メンテナーはふだん 2 日以内に返信
-
[FEA] Add MPSC/MPMC concurrent queue再び着手できるかも @sleeepyjack が 265 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンtype: feature request
NVIDIA/cuCollections#791 · 担当者 1 名 ·
メンテナーはふだん 2 日以内に返信
NVIDIA/cuCollections の issue をすべて見る
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
datajoint/datajoint-python#1586 ·
メンテナーはふだん 1 日以内に返信
-
documentation good first issue hacktoberfest
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
libredb/libredb-studio#1755 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
-
bug good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
Bible-Research/bible_research#51 ·
メンテナーはふだん 6 日以内に返信