Skip to content

Commit 0c1a1b7

Browse files
authored
Correct some comments
1 parent a7a2721 commit 0c1a1b7

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

deepxde/backend/pytorch/tensor.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@
2424
fallback_device = torch.get_default_device()
2525
torch.set_default_device("mps")
2626

27-
# As of March 2025, the MacOS X-based GitHub Actions building enviroment sees
28-
# the MPS GPU, but can't access it. Thus as try-except workaround is applied.
27+
# As of March 2025, the macOS X-based GitHub Actions building environment sees
28+
# the MPS GPU, but cannot access it. So, a try-except workaround is applied.
2929
try:
30-
# A temporary trick to evade the Pytorch optimizer bug on MPS
30+
# A temporary trick to evade the Pytorch optimizer bug on MPS GPUs
3131
# See https://github.com/pytorch/pytorch/issues/149184
3232
torch._dynamo.disable()
3333

@@ -46,7 +46,7 @@
4646
import warnings
4747
warnings.warn(
4848
f'An MPS GPU has been detected, but cannot be used. '
49-
f'Falling back to CPU.\nThe exception message is:\n {e}'
49+
f'Falling back to the CPU.\nThe exception message is:\n {e}'
5050
)
5151
torch.set_default_device(fallback_device)
5252

0 commit comments

Comments
 (0)