Agent skill

Quark Torch Install

by amd in amd/Quark

Install or verify the correct PyTorch build for a user's accelerator backend before Quark installation.

MITAuto-check passedAI & LLM Engineering

Install Quark Torch Install

skills CLI
$ npx skills add amd/Quark --skill quark-torch-install -a claude-code

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

GitHub CLI
$ gh skill install amd/Quark quark-torch-install --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/amd/Quark.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills-impl/l1-atomic/torch/quark-torch-install .claude/skills/quark-torch-install && 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
quark-torch-install
GitHub stars
181
Token cost
~1.6k tokens
SKILL.md length
614 words
Files
1
Skills in repo
37
Repo updated
First seen
Licence
MIT

At a glance

Install or verify the correct PyTorch build for a user's accelerator backend before Quark installation.

  • Works in 4 steps: Open tools/ci/install_torch.sh and… → Extract the accelerator identifier… → Extract the supported PyTorch version… → …
  • The user needs PyTorch set up
  • SKILL.md covers Purpose, Inputs, Outputs:… and Python Version Requirements, plus 6 more sections
  • Calls pip and python; reaches download.pytorch.org

What it does

Quark Torch Install is an agent skill from amd/Quark. Install or verify the correct PyTorch build for a user's accelerator backend before Quark installation. Use when the user needs PyTorch set up, reports torch version conflicts, CUDA/ROCm package mismatches, or when torch.cuda.isavailable() returns False. Trigger for "install PyTorch", "pip install torch", "set up torch for ROCm", "set up torch for CUDA", "torch version mismatch", "CPU-only torch installed", or any request to get the correct PyTorch build running. Also trigger when quark-install reports that…

Its SKILL.md is about 1.6k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in AI & LLM Engineering, covering Deep learning. It works with PyTorch, CUDA and Python. The licence is MIT.

When your agent uses it

  • The user needs PyTorch set up
  • Reports torch version conflicts
  • CUDA/ROCm package mismatches
  • Torch.cuda.isavailable() returns False

Example prompts

  • “install PyTorch”
  • “pip install torch”
  • “set up torch for ROCm”
  • “/quark-torch-install”

Requirements

  • Python 3

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. Open tools/ci/install_torch.sh and locate the version arrays or case/if blocks that map accelerator tags to PyTorch versions.
  2. Extract the accelerator identifier (e.g., rocm7.1, cu126, cpu).
  3. Extract the supported PyTorch version list for that accelerator.
  4. Construct the install command using the pattern below.

What it can do on your machine

Read from SKILL.md and the folder at commit 313cb0b. 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

    Shell commands in SKILL.md call:

    • pip
    • python

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

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • download.pytorch.org

    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

Quark Torch Install loads about 1.6k tokens when it runs. Until then it costs about 146 tokens; SKILL.md has 614 words of instructions outside code blocks.

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

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); files beside SKILL.md are not scanned.

SKILL.md

The full file from amd/Quark at commit 313cb0b, republished under its MIT licence (© amd). 614 words, ~1,611 tokens.

