Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
[SGLang-Diffusion] Fix fake impl eps default for torch.compile tracing
Add default value `eps=1e-5` to `register_fake` implementations of
`fused_norm_scale_shift` and `fused_scale_residual_norm_scale_shift`
custom ops, matching the default in the actual custom_op signatures.

Made-with: Cursor
  • Loading branch information
zhaochenyang20 committed Mar 3, 2026
commit 1687b2beb2cc0bbc6f1a96de8b1367cd6af9d745
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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)
Expand Down
Loading