gfxgraph-integration
Integrate gfxGRAPH into PyTorch or SGLang projects on AMD ROCm (RDNA2/gfx1030).
Skill by carlosfundora
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/carlosfundora-gfxgraph-integration
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: 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. 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/gfxgraph-integration
What's inside
- Skill name
gfxgraph-integration- Description
- Integrate gfxGRAPH into PyTorch or SGLang projects on AMD ROCm (RDNA2/gfx1030). Provides drop-in CUDA Graph parity, eager fallback, shape bucketing, and VRAM safety. USE FOR: enable CUDA graphs on AMD, integrate gfxGRAPH, configure gfxGRAPH for SGLang, fix graph capture failures on ROCm, RDNA2 CUDA graph compatibility, gfx1030 graph support, HIP graph bridge, monkey-patch torch.cuda.CUDAGraph, shape bucketing for dynamic batches. DO NOT USE FOR: developing or extending gfxGRAPH internals (use gfxgraph-development), general PyTorch ROCm issues unrelated to graph capture.
- License
- MIT
- Instructions
- 225 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
# gfxGRAPH Integration Guide
Use gfxGRAPH to enable transparent CUDA Graph capture/replay on AMD RDNA2 GPUs (gfx1030/gfx1031)
where native HIP Graph support has parity gaps. gfxGRAPH is a drop-in replacement — existing
`torch.cuda.CUDAGraph` code works unchanged after `gfxgraph.enable()`.
## Quick Start
### Installation
```bash
# From source (editable — recommended for development)
pip install -e /path/to/gfxGRAPH/python/
# Standard install
pip install /path/to/gfxGRAPH/python/
```
### Verify Installation
```python
import gfxgraph
print(gfxgraph.__version__) # → "0.3.4"
print(gfxgraph.health_check()) # → {'ok': True, 'gpu': 'AMD Radeon RX 6700 XT', ...}
```
### Enable (Standalone PyTorch)
```python
import gfxgraph
gfxgraph.enable() # patches torch.cuda.CUDAGraph globally
# All existing CUDA graph code now works on RDNA2:
graph = torch.cuda.CUDAGraph() # actually BridgedCUDAGraph
```
### Enable (SGLang)
Set environment variables before launching:
```bash
export SGLANG_RDNA2_KERNELS=1 # activates gfxGRAPH in SGLang
export HSA_OVERRIDE_GFX_VERSION=10.3.0 # required for gfx1031 → gfx1030 mapping
export PYTORCH_ROCM_ARCH=gfx1030
export AMD_SERIALIZE_KERNEL=3
export AMD_SERIALIZE_COPY=3
python3 -m sglang.launch_server --model-path <model> ...
```
### Enable (Environment Variable)
```bash
GFXGRAPH=1 python3 my_script.py # standard mode
GFXGRAPH=debug python3 my_script.py # verbose logging
GFXGRAPH=validate python3 my_script.py # correctness checking mode
```
## Core API
### `gfxgraph.enable(**kwargs)`
Monkey-patches `torch.cuda.CUDAGraph` → `BridgedCUDAGraph`. Options:
- `debug=True` — verbose logging (also via `HGB_LOG_LEVEL=debug`)
- `validate=True` — compares graph output vs eager to catch silent bugs (PyTorch #155684)
### `gfxgraph.disable()`
Restores original `torch.cuda.CUDAGraph`. Safe to call even if not enabled.
### `gfxgraph.stats()`
Thread-safe performance counters:
```python
{'enabled_at': 1712..., 'capture_count': 32, 'replay_count': 1847,
'fallback_count': 0, 'validation_failures': 0, 'avg_replay_us': 42.3}
```
### `gfxgraph.health_check()`
Quick GPU smoke test — captures and replays a trivial graph:
```python
{'ok': True, 'gpu': 'AMD Radeon RX 6700 XT', 'rocm': 'gfx1030',
'native_bridge': False, 'vram_total_mb': 12288, 'vram_free_mb': 10240,
'details': 'Graph capture/replay OK, output verified'}
```
## BridgedCUDAGraph
Drop-in replacement for `torch.cuda.CUDAGraph`. Supports both high-level and low-level APIs.
### Low-Level API (SGLang/vLLM compatible)
```python
from hipgraph_bridge import BridgedCUDAGraph
g = BridgedCUDAGraph()
g.capture_begin()
# ... operations ...
g.capture_end()
g.replay()
g.pool() # returns mempool id
```
### High-Level API (shape bucketing + eager fallback)
```python
g = BridgedCUDAGraph()
with g.capture(dynamic_shapes=True, buckets=[1, 4, 8, 16, 32], model_fn=my_model):
output = my_model(static_input)
g.replay(batch_size=12) # auto-selects bucket 16, pads input
```
### Eager Fallback Behavior
When graph capture fails (common on RDNA2 for certain operations):
1. gfxGRAPH logs a warning
2. Sets `_eager_fallback = True`
3. Subsequent `replay()` calls execute the model eagerly via `model_fn`From carlosfundora/gfxGRAPH, MIT.
More from carlosfundora/gfxGRAPH
- 0.499score
rocm-vram-profiler-diagnostic
carlosfundora
Core runbook for diagnosing memory ceiling limits on AMD's ROCm toolkit natively.
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
gfxgraph-development
carlosfundora
Develop and extend gfxGRAPH internals — add gap bridges, fix HIP/ROCm issues, debug graph capture failures, and understand the architecture.
SkillCFreshness: C★ 1Claude Code +9 - 0.496score
rocm-atom-inference
carlosfundora
Guide and resources for deployment and development using the ROCm/AMD ATOM (AiTer Optimized Model) inference backend.
SkillCFreshness: C★ 1Claude Code +9 - 0.494score
gfxgraph-install-readiness
carlosfundora
Assess whether a target environment is ready for gfxGRAPH installation and surface blockers before any changes are made.
SkillCFreshness: C★ 1Claude Code +9 - 0.494score
rocm-ds-smi-science-tools
carlosfundora
Parent overview skill for ROCm Data Science (ROCm-DS) components and SMI tools.
SkillCFreshness: C★ 1Claude Code +9 - 0.491score
gfxgraph-install
carlosfundora
Install gfxGRAPH into a user-specified target directory or environment using the repo's supported uv-based workflow.
SkillCFreshness: C★ 1Claude Code +9 - 0.491score
gfxgraph-benchmarking
carlosfundora
Benchmark gfxGRAPH internals, run the public benchmark suite, and compare performance between Python and Rust.
SkillCFreshness: C★ 1Claude Code +9 - 0.491score
gfxgraph-configure
carlosfundora
Configure or reconfigure gfxGRAPH runtime behavior, environment variables, and replay modes after installation.
SkillCFreshness: C★ 1Claude Code +9 - 0.491score
gfxgraph-testing
carlosfundora
Test gfxGRAPH on real hardware and confirm it is functioning after install or configuration changes.
SkillCFreshness: C★ 1Claude Code +9
Signals
- Stars
- 1
- Forks
- 2
- Open issues
- 0
- Last commit (this folder)
- Jun 12, 2026 (4 months ago)
- Last release
- Jun 15, 2026 (4 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/carlosfundora/gfxGRAPH
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from carlosfundora
- 0.499score
rocm-vram-profiler-diagnostic
carlosfundora
Core runbook for diagnosing memory ceiling limits on AMD's ROCm toolkit natively.
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
gfxgraph-development
carlosfundora
Develop and extend gfxGRAPH internals — add gap bridges, fix HIP/ROCm issues, debug graph capture failures, and understand the architecture.
SkillCFreshness: C★ 1Claude Code +9 - 0.496score
rocm-atom-inference
carlosfundora
Guide and resources for deployment and development using the ROCm/AMD ATOM (AiTer Optimized Model) inference backend.
SkillCFreshness: C★ 1Claude Code +9 - 0.494score
gfxgraph-install-readiness
carlosfundora
Assess whether a target environment is ready for gfxGRAPH installation and surface blockers before any changes are made.
SkillCFreshness: C★ 1Claude Code +9 - 0.494score
rocm-ds-smi-science-tools
carlosfundora
Parent overview skill for ROCm Data Science (ROCm-DS) components and SMI tools.
SkillCFreshness: C★ 1Claude Code +9 - 0.491score
gfxgraph-install
carlosfundora
Install gfxGRAPH into a user-specified target directory or environment using the repo's supported uv-based workflow.
SkillCFreshness: C★ 1Claude Code +9
Cite this page
gfxgraph-integration skill. Agent Mart. https://agentmart.dev/skills/carlosfundora-gfxgraph-integration (last updated 2026-10-24)