Skip to content

feat(benchmark): add MoE FP4 small-batch shapes and enable MoE by def…#332

Draft
zhiding512 wants to merge 2 commits intomainfrom
zhimding/update_mixed_moe_0401
Draft

feat(benchmark): add MoE FP4 small-batch shapes and enable MoE by def…#332
zhiding512 wants to merge 2 commits intomainfrom
zhimding/update_mixed_moe_0401

Conversation

@zhiding512
Copy link
Copy Markdown
Contributor

@zhiding512 zhiding512 commented Apr 1, 2026

image

…ault

Signed-off-by: zhimding <zhimding@amd.com>
Copilot AI review requested due to automatic review settings April 1, 2026 14:32
@zhiding512 zhiding512 marked this pull request as draft April 1, 2026 14:34
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the benchmark runner to broaden MoE FP4 coverage (especially small-batch/token shapes) and to include MoE benchmarks in the default run set.

Changes:

  • Add additional small-token MoE FP4 benchmark shapes.
  • Add a larger-token MoE FP4 shape for the (7168, 2048) configuration.
  • Enable MoE benchmarks by default in run_benchmark.sh.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 208 to +212
RUN_SOFTMAX=1
RUN_LAYERNORM=1
RUN_RMSNORM=1
RUN_PRESHUFFLE_GEMM=1
RUN_MOE=0
RUN_MOE=1
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment describing the default selected ops is now out of date: RUN_MOE is enabled by default, but the comment still says only softmax/norms/GEMM run unless the user enables others. Please update the comment so it matches the current default behavior (and/or adjust the wording around how to include/exclude MoE).

Copilot uses AI. Check for mistakes.
- Replace bytes_moved in stage1/stage2 with corrected formula:
  use aE=min(tokens*topk, experts) for weight bytes, proper scale
  group sizes (32 for FP4 MX, group_size for INT4, K for per-channel)
- Skip MoE FP4 benchmark on non-gfx950 (e.g. MI325/gfx942) with
  'Skipping FP4' message matched by run_benchmark.sh grep filter

Signed-off-by: zhimding <zhimding@amd.com>
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.

2 participants