Download SKILL.mdSave it as .claude/skills/quark-torch-install/SKILL.md (or your agent's skills folder).
name
quark-torch-install
description
Install or verify the correct PyTorch build for a user's accelerator backend before Quark installation. Use when the user needs PyTorch set up, reports torch version conflicts, CUDA/ROCm package mismatches, or when torch.cuda.is_available() returns False. Trigger for "install PyTorch", "pip install torch", "set up torch for ROCm", "set up torch for CUDA", "torch version mismatch", "CPU-only torch installed", or any request to get the correct PyTorch build running. Also trigger when quark-install reports that PyTorch is missing or mismatched before proceeding.
layer
l1-atomic
primary_artifact
pytorch_install_result.json
source_knowledge
tools/ci/install_torch.sh, docs/source/install.rst

quark-torch-install

Purpose

Install the correct PyTorch build for the user's accelerator backend. PyTorch must be installed before Quark because Quark depends on PyTorch at both install time and runtime. Getting this wrong — installing the CPU build on a GPU machine, or mixing a CUDA-built PyTorch with a ROCm environment — causes cryptic failures that are hard to diagnose later. This skill exists separately from quark-install so that PyTorch setup has a clear, single-responsibility boundary.

Inputs

  • env_context.json with detected accelerator info

Outputs: pytorch_install_result.json

Records the installed PyTorch build, accelerator backend tag, and verification status.

Schema: pytorch_install_result.schema.json

json
{
  "status": "ok",
  "pytorch_version": "2.5.1+cu126",
  "accelerator_tag": "cu126",
  "torchvision_version": "0.20.1+cu126",
  "torchaudio_version": "2.5.1+cu126",
  "verification": {
    "import_ok": true,
    "cuda_available": true,
    "gpu_count": 1
  }
}

On failure, set status: "failed" and include a failure_reason with the exact failing verification command.

Python Version Requirements

  • Supported: Python 3.11, 3.12, 3.13
  • Not supported: Python 3.14+
  • Recommended for new setups: Python 3.13 via Miniforge/Miniconda

PyTorch Version Matrix

Authoritative source: tools/ci/install_torch.sh

Before generating install commands, always read this script to get the current list of verified accelerator/PyTorch combinations. The script defines which PyTorch versions are tested with each accelerator backend (ROCm, CUDA, CPU) and the corresponding --index-url values.

How to read the source
  1. Open tools/ci/install_torch.sh and locate the version arrays or case/if blocks that map accelerator tags to PyTorch versions.
  2. Extract the accelerator identifier (e.g., rocm7.1, cu126, cpu).
  3. Extract the supported PyTorch version list for that accelerator.
  4. Construct the install command using the pattern below.
Install command pattern
bash
# ROCm — torchvision only, no torchaudio
pip install torch torchvision --index-url https://download.pytorch.org/whl/<rocm_tag>

# CUDA — includes torchaudio
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/<cuda_tag>

# CPU — includes torchaudio
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu

Replace <rocm_tag> with the ROCm version tag (e.g., rocm6.4, rocm7.0, rocm7.1) and <cuda_tag> with the CUDA version tag (e.g., cu118, cu126, cu128, cu130). Always use the exact tags from install_torch.sh.

Critical: Never use bare pip install torch for GPU setups — it installs the CPU version by default.

Rules

  • Always read tools/ci/install_torch.sh before generating install commands. The version matrix changes with each Quark release. Never rely on memorized version numbers — always verify against the upstream script.
  • Always detect the accelerator before choosing the PyTorch package. Run or reference quark-env-preflight if hardware facts are missing. The entire install plan depends on getting this right.
  • Bind torch and accelerator to the same backend. Never mix a CUDA-built PyTorch with ROCm environment or vice versa. If torch.version.cuda shows a CUDA version but the user says they want ROCm, flag the conflict.
  • Never skip verification. After installation, always run verification commands.
  • If accelerator is unclear, stop after the plan. Present the install plan but do not execute. Hand the gap back to quark-torch-router so it lands in session_context.json's open_questions, and ask the user to confirm their hardware.
  • Show exact commands before execution. The user should see every pip install command, every version, and every --index-url before anything runs.
Show full SKILL.md (185 more words)Show less

Verification Commands

bash
# PyTorch backend check
python -c "import torch; print('PyTorch:', torch.__version__); print('CUDA:', torch.version.cuda); print('HIP:', torch.version.hip)"

# GPU availability
python -c "import torch; print('CUDA available:', torch.cuda.is_available()); print('GPU count:', torch.cuda.device_count())"

Interaction Flow

  1. Intake: Determine what the user already has installed and what accelerator they need. Check if quark-env-preflight has already run.
  2. Plan: Present the accelerator-specific PyTorch installation command with version justifications.
  3. Confirm: Required before any package installation. Show: what will be installed, which --index-url will be used, and what environment will be modified.
  4. Execute: Run the installation commands.
  5. Verify: Run all verification commands. Report pass/fail for each.

Recovery

  • If torch.cuda.is_available() == False: PyTorch CPU build was installed instead of GPU build. Show the exact uninstall + reinstall commands with the correct --index-url.
  • If torch and accelerator mismatch: Explain that PyTorch must be reinstalled with the correct --index-url. Show the exact uninstall + reinstall commands.
  • If Python version is wrong: Recommend creating a new conda environment with a supported version (3.11, 3.12, or 3.13).

Windows-Specific Notes

  • If pip fails with long path errors: Enable Win32 long paths via Group Policy Editor (Computer Configuration > Administrative Templates > System > Filesystem > Enable Win32 long paths)
  • WSL2 with Ubuntu is recommended as an alternative for Windows users
  • ROCm is not supported on Windows — only CUDA and CPU

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

Files

Just SKILL.md in .claude/skills-impl/l1-atomic/torch/quark-torch-install of amd/Quark.

Open the folder on GitHubat commit 313cb0b

Compare with similar skills

Quark Torch Install 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.

Quark Torch Install compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Quark Torch Install this skillamd/Quark181—~1.6kAutomated safety check: PassMIT
Ako4allTongmingLAIC/AKO4ALL369—~4kAutomated safety check: PassMIT
Paddle Op DevPaddlePaddle/Paddle24k—~1.3kAutomated safety check: PassApache-2.0
Fix Envevo-design/proto-tools135—~2.5kAutomated safety check: NotesMIT
Migrate Workflow Ec2 To Osdcpytorch/test-infra113—~2kAutomated safety check: PassCustom licence
Hyperpod Version Checkerawslabs/agent-plugins9151 repos~910Automated safety check: PassApache-2.0

Similar skills

  • Ako4all

    TongmingLAIC/AKO4ALL

    Drive an agentic loop that iteratively optimizes a GPU kernel for maximum speedup.

    369 GitHub stars~4k tokensUpdated 23 days ago
    AI & LLM EngineeringAuto-check passed
  • Paddle Op Dev

    PaddlePaddle/Paddle

    PaddlePaddle (飞桨) C++ 算子开发指南。提供从 YAML 配置、InferMeta 函数、Kernel 实现、Python API 封装、单元测试到编译验证的完整算子开发流程指导。在以下场景使用此 skill:(1) 为 Paddle 框架新增 C++ 算子 (2) 修改或调试已有 Paddle 算子 (3) 编写算子的 YAML…

    24k GitHub stars~1.3k tokensUpdated 8 days ago
    AI & LLM EngineeringAuto-check passed
  • Fix Env

    evo-design/proto-tools

    Fixes tool environment setup failures in proto-tools, either just for the current machine (eject the tool's standalone dir, patch it, and point PROTO<TOOLKITSTANDALONEDIR at it; works for any…

    135 GitHub stars~2.5k tokensUpdated today
    AI & LLM EngineeringAuto-check: notes
  • Step-by-step playbook for migrating a pytorch/pytorch .github/workflows/.yml from EC2 to OSDC (ARC) runners — covers both dial-up and 100% opt-in patterns, with the inputs that must be plumbed…

    113 GitHub stars~2k tokensUpdated today
    AI & LLM EngineeringAuto-check passed
  • Hyperpod Version Checker

    awslabs/agent-plugins

    Official

    Check and compare software component versions on SageMaker HyperPod cluster nodes - NVIDIA drivers, CUDA toolkit, cuDNN, NCCL, EFA, AWS OFI NCCL, GDRCopy, MPI, Neuron SDK (Trainium/Inferentia)…

    915 GitHub starsUsed in 1 repo~910 tokens
    AI & LLM EngineeringAuto-check passed
  • Benchmarks LLM inference and drives GPU kernel optimization with Magpie.

    398 GitHub stars~2.3k tokensUpdated today
    AI & LLM EngineeringAuto-check passed

More from amd/Quark

All 37 skills in this repo
  • Author or restructure a Quark Agent Skill so it conforms to this project's template, contracts, and layer rules.

    181 GitHub stars~3.1k tokensUpdated 10 days ago
    Auto-check passed
  • Run, resume, monitor, diagnose, and report Quark Quant-Perf workflows for PyTorch and HuggingFace transformers models.

    181 GitHub stars~3k tokensUpdated 10 days ago
    Auto-check passed
  • Author a new ShapeShifter graph-transformation pass for AMD Quark (ONNX or PyTorch) so it conforms to the pass framework's conventions and auto-registers.

    181 GitHub stars~2.9k tokensUpdated 10 days ago
    Auto-check passed
  • Collect and normalize environment facts (OS, Python, GPU, CUDA/ROCm, container state) before Quark installation or PTQ planning.

    181 GitHub stars~1.4k tokensUpdated 10 days ago
    Auto-check passed
  • Quark Install

    amd/Quark

    Install or verify the AMD Quark package and its dependencies.

    181 GitHub stars~1.8k tokensUpdated 10 days ago
    Auto-check: notes
  • L3 recipe that runs quark.onnx.AutoSearchPro end-to-end on a user .onnx model: intake → preset selection (or custom search space) → calibration / eval data reader → standalone autosearch script…

    181 GitHub stars~3.4k tokensUpdated 10 days ago
    Auto-check passed

Questions about Quark Torch Install

What does Quark Torch Install do?

Install or verify the correct PyTorch build for a user's accelerator backend before Quark installation. Quark Torch Install is an agent skill from amd/Quark. Install or verify the correct PyTorch build for a user's accelerator backend before Quark installation.

When should I use Quark Torch Install?

Quark Torch Install fits situations like: the user needs PyTorch set up; reports torch version conflicts; CUDA/ROCm package mismatches; torch.cuda.isavailable() returns False.

How do I install Quark Torch Install in Claude Code?

Run `npx skills add amd/Quark --skill quark-torch-install -a claude-code`. Or copy the skill folder (.claude/skills-impl/l1-atomic/torch/quark-torch-install in amd/Quark) into .claude/skills/quark-torch-install in your project. Claude Code loads it when a task matches its description.

How do I install Quark Torch Install in Codex?

Run `npx skills add amd/Quark --skill quark-torch-install -a codex`. Or copy the skill folder (.claude/skills-impl/l1-atomic/torch/quark-torch-install in amd/Quark) into .agents/skills/quark-torch-install in your project. Codex loads it when a task matches its description.

Can I use Quark Torch Install 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 amd/Quark --skill quark-torch-install -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/quark-torch-install, .gemini/skills/quark-torch-install, .github/skills/quark-torch-install and .opencode/skills/quark-torch-install in your project.

What does Quark Torch Install need to run?

Going by SKILL.md and its folder, Quark Torch Install needs the command-line tools its instructions call (pip and python). Our summary lists: Python 3.

Does Quark Torch Install access the network?

SKILL.md names 1 domain. In commands or code: download.pytorch.org; the agent is likely to contact it when it follows the instructions. This is read from the text; nothing was executed.

Is Quark Torch Install 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. Review the folder before installing.

What licence does Quark Torch Install use?

Quark Torch Install is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Quark Torch Install use?

About 1.6k tokens (SKILL.md is roughly 6.4k 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 Quark Torch Install?

Skills that share tags, products or a category with Quark Torch Install: Ako4all (TongmingLAIC/AKO4ALL, 369 stars), Paddle Op Dev (PaddlePaddle/Paddle, 24k stars), Fix Env (evo-design/proto-tools, 135 stars) and Migrate Workflow Ec2 To Osdc (pytorch/test-infra, 113 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Quark Torch Install?

amd (a GitHub organization) maintains it in amd/Quark, which has 181 GitHub stars. The repository holds 37 skills in this directory. The repository was last updated on September 28, 2026.

Source: amd/Quark on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.