Quark onnx eval runner

From amd/Quark · View interactive version

Quark onnx eval runner is an AI agent skill from the GitHub repository amd/Quark. Manually verify that the Quark ONNX skill family behaves correctly across the four contract categories (routing, planning, artifact, recovery). Use when maintainers need to confirm that ONNX routing, planning, artifact generation, or error recovery skills still work as expected. Trigger for "verify

How to use this skill

Skill file

quark-onnx-eval-runner

Purpose

Walk a maintainer through manual verification of the ONNX skill family across the four contract

categories: routing, planning, artifact, and recovery. Run this after modifying any

quark-onnx-* skill, after a Quark ONNX upgrade, or before tagging a release.

Inputs

catalog grows)

Outputs: validation_report.md

A markdown report recording per-category pass/fail and concrete evidence for each finding.

Schema: CODE0

# ONNX Skill Verification Report

## Summary
| Category | Cases Run | Pass | Fail |
|----------|-----------|------|------|
| routing  | N         | N    | 0    |
| planning | N         | N    | 0    |
| artifact | N         | N    | 0    |
| recovery | N         | N    | 0    |

## Failures
### <category> / <case name>
- **Expected**: ...
- **Got**: ...
- **Impact**: ...
- **Fix**: ...

Manual Verification Protocol

For each category below, run at least one case and record the result in the report. As ONNX

prompts are not yet enumerated in examples/agent_skills/prompts/, the cases below double as the

seed catalog — add more as the ONNX skill set grows.

1. Routing

Goal: verify that quark-onnx-router (and Claude's auto-routing via the descriptions in

.claude/skills/quark-onnx-*) maps natural-language ONNX goals to the correct downstream skill

and never silently routes ONNX requests through a torch skill.

Manual procedure:

  1. Pick a user-style prompt that names a .onnx artifact or ONNX-specific vocabulary.
  2. In a fresh Claude Code session at the Quark repo root, paste the prompt.
  3. Observe which skill Claude invokes first.
  4. Compare against the expected target skill. Examples of expected mappings:

(which loads quark-onnx-ptq-workflow)

quark-onnx-model-intake

initializers byte-identical?" → quark-onnx-result-validator

quark-onnx-install (or quark-onnx-debug if the user already attempted install)

→ quark-onnx-debug

  1. Cross-backend guard: also run one negative prompt that mentions a .onnx path and

confirm Claude does not route to quark-torch-* (e.g., "quantize ./models/foo.onnx with

FP8" must not land on quark-torch-ptq).

Pass criteria: the first skill invoked matches the expected target, and no ONNX prompt is

routed to a torch skill.

2. Planning

Goal: verify that quark-onnx-quant-plan produces internally consistent plans for typical

ONNX inputs and that the deployment-target gates are respected.

Manual procedure:

  1. Construct (or take from a prior session) a model_analysis.json produced by

quark-onnx-model-intake for a representative model (e.g., YOLOv8n exported at opset 17,

Conv-heavy, 6.2 MB inline).

  1. Hand it to quark-onnx-quant-plan with a target preset (e.g., XINT8) and a deployment

target (e.g., AMD NPU CNN).

  1. Inspect the produced quant_plan.json for:

for XINT8)

rather than silently downgrading

Pass criteria: the plan validates against quant_plan.schema.json, contains no internal

contradictions, and explicitly rejects unsupported deployment-target / preset combinations.

3. Artifact

Goal: verify that ONNX workflow output artifacts conform to their JSON schemas and that the

generated standalone script + manifest produced by quark-onnx-ptq-workflow agree with each

other.

Manual procedure:

  1. Take the quant_plan.json from the planning case.
  2. Run quark-onnx-ptq-workflow to produce a run_manifest.yaml and the standalone

<name>_ptq.py script in the user's working directory.

  1. Validate the manifest against .claude/skills-impl/shared/contracts/run_manifest.schema.json

(use any JSON-schema validator, e.g., the jsonschema Python package).

  1. Spot-check that:

EnableNPUCnn / use_external_data_format

(no editing of upstream examples/onnx/ or quark/onnx/ files)

Pass criteria: schema validation passes; the manifest's resolved config matches the plan;

the generated script is self-contained in the user's working directory.

4. Recovery

Goal: verify that quark-onnx-debug correctly diagnoses known ONNX-side error patterns and

that handoffs to quark-onnx-install happen for runtime/provider issues.

Manual procedure:

  1. Pick a known ONNX error scenario. Examples:

onnxruntime (CPU build) instead of onnxruntime-gpu.

(missing C++ build, ABI mismatch).

use_external_data_format was not set or the sibling .onnx_data was not staged.

  1. Present the error (full traceback) to quark-onnx-debug.
  2. Verify the diagnosis:

instead of silently swapping execution providers

batch_size to 1 → move calibration to CPU (OptimDevice="cpu")

rather than recommending the user ignore the op

Pass criteria: the diagnosis names the actual root cause, suggests a fix that would actually

work, and respects the "never silently fall back to CPU" rule from quark-onnx-ptq-workflow.

Rules

in preset names or custom-op names can shift routing or break generated scripts.

Only update the expected behavior if the skill change was intentional.

target, new preset, new AutoSearchPro preset), add cases that cover the new triggers.

that confirms ONNX requests stay on quark-onnx-* skills.

Interaction Flow

  1. Select scope: which categories to verify — all four, or a subset affected by a recent change?
  2. Pick or write cases: start from the examples above; add ONNX prompt files under

examples/agent_skills/prompts/ as the catalog grows.

  1. Run each case manually following the protocol above in a fresh Claude Code session.
  2. Record results in validation_report.md using the template.
  3. Hand off failures to quark-onnx-skill-sync if they look like upstream drift, to

quark-onnx-doc-drift-check if they look like stale user-facing facts, or directly to the

affected skill's owner if it's a content bug.

Recovery

for the planning case), report the missing producer skill and stop — do not fabricate the input.

failure may produce a real failure rather than a simulated one — note this distinction in the

report so future runs don't confuse genuine environment gaps with skill bugs.

infrastructure issue separate from skill quality — record it distinctly in the report.

and must block the release — cross-backend mis-routing produces wrong artifacts silently.

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.