Skip to content

Commit cb9acd4

Browse files
committed
Add a comment
1 parent ab822f5 commit cb9acd4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

array_api_compat/torch/_info.py

+4
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,10 @@ def default_dtypes(self, *, device=None):
147147
'indexing': torch.int64}
148148
149149
"""
150+
# Note: if the default is set to float64, the devices like MPS that
151+
# don't support float64 will error. We still return the default_dtype
152+
# value here because this error doesn't represent a different default
153+
# per-device.
150154
default_floating = torch.get_default_dtype()
151155
default_complex = torch.complex64 if default_floating == torch.float32 else torch.complex128
152156
default_integral = torch.int64

0 commit comments

Comments
 (0)