[FEA]: cuda.core sample for Grace Hopper memory (ATS, host/GPU NUMA, C2C)
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 55/100
- issue の種類
- 機能追加
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- python
調査の方向性
Read the existing samples/cuda_core/memoryResources and systemWideAtomics samples for directory, waiver, and kernel conventions; the requested entry point is samples/cuda_core/graceHopperMemory. Implement and document the topology, ATS, bandwidth, and managed-memory demonstrations, then measure the README example output on GH200. Done means the sample checks the ATS result, exits with waiver code 2 when host page tables are unavailable, and reports measured results.
索引モデルが issue の本文から書いたものです。
説明
Is this a duplicate?
- I confirmed there appear to be no duplicate issues for this request and that I agree to the Code of Conduct
Area
cuda.core
Is your feature request related to a problem? Please describe.
cuda.core already exposes the Grace Hopper memory topology:
Device.propertieshasnuma_config,numa_id,host_numa_id,pageable_memory_accessandpageable_memory_access_uses_host_page_tables.system.Devicehasis_c2c_enabled.PinnedMemoryResourceOptionstakesnuma_id.ManagedBuffer.prefetchtakesHost(numa_id=...).
The tests only check the types these return, and no sample shows what they mean on a system where they matter:
memoryResourcesuses host-NUMA pinning.- The bindings sample
systemWideAtomicsuses pageable access. - Nothing shows ATS, meaning pageable memory served through the host page tables, or a C2C link.
Describe the solution you'd like
A new sample, samples/cuda_core/graceHopperMemory, following the sample conventions: its own directory, README.md, requirements.txt, and waiver exit code 2.
- Topology: print the properties above, plus
system.Device.is_c2c_enabled. - ATS:
- A kernel reads and writes a plain NumPy array (system-allocated, pageable) in place, with no copy, and the result is checked.
- If
pageable_memory_access_uses_host_page_tablesis False, the sample exits with the waiver code.
- Read bandwidth: time the same read kernel over three memory types: pinned memory bound to
host_numa_id(PinnedMemoryResourceOptions(numa_id=...)), pageable (ATS), and device memory. - Managed memory: time a kernel on a
ManagedMemoryResourcebuffer afterprefetch(Host(numa_id=host_numa_id)), and again afterprefetch(device). - README: example output measured on GH200, not theoretical numbers.
Describe alternatives you've considered
Extend memoryResources. It is already long, and the ATS and C2C parts only run on Grace-based systems, so a separate sample with its own waiver seems cleaner.
Additional context
A probe with the same steps already runs.
On an x86 B300 host:
pageable_memory_accessis True, through HMM.pageable_memory_access_uses_host_page_tablesis False.is_c2c_enabledis False.- So the sample would correctly exit 2 there.
On GH200 (cc 9.0, driver 595.58.03, CUDA 13.4.2):
numa_config= 1,numa_id= 1,host_numa_id= 0.pageable_memory_access,pageable_memory_access_uses_host_page_tables,concurrent_managed_accessandis_c2c_enabledare all True.- The kernel on the plain NumPy array returns the correct result.
One read-sum kernel over 1 GiB, median of 10 launches, three runs:
| Memory | GB/s |
|---|---|
| Pinned, host NUMA node 0 | 339–345 |
| Pageable NumPy array (ATS) | 224–225 |
| Device | 2386–2417 |
Managed, first kernel after prefetch(Host(numa_id=0)) |
5.1–5.4 (about 200 ms) |
Managed, after prefetch(device) |
2380–2393 |
The managed host row is the one the sample would explain. Managed memory that sits on the host is migrated on the GPU's first touch, so that first kernel pays for moving 1 GiB. The same bytes as a pageable NumPy array are read in place over C2C at about 224 GB/s.
The kernel is a plain grid-stride read with one atomic per block, not a tuned copy, so the device number is below HBM peak. The sample would present these as relative numbers.
Before writing the sample: would you take it? Is samples/cuda_core/ the right place, and are CuPy-free kernels via Program preferred, as in the other samples?
- 主要言語
- Cython
- スター
- 3.4k
- フォーク
- 353
- 平均マージ
- 2日 3時間
- マージ済み PR(30日)
- 163
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
NVIDIA/cuda-python のほかの issue
-
[BUG]: the `__cuda_stream__` deprecation warning points to `Stream(obj)`, which always raises対応中かも @Iamsohungrynow が 5 日前に担当しました。 オープンbug cuda.core P1
難易度 1/5 1時間未満 初心者へのやさしさ 86/100
NVIDIA/cuda-python#3505 · コメント 3 件 · リアクション 1 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
[BUG]: ProcessInfo.used_gpu_memory returns the NVML_VALUE_NOT_AVAILABLE sentinel as a byte countオープンtriage
難易度 2/5 1〜3時間 初心者へのやさしさ 80/100
NVIDIA/cuda-python#3468 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
triage
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
NVIDIA/cuda-python#3409 ·
メンテナーはふだん 1 日以内に返信
-
[BUG]: cleanup-pr-previews never removes previews of deleted PRs再び着手できるかも @rwgk が 48 日前に担当しましたが、オープン中のプルリクエストはありません。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
NVIDIA/cuda-python#2952 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
[BUG]: LocatedHeaderDir is mutable, so callers can poison the cached header-directory lookup対応中かも @rwgk が 62 日前に担当しました。 オープンtriage
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
NVIDIA/cuda-python#2646 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
NVIDIA/cuda-python の issue をすべて見る
似ている issue
-
Document the isv:HDFGroup Linux package repositories and signing key対応中かも @brtnfld が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
aws-documentation-mcp-server: empty spanning headers shift table column labels対応中かも @pradeep-ramola が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 2 日以内に返信
-
docs
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
open-telemetry/opentelemetry.io#12846 ·
メンテナーはふだん 1 日以内に返信
-
Shorten and organize the README around reader tasks対応中かも @msaad00 が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
awslabs/social-messaging-agent-runtime-toolkit#257 ·
メンテナーはふだん 6 日以内に返信