Skip to content

Commit

Permalink
Add a comment
Browse files Browse the repository at this point in the history
  • Loading branch information
asmeurer committed Sep 24, 2024
1 parent ab822f5 commit cb9acd4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions array_api_compat/torch/_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,10 @@ def default_dtypes(self, *, device=None):
'indexing': torch.int64}
"""
# Note: if the default is set to float64, the devices like MPS that
# don't support float64 will error. We still return the default_dtype
# value here because this error doesn't represent a different default
# per-device.
default_floating = torch.get_default_dtype()
default_complex = torch.complex64 if default_floating == torch.float32 else torch.complex128
default_integral = torch.int64
Expand Down

0 comments on commit cb9acd4

Please sign in to comment.