You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We noticed ~18% performance drop in BERT model after #3768. It looks like this issue is due to a new flag in upstream LTC not being enabled by default here. This special scalar check is important for XLA to optimize ops like torch.addcdiv(a, b, c, value=1.0), torch.add(a, b, alpha=1.0) with constant folding.
🐛 Bug
We noticed ~18% performance drop in BERT model after #3768. It looks like this issue is due to a new flag in upstream LTC not being enabled by default here. This special scalar check is important for XLA to optimize ops like
torch.addcdiv(a, b, c, value=1.0), torch.add(a, b, alpha=1.0)
with constant folding.To Reproduce
HLO dump:
Note setting
torch_lazy_handle_special_scalars=True
solves the special scalar problem, but the result is improperly casted to fp64:Expected behavior
value=1.0
intorch.addcdiv
should be treated as constant.Environment
The text was updated successfully, but these errors were encountered: