mbuali's picture
Upload folder using huggingface_hub
d1ceb73 verified
raw
history blame contribute delete
251 Bytes
# 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