-
Notifications
You must be signed in to change notification settings - Fork 2.8k
[None][fix] Pass num_fused_shared_experts in FP8 MoE fallback-tactic path #17362
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -903,8 +903,8 @@ def __init__( | |
| # that influence tactic validity here. e.g. we are tuning FC1 and FC2 so the routing | ||
| # type does not matter | ||
| def unique_id(self): | ||
| return (self.top_k, self.intermediate_size, self.local_num_experts, | ||
| self.act_type) | ||
| return (self.top_k, self.num_fused_shared_experts, | ||
| self.intermediate_size, self.local_num_experts, self.act_type) | ||
|
|
||
| def get_runner(self): | ||
| instance_key = () | ||
|
|
@@ -922,8 +922,8 @@ def get_fallback_tactic(self, hidden_size: int, | |
| the profiling cache. The result depends only on the key below, so | ||
| memoize it the same way ``runner_dict`` memoizes the runner. | ||
| """ | ||
| key = (self.top_k, hidden_size, self.intermediate_size, | ||
| self.local_num_experts, num_tokens) | ||
| key = (self.top_k, self.num_fused_shared_experts, hidden_size, | ||
| self.intermediate_size, self.local_num_experts, num_tokens) | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This tuple is both the memo key and the positional argument list for get_valid_configs(*key) on line 931 — which is why #15297 updated the explicit get_valid_tactics() call site but missed this one. Could the two be split (pass the arguments explicitly, keep key as just the key), so both call sites look the same to a grep? Fine as a follow-up.
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Agreed. That tuple doing double duty as memo key and positional argument list for |
||
| tactic = FP8BlockScaleMoERunner.fallback_tactic_dict.get(key) | ||
| if tactic is None: | ||
| tactic = tuple( | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.