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
Hi, I was working on some pytorch code that's designed to run on multiple backends, including TPU via xla. This code uses the torch.nan_to_num() function with infinities, which works on pytorch's CPU and GPU backend, but not on TPU.
🐛 Bug
Hi, I was working on some pytorch code that's designed to run on multiple backends, including TPU via xla. This code uses the
torch.nan_to_num()
function with infinities, which works on pytorch's CPU and GPU backend, but not on TPU.To Reproduce
Steps to reproduce the behavior:
This is the stack trace I get with the xla backend.
Expected behavior
The function should work the same way on all torch backends.
Environment
Additional context
As a workaround I'm able to use dtype.min/max in place of infinities, but it's still not ideal.
The text was updated successfully, but these errors were encountered: