Quark install

From amd/Quark · View interactive version

Quark install is an AI agent skill from the GitHub repository amd/Quark. Install or verify the AMD Quark package and its dependencies. Use when the user needs Quark package installation, dependency setup, or post-install verification — after PyTorch is already set up. Trigger for "install Quark", "set up Quark", "pip install amd-quark", "install the Quark package", depen

How to use this skill

Skill file

quark-install

Purpose

Install the AMD Quark package and its dependencies after PyTorch is already set up. This skill handles Quark-specific setup: the amd-quark package, core dependencies, optional ONNX Runtime, LLM PTQ extras, and compiler requirements. It exists separately from quark-torch-install (which handles PyTorch) and from PTQ planning because getting the environment right is a prerequisite — a missing dependency or wrong compiler will cause cryptic failures later.

Inputs

Outputs: quark_install_result.json

Records the installed Quark version, optional extras (ONNX runtime, LLM PTQ deps), and verification status.

Schema: CODE0

{
  "status": "ok",
  "quark_version": "0.12",
  "install_source": "pypi",
  "extras_installed": {
    "onnxruntime": false,
    "llm_ptq_deps": true
  },
  "verification": {
    "import_ok": true,
    "kernel_ok": true,
    "onnx_ops_ok": null
  }
}

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

Quark Package Info

```bash

pip install amd-quark --extra-index-url https://pypi.amd.com/quark/cpu/simple # CPU

pip install amd-quark --extra-index-url https://pypi.amd.com/quark/cu128/simple # CUDA 12.8

pip install amd-quark --extra-index-url https://pypi.amd.com/quark/rocm71/simple # ROCm 7.1, Linux only

pip install amd-quark --extra-index-url https://pypi.amd.com/quark/rocm72/simple # ROCm 7.2, Linux only

```

```bash

git clone --recursive https://github.com/AMD/Quark

cd Quark

git submodule sync && git submodule update --init --recursive

pip install .

```

Python Version Requirements

ONNX Runtime (Optional)

LLM PTQ Additional Dependencies

For running quantize_quark.py, install these extras:

pip install accelerate datasets evaluate>=0.4.0 gguf>=0.10.0 lm-eval transformers<5.3

Core Dependencies (from requirements.txt)

evaluate, joblib, ninja, numpy>=2.0, onnx>=1.21.0,<=1.22.0, onnxscript,
onnxslim>=0.1.84, pandas, plotly, protobuf, psutil, pydantic, rich, scipy,
sentencepiece, tqdm, zstandard

Compiler Requirements

Rules

Verification Commands

# Basic import
python -c "import quark; print('Quark version:', quark.__version__)"

# Optional: kernel compilation test
python -c "import quark.torch.kernel; print('Kernel compilation OK')"

# Optional: ONNX custom ops
python -c "import quark.onnx.operators.custom_ops; print('ONNX custom ops OK')"

Interaction Flow

  1. Intake: Determine what the user already has installed and what they need. Check if quark-torch-install has already run and PyTorch is verified.
  2. Plan: Present the installation plan as a numbered sequence of commands, with version justifications.
  3. Confirm: Required before any package installation. Show: what will be installed and what environment will be modified.
  4. Execute: Run the installation commands.
  5. Verify: Run all verification commands. Report pass/fail for each.

Recovery

Windows-Specific Notes

Docker Option

Quark provides official Dockerfiles for reproducible environments:

Build with:

docker build -f tools/ci/docker/images/Dockerfile.cuda \
  --build-arg PYTHON_VERSION=3.13 \
  --build-arg PYTORCH_VERSION=2.10.0 \
  --build-arg ACCELERATOR_VERSION=cuda-12.6 \
  -t quark:cuda .
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.