Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

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от 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 → write session_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_commit after every verified commit. Write git rev-parse HEAD into progress.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
Полный SKILL.md на GitHub

Установить nsight-port-cpu-to-gpu в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

BENCHMARK.mdassets/config-template.jsonassets/nsight-port-gitignore-templateassets/progress-template.jsonassets/skill_feedback-template.jsonassets/test-harness/compare_field.f90assets/test-harness/compare_field.hppevals/EVAL.mdevals/config.ymlevals/evals.jsonevals/files/advection/Makefileevals/files/advection/advection_code.f90flavors/cpp/cuda/build-integration.mdflavors/cpp/cuda/device-utils.mdflavors/cpp/cuda/manifest.jsonflavors/cpp/cuda/patterns.mdflavors/cpp/cuda/refactoring.mdflavors/cpp/cuda/translation.mdflavors/cpp/kokkos/build-integration.mdflavors/cpp/kokkos/device-utils.mdflavors/cpp/kokkos/manifest.jsonflavors/cpp/kokkos/nvtx.mdflavors/cpp/kokkos/patterns.mdflavors/cpp/kokkos/refactoring.mdflavors/cpp/kokkos/translation.mdflavors/cpp/nvtx.mdflavors/cpp/refactoring.mdflavors/fortran/nvtx.mdflavors/fortran/openacc/build-integration.mdflavors/fortran/openacc/device-utils-inline.mdflavors/fortran/openacc/device-utils-sibling.mdflavors/fortran/openacc/device-utils.mdflavors/fortran/openacc/manifest.jsonflavors/fortran/openacc/patterns.mdflavors/fortran/openacc/refactoring.mdflavors/fortran/openacc/translation-inline.mdflavors/fortran/openacc/translation-sibling.mdflavors/fortran/openacc/translation.mdflavors/fortran/openmp/build-integration.mdflavors/fortran/openmp/device-utils-inline.md

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), без исполняемых скриптов.

Похожие скиллы

Сравнить nsight-port-cpu-to-gpu с