[CPU] Optimize routed FP8/MXFP4 MoE GEMM dispatch (#50949)

Signed-off-by: Li, Tianmu <tianmu.li@intel.com>
This commit is contained in:
Tianmu Li
2026-08-08 12:56:14 +08:00
committed by GitHub
parent d3621c1eb3
commit 700d39b558
3 changed files with 110 additions and 5 deletions
+5
View File
@@ -59,6 +59,11 @@ inline bool can_use_brgemm<at::Float8_e4m3fn>(int M) {
return brgemm_supported() && M > 4;
}
template <typename T>
inline bool can_use_brgemm(int M, int N) {
return brgemm_supported() && (can_use_brgemm<T>(M) || N != block_size_n());
}
// work around compiler internal error
#define BLOCK_K 128 // 4 * TILE_K