quark-torch-install
Install or verify the correct PyTorch build for a user's accelerator backend before Quark installation.
Skill by amd
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/amd-quark-torch-install-da44b7
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: backend, ml
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md and code. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/quark-torch-install
What's inside
- Skill 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.
- License
- MIT
- Instructions
- 109 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
# 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`](../../../shared/contracts/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.
## 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 CPUFrom amd/Quark, MIT.
More from amd/Quark
- 0.684score
quark-skill-creator
amd
Author or restructure a Quark Agent Skill so it conforms to this project's template, contracts, and layer rules.
SkillAFreshness: A★ 186Claude Code +9 - 0.679score
quark-torch-model-intake
amd
Inspect a target model and prepare metadata for Quark PTQ planning.
SkillAFreshness: A★ 186Claude Code +9 - 0.679score
quark-env-preflight
amd
Collect and normalize environment facts (OS, Python, GPU, CUDA/ROCm, container state) before Quark installation or PTQ planning.
SkillAFreshness: A★ 186Claude Code +9 - 0.679score
quark-torch-quant-plan
amd
Build a Quark Torch LLM PTQ quantization plan from model analysis and user intent.
SkillAFreshness: A★ 186Claude Code +9 - 0.679score
quark-torch-export
amd
Prepare export and downstream evaluation handoff for a planned or completed Quark PTQ run.
SkillAFreshness: A★ 186Claude Code +9 - 0.679score
quark-torch-llm-eval
amd
End-to-end LLM accuracy evaluation on AMD ROCm (ROCm-only) — container setup, vLLM/SGLang/ATOM serving, lm-eval / lighteval / evalscope benchmarks.
SkillAFreshness: A★ 186Claude Code +9 - 0.679score
quark-install
amd
Install or verify the AMD Quark package and its dependencies.
SkillAFreshness: A★ 186Claude Code +9 - 0.679score
quark-onnx-install
amd
Install or verify the correct ONNX Runtime build (and the `onnx` package) for a user's accelerator backend before Quark's ONNX-to-ONNX flow.
SkillAFreshness: A★ 186Claude Code +9 - 0.679score
quark-onnx-model-intake
amd
Inspect a target ONNX model and prepare metadata for Quark ONNX PTQ planning.
SkillAFreshness: A★ 186Claude Code +9 - 0.679score
quark-onnx-router
amd
Route Quark ONNX user goals to the correct atomic skill.
SkillAFreshness: A★ 186Claude Code +9 - 0.679score
quark-torch-debug
amd
Diagnose failed Quark installation, PTQ execution, script generation, or export attempts.
SkillAFreshness: A★ 186Claude Code +9 - 0.679score
quark-torch-result-validator
amd
Validate Quark quantization output using four lightweight checks: auxiliary file copy alignment, excluded tensor MD5 byte-identity, config.json deep…
SkillAFreshness: A★ 186Claude Code +9
Signals
- Stars
- 186
- Forks
- 36
- Open issues
- 3
- Last commit (this folder)
- Jul 9, 2026 (3 months ago)
- Last release
- Sep 28, 2026 (1 month ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/amd/Quark
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
Same skill elsewhere
Copies of this SKILL.md published by others; search shows only one of them.
More from amd
- 0.700score
quark-torch-llm-ptq
amd
Runs an end-to-end AMD Quark post-training quantization workflow for PyTorch / Hugging Face LLMs: inspect a Hub or local model, choose a quantization plan…
SkillAFreshness: A★ 465Claude Code +9 - 0.700score
rocprofiler-pc-sampling
amd
Profiles a target application using rocprofv3 with program counter sampling enabled and then analyzes the results.
SkillAFreshness: A★ 465Claude Code +9 - 0.700score
local-ai-use
amd
Makes this agent generate images, transcribe audio, and synthesize speech on the user's own machine through a local Lemonade Server instead of a paid cloud API.
SkillAFreshness: A★ 465Claude Code +9 - 0.700score
quark-install
amd
Installs or verifies AMD Quark and ensures the selected Python environment has an accelerator-matched PyTorch.
SkillAFreshness: A★ 465Claude Code +9 - 0.700score
lemonade-router-builder
amd
Turns a natural-language description of routing intent into a valid Lemonade `collection.router` policy JSON.
SkillAFreshness: A★ 465Claude Code +9 - 0.700score
serving-llms-on-epyc
amd
Serves an LLM on a supported AMD EPYC server CPU using vLLM with zentorch, in Docker, Podman, or conda.
SkillAFreshness: A★ 465Claude Code +9
Cite this page
quark-torch-install skill. Agent Mart. https://agentmart.dev/skills/amd-quark-torch-install-da44b7 (last updated 2026-10-24)