cuda-to-xpu-migration
Create a CUDA-to-XPU migration assessment for an existing AI repo. Identify CUDA-specific assumptions, route to the right XPU skills, produce a migration…
от intel★ 54 звезды на GitHub
Установить cuda-to-xpu-migration в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
cuda-to-xpu-migration
Create a migration assessment for CUDA-oriented repos that want an Intel XPU path.
Scope
This skill is for assessment and planning only.
- Identify CUDA-specific assumptions and likely migration surfaces.
- Reuse existing skills for code translation, runtime setup, serving, profiling, and sizing.
- Produce a clean migration report with recommended edits, blockers, and next steps.
- Do not execute or validate migrated code.
- Do not duplicate detailed commands or framework runbooks that are already covered by other skills.
Always assess; route forward once
This skill assesses the workflow verbs — "assess", "migrate", "convert", "move" — with the same read-only pass: inventory, classify, report. A request that says "port" (or otherwise names the rewrite explicitly) belongs to xpu-port, not here; route it there. For the workflow verbs, do not bounce the request away before the report exists: a mis-routed execution request costs one cheap read-only assessment, while the reverse mis-route would rewrite a user's repo unasked.
The report's Next steps (with the "Non-namespace CUDA surfaces → Route" table) is the single onward-routing authority. It names the executor for each surface — xpu-port for portable Python, xpu-deploy-plan for API-first / serving repos, container and runtime skills per tier. Routing flows one way, assess → execute; nothing here routes backward.
Use with
- xpu-discover for an XPU environment / driver preflight check before recommending a migration target.
- xpu-runtime-preflight for a read-only go/no-go check of host/container XPU readiness (drivers, /dev/dri, permissions, runtime, and essentials) before any XPU workload.
- torch-xpu-run for PyTorch / Transformers CUDA-to-XPU code translation guidance.
- xpu-container-run for container runtime setup on Intel GPU.
- vllm-xpu-run for vLLM launch and runtime guidance.
- sglang-xpu-run for SGLang launch and runtime guidance.
- model-can-it-fit and model-config-recommend for fit and config decisions.
- xpu-deploy-plan for a coordinated end-to-end serving plan (preflight → fit → config → launch → smoke test) once the assessment routes an API-first / serving-stack repo to a local XPU endpoint.
Migration flow
Inventory
- If the request is a git URL (not a local path), shallow-clone it to a stated scratch location first (e.g.
git clone --depth 1 <url> /tmp/<repo>-assess) and assess that path. State the clone target before scanning — do not assess a URL from memory. - If the user's request does not include a repo path, search the local workspace for the relevant scripts or repo (e.g.
find ~/workspace -name "*.sh" -path "*vllm*"). State which path you are assessing before running the scan — do not silently assume a location. - Run
scripts/inventory.shfrom the target repo root to surface CUDA/NVIDIA references and common launch/runtime surfaces. - Group findings by area: framework code, runtime/container, serving stack, Triton kernels, and CUDA-native dependencies.
- Notebooks:
inventory.shgreps.ipynbfiles as text, so CUDA references in notebook cells are surfaced. Notebook code cells are not directly rewritable: for a notebook-heavy repo, flag that code cells need extraction to.py(or hand-porting) before the port executes, and note it under "Needs version-aware review".
- If the request is a git URL (not a local path), shallow-clone it to a stated scratch location first (e.g.
Classify
- Safe translation candidates: portable PyTorch / Transformers code.
- Runtime changes: container flags, environment variables, launch scripts.
- Version-sensitive changes: vLLM / SGLang internals and plugin code.
- Likely blockers: CUDA extensions, CuPy, NCCL, TensorRT, flash-attn, bitsandbytes, cuBLAS / CUTLASS / cuTENSOR / cuSPARSE / cuDNN consumers, custom
.cu/.cuhcode. - Cloud-API / provider references (not CUDA): many "NVIDIA" hits are HTTP-client calls, not local GPU code — NVIDIA NIM (
integrate.api.nvidia.com,langchain-nvidia-ai-endpoints,build.nvidia.com), or unrelated cloud services (ElevenLabs, OpenAI). These do not need a CUDA port. Classify them as: provider swap (retarget a local vLLM-XPU / SGLang-XPU OpenAI-compatible endpoint and change theapi_base/ model name — no Python rewrite) or unaffected (GPU-agnostic cloud dependency, e.g. a TTS API). Do not count these toward the CUDA migration surface — the pdf-to-podcast blueprint had ~170 grep hits at the time of assessment (upstream is unpinned, so the exact count drifts) and zero actual CUDA code.
Route
- For XPU environment / driver preflight, use xpu-discover.
- For PyTorch / Transformers code translation, use torch-xpu-run.
- For container changes, use xpu-container-run.
- For vLLM / SGLang serving paths, use vllm-xpu-run or sglang-xpu-run.
- For deployment and capacity planning, use model-can-it-fit, and model-config-recommend.
- For non-namespace CUDA const
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
- scripts/inventory.sh
- templates/migration_report.md
FAQ
Что делает скилл cuda-to-xpu-migration?
Create a CUDA-to-XPU migration assessment for an existing AI repo. Identify CUDA-specific assumptions, route to the right XPU skills, produce a migration report. Use when the user has a CUDA repo, notebook, Dockerfile, launch script, HF / vLLM / SGLang workload, or Triton kernel and asks to migrate it to Intel Arc / Arc Pro / Battlemage / XPU — including "convert this to XPU" / "move it to XPU" and the bare "migrate this repo" request where scope is not yet set. A request that says "port" routes to xpu-port. Plans and routes only. Not for executing an already-scoped rewrite (use xpu-port), running migrated code, or measuring it.
Как установить скилл cuda-to-xpu-migration?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл cuda-to-xpu-migration запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
docx
AnthropicUse this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include…
AnthropicUse this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple…
xlsx
AnthropicUse this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing…
pptx
AnthropicUse this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or…