Official agent skill

Intel GPU Device Selection

by intel in intel/torch-xpu-ops

Select the Intel GPU device to use when a system has multiple Intel GPU devices.

OfficialMITAuto-check passed

Install Intel GPU Device Selection

skills CLI
$ npx skills add intel/torch-xpu-ops --skill intel-gpu-device-selection -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install intel/torch-xpu-ops intel-gpu-device-selection --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/intel/torch-xpu-ops.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/action/intel-gpu-device-selection .claude/skills/intel-gpu-device-selection && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
intel-gpu-device-selection
GitHub stars
115
Token cost
~508 tokens
SKILL.md length
199 words
Files
2 (incl. scripts)
Skills in repo
29
Repo updated
First seen
Licence
MIT

At a glance

Select the Intel GPU device to use when a system has multiple Intel GPU devices.

  • Works in 3 steps: Detect Level Zero GPU devices → Select the target device → Set ZE_AFFINITY_MASK
  • A system has multiple Intel GPU devices
  • Runs Python scripts from its folder; calls python3
  • The user wants to run a workload on Intel GPU

What it does

Intel GPU Device Selection is an agent skill from intel/torch-xpu-ops, published by the product's own GitHub organization. Select the Intel GPU device to use when a system has multiple Intel GPU devices. Use this skill when the user wants to run a workload on Intel GPU, mentions device selection, ZEAFFINITYMASK, or when multiple Level Zero GPU devices are detected and one must be chosen.

Its SKILL.md is about 510 tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files, including scripts (for example `scripts/l0_igpu_check.py`).

The licence is MIT.

When your agent uses it

  • A system has multiple Intel GPU devices
  • The user wants to run a workload on Intel GPU
  • Mentions device selection
  • Multiple Level Zero GPU devices are detected and one must be chosen

Example prompts

  • “/intel-gpu-device-selection”

Requirements

  • Python 3

Workflow steps

3 steps, taken from the step headings in SKILL.md.

  1. Detect Level Zero GPU devices
  2. Select the target device
  3. Set ZE_AFFINITY_MASK

What it can do on your machine

Read from SKILL.md and the folder at commit 0187b3b. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • python3

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Intel GPU Device Selection loads about 508 tokens when it runs. Until then it costs about 74 tokens; SKILL.md has 199 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~74
When it runs · the whole SKILL.md, loaded when a task matches
~508

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from intel/torch-xpu-ops at commit 0187b3b, republished under its MIT licence (© intel). 199 words, ~508 tokens.

Download SKILL.mdSave it as .claude/skills/intel-gpu-device-selection/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
intel-gpu-device-selection
description
Select the Intel GPU device to use when a system has multiple Intel GPU devices. Use this skill when the user wants to run a workload on Intel GPU, mentions device selection, ZE_AFFINITY_MASK, or when multiple Level Zero GPU devices are detected and one must be chosen.
license
MIT
metadata.XPU
Intel GPU

Intel GPU Device Selection

Select a single Intel GPU device via ZE_AFFINITY_MASK when multiple Level Zero GPU devices are present.

This skill does NOT set ZE_FLAT_DEVICE_HIERARCHY. On PVC, the default is FLAT (each tile is a separate device). On other platforms, the default is COMPOSITE (tiles merged into one device). If the user needs to override this, they must set it explicitly before running this skill.

Instructions

Step 1: Detect Level Zero GPU devices
bash
sycl-ls | grep -i level_zero

If sycl-ls is not available, use the "source-oneapi" skill first.

Only consider lines matching [level_zero:gpu][level_zero:<index>].

Step 2: Select the target device
  • 0 devices found: Stop. Report: "No Level Zero GPU device was found. Check GPU driver, Level Zero runtime, and oneAPI environment."
  • 1 device found: Use its index. Proceed to Step 3.
  • Multiple devices found: If the list contains both discrete and integrated GPUs, select the discrete GPU by default. If there are multiple discrete GPUs, ask the user to select. Do NOT proceed until a valid index is determined.

