mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-21 05:34:18 +08:00
Pull Request resolved: https://github.com/pytorch/pytorch/pull/150732 Approved by: https://github.com/malfet, https://github.com/cyyever, https://github.com/aorenste
38 lines
629 B
Python
38 lines
629 B
Python
# ${generated_comment}
|
|
# mypy: disable-error-code="type-arg"
|
|
# mypy: allow-untyped-defs
|
|
# ruff: noqa: F401,PYI054
|
|
|
|
from collections.abc import Sequence
|
|
from types import EllipsisType
|
|
from typing import Any, Callable, Literal, overload, TypeVar
|
|
|
|
import torch
|
|
from torch import (
|
|
contiguous_format,
|
|
Generator,
|
|
inf,
|
|
memory_format,
|
|
strided,
|
|
SymInt,
|
|
Tensor,
|
|
)
|
|
from torch._prims_common import DeviceLikeType
|
|
from torch.types import (
|
|
_bool,
|
|
_complex,
|
|
_device,
|
|
_dtype,
|
|
_float,
|
|
_int,
|
|
_layout,
|
|
_qscheme,
|
|
_size,
|
|
Device,
|
|
Number,
|
|
)
|
|
|
|
${all_directive}
|
|
|
|
${function_hints}
|