Skip to content

Implementing bandwidth metrics for performance tests#2020

Draft
a32543254 with Copilot wants to merge 17 commits into
mainfrom
copilot/add-bandwidth-metrics
Draft

Implementing bandwidth metrics for performance tests#2020
a32543254 with Copilot wants to merge 17 commits into
mainfrom
copilot/add-bandwidth-metrics

Conversation

Copilot AI commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Pull request created by AI Agent

Per feedback, the Triton dequant kernels must not be modified. This
reverts the tiling changes to triton_utils/dequant.py and
triton_utils_zp/dequant.py back to their original implementation.

The XPU-path dequant performance work stays in the ARK moe prefill
test helpers (contiguous stack+reshape unpack instead of strided
scatter writes) plus the added dequant-bandwidth metric.
Add a dequant-only entry point (`moe_gemm_prefill_dequant`) that runs
only the internal `[E,N,K_packed] -> [E,K,N]` weight-dequant stage of
`moe_gemm_prefill` (the `dequant_to_KN` kernel) without the Grouped GEMM,
so its throughput can be benchmarked in isolation.

- C++: `moe_gemm_prefill_dequant` free fn in sycl_tla_moe_mixed.hpp
- C++: wrapper + pybind registration in ark.cpp
- Python: `moe_gemm_prefill_dequant` wrapper returning [E,K,N] weights
- Test: `deq_bw` for INT4/INT8/INT2/FP8 rows now measures the interface's
  internal dequant instead of the PyTorch reference dequant; rename column
  to `deq BW GB/s` and document the new semantics.
@a32543254

Copy link
Copy Markdown
Contributor
<style> </style>
                     
                     
sym (group_size=128, act=float16) -- ark.moe_gemm_prefill (prefill) vs single torch.bmm (weights  
    E N K tokens baseline(ms) ark(ms) deq BW GB/s  
                     
real up 2K 192 1536 3072 16384 14.6865 14.1911 314.86 0.699689
real down 2K 192 3072 1536 16384 15.0084 14.6343 305.09 0.677978
                     
                     
                     
sym (group_size=128, act=bfloat16) -- ark.moe_gemm_prefill (prefill) vs single torch.bmm (weights  
    E N K tokens baseline(ms) ark(ms) deq BW GB/s  
                     
real up 2K 192 1536 3072 16384 14.6909 14.2005 312.12 0.6936
real down 2K 192 3072 1536 16384 15.0041 14.6205 300.23 0.667178
                     
                     
                     
asym (group_size=128, act=float16) -- ark.moe_gemm_prefill (prefill) vs single torch.bmm (weights  
    E N K tokens baseline(ms) ark(ms) deq BW GB/s  
                     
real up 2K 192 1536 3072 16384 14.6811 14.4856 303.24 0.673867
real down 2K 192 3072 1536 16384 15.011 14.9246 292.25 0.649444
                     
                     
                     
asym (group_size=128, act=bfloat16) -- ark.moe_gemm_prefill (prefill) vs single torch.bmm (weights  
    E N K tokens baseline(ms) ark(ms) deq BW GB/s  
                     
real up 2K 192 1536 3072 16384 14.6851 14.6171 296.99 0.659978
real down 2K 192 3072 1536 16384 15.005 15.2389 283.22 0.629378
                     
                     
                     
                     
                     
                     
sym (group_size=128, act=float16) -- ark.moe_gemm_prefill (prefill) vs single torch.bmm (weights  
    E N K tokens baseline(ms) ark(ms) deq BW GB/s  
                     
real up 2K 192 1536 3072 16384 14.6789 22.4039 319.5 0.71
real down 2K 192 3072 1536 16384 15.0343 20.3433 318.2 0.707111
                     
                     
                     
sym (group_size=128, act=bfloat16) -- ark.moe_gemm_prefill (prefill) vs single torch.bmm (weights  
    E N K tokens baseline(ms) ark(ms) deq BW GB/s  
                     
real up 2K 192 1536 3072 16384 14.6832 22.9947 301.64 0.670311
real down 2K 192 3072 1536 16384 15.0001 20.8732 310.29 0.689533
                     
                     
                     
asym (group_size=128, act=float16) -- ark.moe_gemm_prefill (prefill) vs single torch.bmm (weights  
    E N K tokens baseline(ms) ark(ms) deq BW GB/s  
                     
real up 2K 192 1536 3072 16384 14.6745 13.5852 309.78 0.6884
real down 2K 192 3072 1536 16384 15.0303 13.5245 322.5 0.716667
                     
                     
                     
asym (group_size=128, act=bfloat16) -- ark.moe_gemm_prefill (prefill) vs single torch.bmm (weights  
    E N K tokens baseline(ms) ark(ms) deq BW GB/s  
                     
real up 2K 192 1536 3072 16384 14.676 14.3689 279.72 0.6216
real down 2K 192 3072 1536 16384 15.0051 14.0015 302.12 0.671378

Signed-off-by: Dong, Bo1 <bo1.dong@intel.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