To distinguish dGPU from iGPU, run the bundled script:

bash
python3 .claude/skills/action/intel-gpu-device-selection/scripts/l0_igpu_check.py

Output labels each GPU as iGPU or dGPU based on the Level Zero ZE_DEVICE_PROPERTY_FLAG_INTEGRATED flag.

Prompt format when user selection is needed:

text
Multiple Level Zero GPU devices found:
<device list from sycl-ls>

Which device should be used? Enter the device index (e.g., 0):
Step 3: Set ZE_AFFINITY_MASK
bash
export ZE_AFFINITY_MASK=<selected index>

© intel, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file (scripts) in .claude/skills/action/intel-gpu-device-selection of intel/torch-xpu-ops.

  • SKILL.md
  • scripts/l0_igpu_check.py

Open the folder on GitHubat commit 0187b3b

Compare with similar skills

Intel GPU Device Selection next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Intel GPU Device Selection compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Intel GPU Device Selection this skillintel/torch-xpu-ops115—~508Automated safety check: PassMIT
Optimize For GPUK-Dense-AI/scientific-agent-skills48k1 repos~3.4kAutomated safety check: PassMIT
GPU Kubernetes Operationssickn33/agentic-awesome-skills47k2 repos~3.2kAutomated safety check: PassMIT
Select Namethedaviddias/Front-End-Checklist74k—~451Automated safety check: PassMIT
Engine Selectionsickn33/agentic-awesome-skills47k1 repos~1.2kAutomated safety check: PassMIT
Modal Serverless GPUOrchestra-Research/AI-Research-SKILLs13k5 repos~2.1kAutomated safety check: PassMIT

Similar skills

  • Optimize For GPU

    K-Dense-AI/scientific-agent-skills

    GPU-accelerates scientific Python on NVIDIA hardware and verifies that the result is correct and faster.

    48k GitHub starsUsed in 1 repo~3.4k tokens
    Data & AnalyticsAuto-check passed
  • GPU Kubernetes Operations

    sickn33/agentic-awesome-skills

    Operate GPU-backed Kubernetes clusters for AI inference and training with scheduling, autoscaling, node health, MIG partitioning, and cost controls.

    47k GitHub starsUsed in 2 repos~3.2k tokens
    DevOps & CloudAuto-check passed
  • Select Name

    thedaviddias/Front-End-Checklist

    A skill your agent uses when reviewing rendered HTML, interactive components, or design-system patterns related to Provide accessible names for select elements.

    74k GitHub stars~451 tokensUpdated yesterday
    Frontend & DesignAuto-check passed
  • Engine Selection

    sickn33/agentic-awesome-skills

    Selects game engines and frameworks by platform, genre, and architecture (full canvas shell vs hybrid DOM shell + guest viewport).

    47k GitHub starsUsed in 1 repo~1.2k tokens
    Game DevelopmentAuto-check passed
  • Modal Serverless GPU

    Orchestra-Research/AI-Research-SKILLs

    Serverless GPU cloud platform for running ML workloads. An agent skill from Orchestra-Research/AI-Research-SKILLs.

    13k GitHub starsUsed in 5 repos~2.1k tokens
    Backend & APIsAuto-check passed
  • Official

    Runs the ONNX Runtime transformers Python tests against a GPU wheel and proves the cuDNN flash attention path was used rather than a silent fallback.

    22k GitHub stars~2.9k tokensUpdated today
    Testing & QAAuto-check passed

More from intel/torch-xpu-ops

