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

Use of cuda::std::atomic is surprising

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

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

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
静か
技術スタック
cpp
領域
performance

調査の方向性

まず、ヘッダーが利用可能な場合に <cuda/std/atomic> へ切り替える atomics 選択ロジックを見つけ、次に Windows での cuda::std::atomic::wait の動作を WaitOnAddress と比較して調査します。CUDA atomics を回避する、または明示的に制御するために選択したポリシーを定義し、グローバルにインストールされた CUDA によって予期しない選択や高レイテンシの待機が発生しなくなったことを確認します。

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

説明

The code switches its whole atomics implementation to the one in CUDA if the <cuda/std/atomic> header is available. This can already be the case if CUDA is just installed globally or if the application uses CUDA in different parts and not for stdexec.

The problem is that on Windows, the cuda implementation is worse, for instance cuda::std::atomic<T>::wait seems to fall back to polling, instead of WaitOnAddress which leads to very high latencies (on the order of the scheduler tick of ~15 ms).

This is quite surprising and it would be good if it did not happen at all. Failing that it would be good if the switch were more explicit (maybe opt-in and fail if cuda atomics are needed for something?) and failing that it would be good if there was a way to easily disable the switch to cuda atomics.

主要言語
C++
スター
2.4k
フォーク
270
平均マージ
2日 16時間
マージ済み PR(30日)
43

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

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

NVIDIA/stdexec のほかの issue

NVIDIA/stdexec の issue をすべて見る

似ている issue

C++ の issue をもっと見る

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

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