[Feature] Enable DeepGEMM Linear on B200; 1.5% E2E throughput improvement (#23351)

Signed-off-by: yewentao256 <zhyanwentao@126.com>
This commit is contained in:
Wentao Ye
2025-08-21 21:01:08 -07:00
committed by GitHub
parent 3ac849665d
commit 394591e343
2 changed files with 13 additions and 16 deletions
+7
View File
@@ -202,6 +202,12 @@ def calc_diff(x: torch.Tensor, y: torch.Tensor):
return 1 - sim
def should_use_deepgemm_for_fp8_linear(output_dtype: torch.dtype,
weight: torch.Tensor):
return (is_deep_gemm_supported() and output_dtype == torch.bfloat16
and weight.shape[0] % 128 == 0 and weight.shape[1] % 128 == 0)
__all__ = [
"calc_diff",
"fp8_gemm_nt",
@@ -210,4 +216,5 @@ __all__ = [
"per_block_cast_to_fp8",
"is_blackwell_deep_gemm_e8m0_used",
"is_deep_gemm_supported",
"should_use_deepgemm_for_fp8_linear",
]