All 29 skills in this repo
  • Xpu CI Health Check

    intel/torch-xpu-ops

    Official

    Check PyTorch ciflow/xpu (xpu.yml) on the main branch, collect the failing XPU test cases from the most recent completed run(s), analyze the ROOT CAUSE of each failure with AI, and produce a list…

    115 GitHub stars~1.5k tokensUpdated yesterday
    Auto-check passed
  • At Dispatch V2

    intel/torch-xpu-ops

    Official

    Convert PyTorch ATDISPATCH macros to ATDISPATCHV2 format in ATen C++ code.

    115 GitHub starsUsed in 3 repos~2.2k tokens
    Auto-check passed
  • PR Review

    intel/torch-xpu-ops

    Official

    Review pull requests for XPU operator or backend code. An agent skill from intel/torch-xpu-ops.

    115 GitHub stars~4.2k tokensUpdated yesterday
    Auto-check passed
  • Skill Writer

    intel/torch-xpu-ops

    Official

    Guide users through creating Agent Skills for Claude Code. An agent skill from intel/torch-xpu-ops.

    115 GitHub starsUsed in 3 repos~2.4k tokens
    Auto-check passed
  • Ut Issue Authoring

    intel/torch-xpu-ops

    Official

    Read the evidence a nightly UT run produced, decide which failures share a root cause and which are machine breakage rather than product bugs, and write one issue draft per root cause to drafts.json.

    115 GitHub stars~2k tokensUpdated yesterday
    Auto-check passed
  • Ut Refactor Review

    intel/torch-xpu-ops

    Official

    Review PyTorch upstream unit-test (UT) PRs that enable Intel GPU (XPU) on existing tests.

    115 GitHub stars~917 tokensUpdated yesterday
    Auto-check passed

Questions about Intel GPU Device Selection

What does Intel GPU Device Selection do?

Select the Intel GPU device to use when a system has multiple Intel GPU devices. Intel GPU Device Selection is an agent skill from intel/torch-xpu-ops, published by the product's own GitHub organization. Select the Intel GPU device to use when a system has multiple Intel GPU devices.

When should I use Intel GPU Device Selection?

Intel GPU Device Selection fits situations like: A system has multiple Intel GPU devices; the user wants to run a workload on Intel GPU; mentions device selection; multiple Level Zero GPU devices are detected and one must be chosen.

How do I install Intel GPU Device Selection in Claude Code?

Run `npx skills add intel/torch-xpu-ops --skill intel-gpu-device-selection -a claude-code`. Or copy the skill folder (.claude/skills/action/intel-gpu-device-selection in intel/torch-xpu-ops) into .claude/skills/intel-gpu-device-selection in your project. Claude Code loads it when a task matches its description.

How do I install Intel GPU Device Selection in Codex?

Run `npx skills add intel/torch-xpu-ops --skill intel-gpu-device-selection -a codex`. Or copy the skill folder (.claude/skills/action/intel-gpu-device-selection in intel/torch-xpu-ops) into .agents/skills/intel-gpu-device-selection in your project. Codex loads it when a task matches its description.

Can I use Intel GPU Device Selection in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add intel/torch-xpu-ops --skill intel-gpu-device-selection -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/intel-gpu-device-selection, .gemini/skills/intel-gpu-device-selection, .github/skills/intel-gpu-device-selection and .opencode/skills/intel-gpu-device-selection in your project.

What does Intel GPU Device Selection need to run?

Going by SKILL.md and its folder, Intel GPU Device Selection needs Python for the scripts in its folder and the command-line tools its instructions call (python3). Our summary lists: Python 3.

Does Intel GPU Device Selection access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Intel GPU Device Selection safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Intel GPU Device Selection use?

Intel GPU Device Selection is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Intel GPU Device Selection use?

About 508 tokens (SKILL.md is roughly 2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Intel GPU Device Selection?

Skills that share tags, products or a category with Intel GPU Device Selection: Optimize For GPU (K-Dense-AI/scientific-agent-skills, 48k stars), GPU Kubernetes Operations (sickn33/agentic-awesome-skills, 47k stars), Select Name (thedaviddias/Front-End-Checklist, 74k stars) and Engine Selection (sickn33/agentic-awesome-skills, 47k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Intel GPU Device Selection?

intel (a GitHub organization, an official publisher) maintains it in intel/torch-xpu-ops, which has 115 GitHub stars. The repository holds 29 skills in this directory. The repository was last updated on October 6, 2026.

Source: intel/torch-xpu-ops on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.