| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
A lightweight, general-purpose framework for evaluating GPU kernel correctness and performance.
# Basic installation
pip install git+https://github.com/AMD-AGI/Magpie.git
# Optional MCP support
pip install "magpie-eval[all] @ git+https://github.com/AMD-AGI/Magpie.git"git clone https://github.com/AMD-AGI/Magpie.git
cd Magpie
# Editable install (recommended for development)
pip install -e .
# Optional MCP support
pip install -e ".[all]"
# Or use make for a managed dependency virtualenv
make install# Analyze a kernel using a config file
magpie analyze --kernel-config Magpie/kernel_config.yaml.example
# Compare kernels using a config file
magpie compare --kernel-config examples/ck_grouped_gemm_compare.yaml
# Benchmark vLLM (see examples/benchmarks/*.yaml)
magpie benchmark --benchmark-config examples/benchmarks/benchmark_vllm_dsr1.yaml
# GPU / toolchain summary
magpie --gpu-info
# Run MCP server
python -m Magpie.mcpNote: You can use python -m Magpie instead of the magpie CLI for the same subcommands.
| Mode | Description | Status |
|---|---|---|
| Analyze | Single kernel evaluation with testcase | ✅ |
| Compare | Multi-kernel comparison and ranking | ✅ |
| Benchmark | Framework-level benchmarking (vLLM/SGLang/Atom) with trace analysis | ✅ |
📖 See Benchmark mode for vLLM/SGLang/Atom usage.
📖 See Analyze vs Compare for kernel evaluation modes.
Key categories:
See Magpie/kernel_config.yaml.example for full examples.
Example configs live in examples/:
| Mode | Config File | Description |
|---|---|---|
| Analyze | examples/ck_gemm_add.yaml | Single kernel evaluation |
| Analyze | examples/simple_hip_test/analyze_default.yaml | Minimal HIP example |
| Compare | examples/ck_grouped_gemm_compare.yaml | Multi-kernel comparison |
| Benchmark | examples/benchmarks/benchmark_vllm_dsr1.yaml | vLLM (DeepSeek-R1-style) |
| Benchmark | examples/benchmarks/benchmark_vllm_tracelens.yaml | vLLM + TraceLens |
| Benchmark | examples/benchmarks/benchmark_vllm_kimi_k2.yaml | vLLM + gap analysis example |
| Benchmark | examples/benchmarks/benchmark_sglang_dsr1.yaml | SGLang benchmark |
| Benchmark | examples/benchmarks/benchmark_atom_dsr1.yaml | Atom benchmark (single-node v1) |
| Benchmark | examples/benchmarks/benchmark_vllm_*_ray.yaml | vLLM on Ray |
MCP configuration example: Magpie/mcp/config.json
Available tools:
For environments without MCP, install the Magpie skill; see docs/how-to/mcp-and-skills.md.
make install-dev
make lint
make format├── README.md
├── LICENSE
├── .gitignore
├── pyproject.toml # Package configuration (pip install)
├── requirements.txt
├── Makefile
├── examples/ # Example configurations
├── docs/ # Documentation (ROCm docs site source)
│ ├── index.rst # Overview / landing page
│ ├── install/ # Installation instructions
│ ├── reference/ # Release notes, compatibility, API reference
│ ├── how-to/ # How-to guides (benchmark, analyze/compare, ray, MCP/skills)
│ ├── examples/ # Step-by-step examples
│ ├── about/ # License
│ └── images/ # Architecture diagrams
└── Magpie/
├── __init__.py # Package initialization
├── __main__.py # Entry point for python -m Magpie
├── main.py # CLI implementation
├── config.yaml # Framework configuration
├── kernel_config.yaml.example
├── config/ # Configuration classes
├── core/ # Core engine components
├── eval/ # Evaluation pipeline
├── modes/ # Evaluation modes
│ ├── analyze_eval/ # Single kernel analysis
│ ├── compare_eval/ # Multi-kernel comparison
│ └── benchmark/ # Framework-level benchmarking
│ ├── benchmarker.py # Benchmark orchestration
│ ├── config.py # Benchmark configuration
│ ├── tracelens.py # TraceLens integration
│ ├── gap_analysis.py # Kernel bottleneck report from torch traces
│ └── result.py # Result data structures
├── mcp/ # MCP Server
│ ├── __init__.py
│ ├── __main__.py # Entry point for python -m Magpie.mcp
│ ├── server.py # MCP server implementation
│ └── config.json # MCP client configuration
└── utils/ # Utility functions
MIT License. See LICENSE.
| Back | FazBrowse Home | New Git URL |