[SGLang-Diffusion] Fix custom op fake impl missing eps default for torch.compile (#19725)

Co-authored-by: Xiaoyu Zhang <35585791+BBuf@users.noreply.github.com>
This commit is contained in:
赵晨阳
2026-03-02 23:24:36 -08:00
committed by GitHub
parent 3c01b44700
commit 62480ebb1b

View File

@@ -341,7 +341,7 @@ def fused_norm_scale_shift(
@fused_norm_scale_shift.register_fake
def _fused_norm_scale_shift_fake(x, weight, bias, scale, shift, norm_type, eps):
def _fused_norm_scale_shift_fake(x, weight, bias, scale, shift, norm_type, eps=1e-5):
y = x.new_empty(x.shape)
return y
@@ -424,7 +424,7 @@ def fused_scale_residual_norm_scale_shift(
@fused_scale_residual_norm_scale_shift.register_fake
def _fused_scale_residual_norm_scale_shift_fake(
residual, x, gate, weight, bias, scale, shift, norm_type, eps
residual, x, gate, weight, bias, scale, shift, norm_type, eps=1e-5
):
y = x.new_empty(x.shape)
residual_out = x.new_empty(x.shape)