# Mi300 Hip Vs Nvidia

> MI300 HIP programming differences vs NVIDIA—wavefront vs warp, memory hierarchy, MFMA usage, occupancy, and profiling pitfalls.

- Skill: `wenyi-li/mi300-hip-vs-nvidia` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add wenyi-li/mi300-hip-vs-nvidia`
- Raw SKILL.md: https://api.skillmd.com/api/skills/wenyi-li/mi300-hip-vs-nvidia/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: wenyi-li (https://skillmd.com/u/wenyi-li)
- Updated: 2026-09-22
- Page: https://skillmd.com/skills/wenyi-li/mi300-hip-vs-nvidia

---


# MI300 vs NVIDIA (HIP Porting Guide)

Use when porting/tuning kernels from NVIDIA to MI300 or comparing behaviors.

Key differences and guidance:
- Execution: 64-thread wavefronts vs 32-thread warps—adjust coalescing, tails, and occupancy; watch register/LDS pressure per wavefront.
- Memory: CDNA3 cache hierarchy and vector cache; coalesce for 64 threads; exploit LDS; understand cache line sizes/policies.
- Matrix cores: MFMA set, mixed precision; adapt tiling/layout for Matrix Cores; leverage scalar unit for uniform ops.
- Synchronization/atomics: wave-level sync, memory ordering; extra fences for relaxed coherency; cooperative groups considerations.
- Compiler/feature guards: use HIP macros and arch detection; conditional MFMA paths.
- Optimization: occupancy sizing (multiples of 64), instruction scheduling, mixed precision, load balancing across shader engines, fusion when resources allow.
- Profiling/debug: use ROCProfiler/ROCgdb for wavefront-aware analysis; check launch config impacts on occupancy/memory.

References:
- `references/HIP Kernel Programming Guide for MI300_ Key Differences from NVIDIA AI Chips.md`

