refactor fmoe tuner profile - #1614
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refactors the fmoe (Fused Mixture of Experts) tuner profile handling by consolidating profile file management, improving sort key handling, and fixing a boundary condition bug.
- Modifies profile file handling to support optional profile saving and consolidates append logic
- Introduces configurable sort keys for GEMM tuners to swap M and N positions for better ordering
- Fixes an off-by-one error in kernel ID validation
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| hsa/gfx942/fmoe_2stages/tune.py | Changes default profile_file to empty string, adds conditional profile saving logic, and hardcodes fallback profile path to "aiter/configs/profile_fmoe.csv" |
| csrc/cktile_gemm_a8w8_bpreshuffle/gen_instances.py | Fixes boundary condition from > to >= for kernel ID validation to prevent invalid array access |
| aiter/utility/base_tuner.py | Adds sort_keys attribute for flexible sorting, implements profile file append logic in base tuner, and adds M/N position swap in GemmCommonTuner for proper ordering |
| aiter/fused_moe.py | Adds informative logging message about tuned config file location and environment variable usage |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
valarLip
approved these changes
Dec 12, 2025
zhuyuhua-v
pushed a commit
that referenced
this pull request
Dec 17, 2025
* refactor fmoe profile data, and log * Update fused_moe.py
ZhangLirong-amd
pushed a commit
that referenced
this pull request
Dec 29, 2025
* refactor fmoe profile data, and log * Update fused_moe.py
valarLip
pushed a commit
that referenced
this pull request
Mar 18, 2026
* refactor fmoe profile data, and log * Update fused_moe.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Technical Details
Test Plan
Test Result
Submission Checklist