Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

[BUG] CAGRA multi-CTA and multi-kernel search over-allocate the hashmap they use

オープン 初心者向け
#2,856 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 2 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
70/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
cpp

調査の方向性

cpp/src/neighbors/detail/cagra/search_plan.cuh の calc_hashmap_params から始めてください。ここではハッシュマップのサイズをバイト単位で計算しています。search_single_cta.cuh(209〜210行目付近)の single-CTA プランと比較してください。こちらはリサイズの前にバイトを要素数に変換しています。次に、search_multi_cta.cuh(188行目付近)と search_multi_kernel.cuh(371行目付近)の対応する resize 呼び出しを確認してください。両方のパスが要素数を渡し、割り当てサイズが縮小することを確認できれば完了です。再現スクリプトはまだ実行していないため、編集する前にサイズを確認してください。

索引モデルが issue の本文から書いたものです。

説明

bug

Describe the bug

search_plan_impl::calc_hashmap_params stores the size of the global hashmap in bytes (search_plan.cuh#L375):

hashmap_size = sizeof(INDEX_T) * max_queries * hashmap::get_size(hash_bitlen);

hashmap is a lightweight_uvector<INDEX_T> (#L157), whose resize takes an element count and allocates new_size * sizeof(T) bytes from the workspace resource (#L62-L68). The single-CTA plan converts the size to an element count before resizing (search_single_cta.cuh#L209-L210). The multi-CTA and multi-kernel plans pass the byte count as if it were element count:

So both allocate 4x the table for uint32_t indices.
3/4 of each allocation is never touched.

Expected behavior

All functions should use the right units

主要言語
Cuda
スター
869
フォーク
243
平均マージ
3日 11時間
マージ済み PR(30日)
73

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

NVIDIA/cuvs のほかの issue

NVIDIA/cuvs の issue をすべて見る

似ている issue

Performance の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。