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

Size computation slows bulk insert significantly

オープン
#237 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

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

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

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
cpp
領域
performance

調査の方向性

include/cuco/detail/static_map.inl の149-151行から始め、bulk insertion のプロファイリングを行って、device-to-host memcpy と同期のコストを確認してください。サイズの管理を計算または回避する代替案を比較し、その後、サイズ関連の動作を壊すことなく、bulk insert で報告された操作ごとのオーバーヘッドが発生しなくなったことを確認してください。

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

説明

P1: Should have type: feature request

The size computation requires a small memcpy from device to host and then a synchronization. Each one is the cause of serious performance degradation.

https://github.com/NVIDIA/cuCollections/blob/8786234a38a4d1283c6dc2011e45d14801510725/include/cuco/detail/static_map.inl#L149-L151

The synchronization is bad because it means that other unrelated streams are unable to do work.

The memcpy is bad because future copies are queued behind this one in architectures that have a limited number of cuda copy engines.

I was able to get a significant performance improvement by deleting these lines.

There ought to be a better way to compute size. Perhaps a lazy method. If this is too difficult, you might consider using templates to allow the user to choose to not maintain size_ at all! Use templates to change the type of size_ from int to a struct that has no members. That way it doesn't take up any space. Provide no methods on this struct so that the size_ doesn't get accidentally used. It will still use some space on the host but that seems like no big deal.

https://github.com/NVIDIA/cuCollections/issues/237#tasklist-block-efc3d0dd-74a4-4f46-b10e-d6fde965d057

主要言語
Cuda
スター
671
フォーク
122
平均マージ
4日 19時間
マージ済み PR(30日)
10

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

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

NVIDIA/cuCollections のほかの issue

NVIDIA/cuCollections の issue をすべて見る

似ている issue

Performance の issue をもっと見る

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

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