nsight-port-cpu-to-gpu
БесплатноБез исполняемых скриптовНе проверенGuide an agent through GPU-accelerating a codebase: setup interview, flavor-specific translation (Fortran OpenACC, Fortran OpenMP, C++ CUDA, C++ Kokkos), and…
от NVIDIA★ 4 269 звёзд на GitHubОб этом скилле
Nsight AI Porting Agent Skill (Router)
You guide a multi-phase GPU porting effort as an iterative round
loop. Phase 0 (setup) runs here, once. After the interview, run
the canonical porting round loop defined below
(plan → refactor → translate → assess → ask "another round?"),
using the flavor pack for GPU writing and flavors/{from_lang}/
for source-language NVIDIA Tools Extension (NVTX) markers and
refactoring.
NVIDIA Nsight Systems (nsys) is the profiler: its CLI profiles the application to identify porting targets and to assess each round. The nsys orchestrator supplies Phase 1 (plan from traces) and Phase 5 (re-profile and report). It does not own the loop. See The Porting Round Loop.
When Not to Use
- Tuning one already-ported kernel (occupancy, memory throughput, instruction mix) — use Nsight Compute.
- Python / PyTorch / JAX code — not supported; there is no flavor pack.
- CPU-only work (refactoring, bug fixes, serial optimization) with no intent to run on a GPU.
Flavor Packs
Resolve the active framework pack from config.json:
flavors/{to_lang}/{framework}/
| Target (interview) | to_lang |
framework |
Pack path |
|---|---|---|---|
| Fortran + OpenACC | fortran |
openacc |
flavors/fortran/openacc/ |
| Fortran + OpenMP | fortran |
openmp |
flavors/fortran/openmp/ |
| C/C++ + CUDA | cpp |
cuda |
flavors/cpp/cuda/ |
| C/C++ + Kokkos | cpp |
kokkos |
flavors/cpp/kokkos/ |
Read flavors/{to_lang}/{framework}/manifest.json for pack facts
(compiler, status, supported modes). Names are not in the manifest —
they follow one convention:
| Artifact | Framework | Language (Stage A only) |
|---|---|---|
| Sibling dir | {parent}/{framework}/ |
{parent}/{to_lang}/ |
| Symbol | {fn}_{framework} |
{fn}_{to_lang} dispatcher, {fn}_{to_lang}_host |
| Build env var | USE_{FRAMEWORK} |
USE_{TO_LANG}_TRANSLATION |
#ifdef guard |
config.json:include_guard |
USE_{TO_LANG}_TRANSLATION |
{FRAMEWORK} / {TO_LANG} are upper-cased. {fn}_{to_lang}_host
is the translated CPU body. Inline mode's frozen CPU copy is
{fn}_reference. include_guard defaults to USE_{FRAMEWORK} but
Q7 may override it, so always read the framework guard from
config.json, never construct it.
All four framework packs are complete. If a stub flavor is added
(manifest.status: "stub"), stop after the interview and tell the user
it is not yet fully supported.
Language-level docs (keyed on the language of the code you are editing):
flavors/{from_lang}/nvtx.md
flavors/{from_lang}/refactoring.md
When from_lang == to_lang, also read the framework addendum
flavors/{to_lang}/{framework}/refactoring.md. If framework is
kokkos, also read flavors/cpp/kokkos/nvtx.md.
Cross-language: a transition file (from_lang != to_lang)
When the source language differs from the target language (e.g. Fortran source → CUDA C++), also resolve the transition:
transitions/{from_lang}-to-{to_lang}.md
Setup Q2 only accepts a pair whose transition file exists and is
complete. Stage A names follow the language column of the table
above (Fortran → C++: cpp/, {function}_cpp, {function}_cpp_host,
USE_CPP_TRANSLATION).
The transition runs first (Stage A); the framework pack runs on
its output (Stage B). See Cross-Language Porting.
There is no *-cpu flavor pack.
Principles
- Correctness first. Build and run tests before proceeding.
- Incremental commits. Git-commit after each successful step.
- Verify scripts live in
.nsight-ai-port/. Use separate correctness and performance scripts. Follow the setup guide for naming and ownership. - Diagnose before fixing. Read errors, grep,
make -n, then fix. - Ask for help. Stop after 3 attempts per step (see Fault Tolerance).
- Subagents welcome. Delegate via subskills + flavor pack docs.
- Engagement controls diff review, never approval gates. See Approval Gates vs. Engagement Level.
- Log skill feedback. Mid-run corrections → append
entries[]. Wrap-up → writesession_summary(see skill-feedback-log.md). - Log usage at each commit. Before every git commit, append a
runtime/token/turn snapshot to
usage_log(fill only what you can observe; never estimate). See skill-feedback-log.md. - Record
last_working_commitafter every verified commit. Writegit rev-parse HEADintoprogress.json:last_working_commit. Follow the rollback protocol: preserve a recovery patch, validate every affected path, and reverse only agent-owned work after that SHA. Before any reversal, its mandatory fre
Установить nsight-port-cpu-to-gpu в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл nsight-port-cpu-to-gpu?
Guide an agent through GPU-accelerating a codebase: setup interview, flavor-specific translation (Fortran OpenACC, Fortran OpenMP, C++ CUDA, C++ Kokkos), and NVIDIA Nsight Systems (nsys) profile-guided orchestration. Use when porting HPC applications to GPU. Do not use for porting or optimizing individual standalone kernels.
Как установить скилл nsight-port-cpu-to-gpu?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл nsight-port-cpu-to-gpu запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic