pandasで扱う表データ処理をcuDFでGPUへ移す作業を支援します。結合・集計・CSVやParquet入出力から、結果の照合、メモリ対策、複数GPU利用まで扱います。
- 既存pandas処理を少ない変更で加速
- 結合や集計をGPUへ移したいとき
- 欠損値や並び順をpandasと照合
CUDAの不正なメモリアクセスや共有メモリの競合、同期エラーを症状別に切り分け、NVIDIA Compute Sanitizerの選択・実行・報告の読み取りを案内するスキル。
Detect and diagnose CUDA correctness bugs with NVIDIA Compute Sanitizer. Routes GPU memory errors, shared-memory data races, uninitialized-memory reads, and synchronization/barrier bugs to the right sub-tool (memcheck, racecheck, initcheck, synccheck) and explains how to build, run, and read the report. Use when debugging illegal memory access, out-of-bounds, misaligned access, leaks, WAW/WAR/RAW races, __shared__ hazards, uninitialized reads, garbage results, hangs, divergent __syncthreads/__syncwarp, or cuda::barrier / wgmma issues. Do NOT use for host/CPU-side bugs (use valgrind or AddressSanitizer) or global-memory data races (out of scope). Trigger keywords - compute-sanitizer, memcheck, racecheck, initcheck, synccheck, CUDA memory error, OOB, race condition, uninitialized memory, __syncthreads, barrier, deadlock.
CUDAプログラムのGPU側の不具合を、NVIDIA Compute Sanitizerで診断するスキルです。症状に応じてmemcheck、racecheck、initcheck、synccheckを選び、ビルド、実行、レポートの読み取りを案内します。不正なアクセス、共有メモリの読み書きの競合、未初期化データの参照、同期処理の誤りを切り分け、報告されたソース行やスレッドから原因箇所を探ります。
CUDA処理が異常終了する、結果が実行ごとに変わる、同期処理で停止するといった場面に向いています。大きなアプリで検査するカーネルを絞る場合や、検出したエラーをCIの失敗に反映する場合にも使えます。
racecheckで診断して」 synccheckで調べて」nvccとcompute-sanitizerを含むCUDA Toolkit、および利用可能なCUDA対応GPUが必要です。ソース行の表示にはnvcc -lineinfoでビルドします。CPU側の不具合とグローバルメモリのデータ競合は対象外です。エラーがゼロでも、そのツールが扱う種類以外の不具合まで否定できません。
この紹介文は、公開されている SKILL.md をもとに AI(OpenAI Codex)が作成しました。正確な仕様は下の原文を確認してください。
インストールする前に、エージェントに与えられる指示の中身を確認できます。
NVIDIA Compute Sanitizer is a suite of four correctness tools for CUDA (memcheck, racecheck, initcheck, synccheck). This skill is a router: pick the right tool from the symptom below, then read the matching reference file for its flags, output format, and caveats before you run it. Do not guess flags — the details live in the reference.
When to use: finding and diagnosing GPU-side correctness bugs — illegal or out-of-bounds memory access, misaligned access, leaks, shared-memory races, uninitialized reads, and synchronization/barrier errors.
When NOT to use: host/CPU-side bugs (use valgrind or AddressSanitizer), pure functional/logic bugs unrelated to memory or races, or global-memory data races (out of scope — use iGUARD or SuperCollider).
nvcc and
compute-sanitizer on PATH.nvcc -lineinfo for source attribution (add -Xcompiler -rdynamic for host backtraces).| Input | Required? | Where it comes from |
|---|---|---|
Compiled CUDA application (ideally nvcc -lineinfo) | required | your build |
| Program run arguments | optional | how the app is normally launched |
| Observed symptom / bug class | optional | your report or the user (routes the tool) |
A Compute Sanitizer report on stdout/stderr with this structure:
========= COMPUTE-SANITIZER
========= <ERROR KIND> (e.g. Invalid __global__ read of size 4)
========= at <kernel>+<offset> in <file>:<line>
========= by thread (x,y,z) in block (x,y,z)
========= ERROR SUMMARY: N errors
N == 0 = clean for that tool; N > 0 = each block localizes one error by
file:line, thread, and block.
| Symptom in the report / behavior | Tool | Read before running |
|---|---|---|
Illegal / invalid memory access, out-of-bounds, misaligned, malloc/free error, CUDA API error, memory leak, stream-ordered alloc race | memcheck | references/memcheck.md |
Non-deterministic results from __shared__ memory; WAW / WAR / RAW hazard; cuda::barrier deadlock; cp.async / memcpy_async race | racecheck | references/racecheck.md |
| Garbage / uninitialized results; reads of memory never written; auditing allocated-but-unused memory | initcheck | references/initcheck.md |
Hang / deadlock or wrong results from synchronization; divergent __syncthreads() / __syncwarp(); bad barrier args; wgmma / warpgroup errors | synccheck | references/synccheck.md |
| Global (not shared) memory race | out of scope → use iGUARD or SuperCollider, not this skill | — |
Route directly to the tool the symptom names above — do not run a different tool first "to be safe." Only fall back to a memcheck-first triage (see the universal workflow) when the symptom is genuinely ambiguous or unknown.
nvcc -lineinfo -o app app.cu so reports carry
file:line. (Host backtraces: add -Xcompiler -rdynamic.)compute-sanitizer --tool <tool> [options] ./app [args]
(memcheck is the default --tool).========= ERROR SUMMARY: N errors.
0 errors = clean for that tool; N > 0 = read the per-error lines
(at <kernel>+<off> in <file>:<line>) to localize the bug.nvcc -fdevice-sanitize=memcheck) to catch adjacent-allocation overflows.
racecheck / initcheck / synccheck must use a vanilla -lineinfo binary —
a -fdevice-sanitize=memcheck binary corrupts their results.--padding N (no recompile) or rebuild with -fdevice-sanitize=memcheck.--error-exitcode 1 so a detected error fails the build (the tool
otherwise exits 0 even when it reports errors).mpirun, torchrun, python wrappers,
shell scripts). If CUDA runs in a child process and the tool "sees nothing,"
it is a process-tracking issue, not a clean program. compute-sanitizer follows
children by default (--target-processes all); on older toolkits that defaulted
to application-only, pass --target-processes all explicitly. To check only
specific ranks/binaries, use --target-processes-filter <name> or
--target-processes-filter regex:<pattern>.--kernel-name kns=<substr> (or --kernel-name-exclude) to check only matching
kernels, --launch-skip N to skip warm-up launches, and --launch-count M to
check only M launches.file:line often becomes precise under --force-blocking-launches
(serializes launches). Under heavy concurrency the tools can OOM — cap memory
with --force-synchronization-limit N.Real apps trip reports inside libraries you don't own (cuBLAS, cuDNN, framework internals) that can bury your bug. Filter known noise (never your own unresolved errors):
compute-sanitizer --xml --save report.xml ./app.report.xml down to the entries you want to hide and generalize them
(string fields may be regex); re-run with --suppressions report.xml ./app.compute-sanitizer --read <saved-file>.Only these report types are suppressible: CUDA API errors, initcheck uninitialized reads, and racecheck analysis reports — memcheck memory-access errors themselves cannot be suppressed (fix them or scope them out with filters).
For a hard-to-reproduce fault, dump GPU state at the first error and open it in a
debugger: compute-sanitizer --tool memcheck --generate-coredump yes [--coredump-name core.nvcudmp] ./app writes a .nvcudmp and aborts. Load it with
cuda-gdb → (cuda-gdb) target cudacore core.nvcudmp. Only threads that hit the
error are inspectable, and racecheck does not support coredumps. See
references/memcheck.md for the full workflow.
Compute Sanitizer ships with the CUDA Toolkit and changes every release — many "false positives," missing detections, and unsupported flags are fixed or added in a later version. Before deep-diving a surprising result or telling a user a feature is unavailable, check their version against the changelog:
compute-sanitizer --version.<version> — upgrade the CUDA Toolkit
to get it" rather than chasing a bug in their code. Cite the specific
release-notes entry so the advice is verifiable.This is especially valuable when helping remotely: a user's "compute-sanitizer
reports a bug that isn't real" or "my flag isn't recognized" is often just an old
toolkit. See references/changelog.md for the triage workflow and worked examples.
# Unknown bug class -> triage with memcheck (the default --tool) first
compute-sanitizer ./app
# Shared-memory race (WAW/WAR/RAW, __shared__ hazards)
compute-sanitizer --tool racecheck ./app
# Garbage / uninitialized results
compute-sanitizer --tool initcheck ./app
# Barrier / __syncthreads divergence, wgmma / warpgroup errors
compute-sanitizer --tool synccheck ./app
# Adjacent-allocation OOB that memcheck missed in binary mode (no recompile)
compute-sanitizer --tool memcheck --padding 256 ./app
# Fail CI when an error is detected
compute-sanitizer --tool memcheck --error-exitcode 1 ./app
# App launched via a wrapper / MPI / torchrun -> follow children (+ filter one binary)
compute-sanitizer --target-processes all --target-processes-filter regex:my_app ./launch.sh
# Big app: check one kernel, skip warm-up, limit to a few launches
compute-sanitizer --kernel-name kns=myKernel --launch-skip 10 --launch-count 5 ./app
# Filter known third-party noise: capture, then suppress
compute-sanitizer --xml --save report.xml ./app
compute-sanitizer --suppressions report.xml ./app
# Coredump on first error, then inspect in cuda-gdb
compute-sanitizer --generate-coredump yes ./app # then: cuda-gdb -> target cudacore *.nvcudmp
wgmma on Hopper+); a test may be
waived or skipped on unsupported GPUs.file:line in reports → rebuild with nvcc -lineinfo.-fdevice-sanitize=memcheck binary; rebuild vanilla -lineinfo.compute-sanitizer: command not found → add the CUDA Toolkit bin/ to
PATH.--error-exitcode 1.--target-processes all (+
--target-processes-filter).file:line → re-run with --force-blocking-launches
to make it precise (and confirm -lineinfo).--xml --save and re-run with --suppressions (CUDA API / initcheck / racecheck
analysis reports only).references/changelog.md).Each file is a full, standalone guide for one tool (build specifics, every flag, annotated output, log-grep recipes, limitations):
references/memcheck.md — memory errors, leaks, API errors, padding, compile-time modereferences/racecheck.md — shared-memory WAW/WAR/RAW, hazard vs analysis report, deadlocksreferences/initcheck.md — uninitialized reads, unused-memory audit, address spacesreferences/synccheck.md — barrier divergence, invalid args, wgmma, cuda::barrierreferences/changelog.md — check installed version vs release notes; map a symptom to a fixed bug / added feature and advise upgradeまだレビューはありません。使ってみた感想をお寄せください。
ログインなしで書き込めます。使ってみた感想、質問、動かなかった環境などを気軽にどうぞ。
まだコメントはありません。最初のコメントを書いてみませんか。
pandasで扱う表データ処理をcuDFでGPUへ移す作業を支援します。結合・集計・CSVやParquet入出力から、結果の照合、メモリ対策、複数GPU利用まで扱います。
NVIDIA Nemotron Voice Agentのサンプルを変更し、別のバックエンドを設けずに予約受付や患者情報の聞き取りを行う音声エージェントを作るスキル。
ライブカメラのRTSP映像をVIOSで録画し、AutoMagicCalibでカメラ校正を進めます。設定や位置合わせ資料の取り込み、進捗確認、結果取得まで扱います。
同梱の倉庫カメラ映像でAMCのカメラ校正を一通り実行し、正解データとの誤差を確認します。導入後の動作検証や、実データ投入前の確認に使えます。
録画済みの複数カメラ映像をAutoMagicCalibに送り、カメラの位置や向きを調整する処理を、プロジェクト作成から進捗確認・結果評価まで進めます。
AutoMagicCalibの自動キャリブレーション環境をDocker Composeで構築し、NGC認証からポート設定、サービスとWeb UIの起動確認まで進めます。