env-setup

Audit and install GPU tuning tools in AMD ROCm serving containers.

178|52|Updated Jul 30, 2025
One-click install
npx skills add https://github.com/AMD-AGI/GEAK --skill env-setup-amd-agi
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: env-setup
Source: https://github.com/AMD-AGI/GEAK/tree/main/perf_knowledge/expert_skills/tuning/env-setup
Command: npx skills add https://github.com/AMD-AGI/GEAK --skill env-setup-amd-agi

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Serving images for vllm and sglang ship the runtime needed to run tuned GPU kernels but not the bench clients needed to produce them, and installing mismatched tool versions silently yields tuned artifacts the runtime never uses. ## Core Features & Use Cases - Read-only environment audit: Run audit_tools.sh inside a pristine container to get an OK/MISSING inventory of hipblaslt-bench, ckProfiler, aiter tuners, and GPU visibility before changing anything. - Version-matched installation: Install ckProfiler via apt, clone aiter source at the tag matching the installed wheel, and build hipblaslt-bench clients-only against the container's ROCm release branch. - Failure-mode guidance: Diagnose misleading errors such as aiter ImportError caused by missing GPU device flags, and detect compiler-build differences that cap achievable kernel performance. - Use Case: Before tuning a GEMM in a vllm ROCm 7.2 image, audit the container, discover hipblaslt-bench is missing, build it from the release/rocm-rel-7.2 branch in about 20 minutes, and verify the environment before any tuning run. ## Quick Start Audit my vllm ROCm container for missing GPU tuning tools and install whatever is needed to tune kernels on this gfx942 machine.

Frequently Asked Questions about env-setup

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I install hipblaslt-bench in a ROCm container?

hipblaslt-bench is not available as an apt package, so you build it from the rocm-libraries monorepo using the release branch matching your ROCm version. Build clients only with install.sh -c -n -a gfx942, which takes about 20 minutes and links against the existing libhipblaslt.so.

How do I check which GPU tuning tools a vllm or sglang image ships?

Run the read-only audit_tools.sh script inside a pristine container from the target image with GPU devices passed in. It prints OK or MISSING for each bench client, Python tuning stack, and aiter tuner entry point, and grep for MISSING gives your install list.

Why does aiter fail with ImportError: cannot import name dtypes?

This error usually means the container was started without --device=/dev/kfd --device=/dev/dri --group-add video, so rocminfo fails and arch detection disables the CK/HIP op registrations. Run rocminfo first before debugging the library install itself.

Can I reuse tuned kernel configs across different ROCm versions or GPU architectures?

No. Tuned artifacts are lookup-table entries keyed by shape, dtype, and architecture, so a config produced by a mismatched tool is written where the runtime never looks or is rejected silently. Always match tools to the container ROCm version and never carry artifacts between gfx942 and gfx950.

Why is the same Triton kernel slower in the sglang image than the vllm image?

Both images report triton 3.6.0, but the sglang image uses a vendored fork whose compiler build exceeds the 256-VGPR cap and spills 63 registers, costing about 1.89x on the measured GEMM. Check triton.__file__ and the .vgpr_spill_count metadata rather than trusting the version string.