Skip to content

perf(EPv2): add validated MI308X/Thor2 MoE tuning profiles - #664

Open
jhchouuu wants to merge 1 commit into
ROCm:mainfrom
jhchouuu:perf/mi308-thor2-moe-tuning
Open

jhchouuu wants to merge 1 commit into
ROCm:mainfrom
jhchouuu:perf/mi308-thor2-moe-tuning

Conversation

@jhchouuu

Copy link
Copy Markdown
Collaborator

Follow-up to #625 for two nodes of 8×MI308X with dual-port 200Gbps Thor2 NICs (EP16).

The internode tuner used the first search candidate as its reference when a shape missed the tuning table. The DeepSeek shapes in this study all miss that table, so those comparisons did not measure improvement over the actual default. Resolve the reference geometry from the constructed op, including dtype and explicit overrides.

This change adds:

  • Fixed-reference QP and complete dispatch/combine geometry comparisons, explicit candidate grids, alternating A/B order, and JSON output with per-rank samples and tail statistics. --cmd compare follows the paired test with ordinary benchmarks that keep only one op alive.
  • A tighter FP8→BF16 correctness bound based on combine precision, and a two-node payload/metadata/reverse-map checker.
  • Opt-in profiles and a config-export helper for R1, V4 Flash and V4 Pro, both kernel families, BF16 and FP8→BF16, and 4–16384 tokens/rank. QP=1/2/4/8 was explored jointly with geometry; new geometry candidates stay within 80 blocks.
  • CSV evidence, per-trial acceptance data, provenance and a performance plot. 62/96 proposed configurations passed all gates, reducing dispatch+combine time by 6.4–38.8% (18.8% median among accepted changes). Rejected replacements retain the reference in the exported profiles.

Profiles require an exact measured shape/capacity and explicit selection. The global tuning lookup and auto threshold are unchanged.

Measurement provenance

The full matrix was measured on 62ee2674 with the documented minimal BNXT completion patch, applied equally to reference and candidate. #653 has since merged; this branch is rebased onto ceac6df6 and takes the transport fix from main. The patch file is historical provenance, not a new transport code change. The complete performance matrix was not rerun on the new base.

The benchmark uses eager HIP event regions, excludes expert computation, and reports the FP8→BF16 conversion interval separately. Capacity equals live token count. The profiles are specific to the recorded hardware, software and network setup.

Validation

  • Fresh ROCm 7.14 build on the updated base; 35 region/JIT-binding pytest cases passed.
  • Five fresh two-node checks passed on both hosts: BF16 paired comparison, FP8 QP-only comparison, explicit candidate grid, strict FP8/v2 payload checks, and strict BF16/v2_ll checks with 24 experts/rank.
  • Audited all 288 published validation trials against the acceptance rules; reproduced all 62 accepted profiles.
  • Historical campaign: 1152 initial QP benchmarks, 720 QP rechecks at selected geometries, three independent process batches covering all 96 final comparisons, and 28 strict payload/metadata checks.
  • Pre-commit and git diff --check passed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant