-
Notifications
You must be signed in to change notification settings - Fork 66
feat(ep): add blockwise-FP8 combine to the AsyncLL (low-latency) path #465
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 2 commits
304eeaa
ee10897
10e4ef0
62a4ad3
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 |
|---|---|---|
|
|
@@ -205,7 +205,7 @@ def _test_dispatch_combine_multi_iteration( | |
| @pytest.mark.parametrize("max_num_inp_token_per_rank", (1, 128)) | ||
| @pytest.mark.parametrize("num_experts_per_rank", (32,)) | ||
| @pytest.mark.parametrize("num_experts_per_token", (8,)) | ||
| @pytest.mark.parametrize("quant_type", ("none", "fp8_direct_cast")) | ||
| @pytest.mark.parametrize("quant_type", ("none", "fp8_direct_cast", "fp8_blockwise")) | ||
|
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. could you help add 9 to num_experts_per_token @pytest.mark.parametrize("num_experts_per_token", (8, 9)) for test, ty!
Contributor
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. @jhchouuu Added num_experts_per_token=(8, 9), and top-9 now actually runs. The test's dispatch-result positional check (check_dispatch_result) doesn't support non-multiple-of-8 top-k, so for those cases the test validates the dispatch via the combine round-trip instead (a small _AsyncLLCombineOnlyTestCase that skips only the dispatch-side positional check). The dispatch data is correct at top-9 — the combine round-trip reconstructs it and production runs top-9 fine (gsm8k 0.967/0.947) — so nothing is dropped functionally: top-9 exercises the full dispatch+combine including the AccumNum=9 path, and top-8 keeps the full check. |
||
| def test_dispatch_combine( | ||
| torch_dist_process_manager, | ||
| world_size, | ||
|
|
@@ -220,6 +220,8 @@ def test_dispatch_combine( | |
| ): | ||
| if quant_type == "fp8_direct_cast" and data_type is not torch.bfloat16: | ||
| pytest.skip("fp8_direct_cast is only supported for bfloat16 data type") | ||
| if quant_type == "fp8_blockwise" and data_type is not torch.bfloat16: | ||
| pytest.skip("fp8_blockwise is only supported for bfloat16 data type") | ||
|
|
||
| for _ in range(world_size): | ||
| torch_dist_process_manager.task_queue.put( | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems UseFp8BlockwiseQuant is not used on EpCombineLowLatencyAsyncRecvTransfer_body...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch — removed. EpCombineLowLatencyAsyncRecvTransfer_body is the barrier and never reads the flag; only SendCopy/SendTransfer/RecvCopy have _fp8bwq variants. Dropped it back to template <typename T, bool UseFp8DirectCast>. No functional change