Skip to main content
PhyAI runs PI0.5 on AMD Instinct MI300X (gfx942) in eager and CUDA Graph mode. On AMD, the kernel selector picks aiter rows for paged attention, bf16 GEMM, RMSNorm, RoPE, and gated GELU, and PhyAI’s Triton kernel for AdaRMSNorm. Tested on MI300X with the rocm/sgl-dev:v0.5.22-rocm724-mi30x-20261029 image (ROCm 7.2, Python 3.12, torch==2.11.0+rocm7.2, aiter 0.1.26). MI355X and other Instinct GPUs, and other images, are untested.

Install from source

Start the image with the GPU devices passed through (--device=/dev/kfd --device=/dev/dri). It ships ROCm builds of Torch, TorchVision, Triton, and aiter in /opt/venv, at the Torch versions PhyAI pins. phyai/pyproject_amd.toml and phyai-kernel/pyproject_amd.toml declare the same dependencies as the default pyproject.toml files without the CUDA-only packages. Copy them over the defaults, then install the workspace packages into the image’s environment:
phyai-ext builds from source with the same CMake setup as on CUDA. Do not run uv sync or plain uv run: they resolve the default uv.lock and reinstall the CUDA builds.

Check the install

Run PI0.5

ROCm exposes the GPU as a cuda device in Torch, so DeviceConfig(target="cuda") selects it, and CUDA Graph works with the default RuntimeConfig:
On MI300X, one PI0.5 step with the LIBERO 2-camera input (lerobot/pi05_base, bf16, batch 1, 10 denoising steps) takes 213.9 ms in eager mode and 42.8 ms with CUDA Graph (engine.step, p50 of 50 steps after 20 warmup steps).

Limitations

  • Without aiter, paged attention, GEMM, RMSNorm, RoPE, and gated GELU fall back to their Torch reference or SDPA rows, and CUDA Graph setup fails for PI0.5: sdpa.attention_paged cannot replay changed sequence offsets between PI0.5’s prefix buckets.
  • Layernorm, embedding, and plain GELU stay on their Torch rows on AMD. The bundled aiter GEMM tuning table covers four PI0.5 shapes on MI300X; aiter runs other shapes through Torch.
  • FlashInfer, humming quantization (NVFP4), and vGPU green contexts are unavailable.
  • pytest phyai/tests/kernel has 27 failures on ROCm: the tests expect FlashInfer or NVIDIA-only Triton rows, and op='moe' has no row on ROCm. A follow-up PR will fix them.