mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-07 12:21:27 +01:00
See https://github.com/pytorch/pytorch/pull/129751#issue-2380881501. Most changes are auto-generated by linter. You can review these PRs via: ```bash git diff --ignore-all-space --ignore-blank-lines HEAD~1 ``` Pull Request resolved: https://github.com/pytorch/pytorch/pull/129769 Approved by: https://github.com/ezyang
12 lines
230 B
Python
12 lines
230 B
Python
# mypy: allow-untyped-defs
|
|
from importlib.util import find_spec
|
|
|
|
import torch
|
|
|
|
|
|
__all__ = ["amp_definitely_not_available"]
|
|
|
|
|
|
def amp_definitely_not_available():
|
|
return not (torch.cuda.is_available() or find_spec("torch_xla"))
|