[Bugfix] Fix benchmark_moe.py inplace assertion with torch >= 2.9 (#34149)
Signed-off-by: Matthias Gehre <matthias.gehre@amd.com>
This commit is contained in:
@@ -226,9 +226,10 @@ def benchmark_config(
|
|||||||
x, input_gating, topk, renormalize=not use_deep_gemm
|
x, input_gating, topk, renormalize=not use_deep_gemm
|
||||||
)
|
)
|
||||||
|
|
||||||
|
inplace = not disable_inplace()
|
||||||
if use_deep_gemm:
|
if use_deep_gemm:
|
||||||
return deep_gemm_experts(
|
return deep_gemm_experts(
|
||||||
x, w1, w2, topk_weights, topk_ids, inplace=True
|
x, w1, w2, topk_weights, topk_ids, inplace=inplace
|
||||||
)
|
)
|
||||||
return fused_experts(
|
return fused_experts(
|
||||||
x,
|
x,
|
||||||
@@ -236,7 +237,7 @@ def benchmark_config(
|
|||||||
w2,
|
w2,
|
||||||
topk_weights,
|
topk_weights,
|
||||||
topk_ids,
|
topk_ids,
|
||||||
inplace=True,
|
inplace=inplace,
|
||||||
quant_config=quant_config,
|
quant_config=quant_config,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user