Files
INTUIA/Programa final/_internal/torch/utils/_mode_utils.py
T

12 lines
251 B
Python
Raw Normal View History

2026-03-15 13:27:50 +00:00
# mypy: allow-untyped-defs
import torch
from typing import TypeVar
T = TypeVar('T')
# returns if all are the same mode
def all_same_mode(modes):
return all(tuple(mode == modes[0] for mode in modes))
no_dispatch = torch._C._DisableTorchDispatch