2
# mypy: disable-error-code="type-arg"
4
from typing import List, Literal, Optional, overload, Sequence, Tuple, Union
6
from torch import memory_format, Tensor
7
from torch.types import _bool, _device, _dtype, _int, _size
9
# Defined in tools/autograd/templates/python_nn_functions.cpp
13
# Defined in aten/src/ATen/native/mkldnn/Linear.cpp
14
def mkldnn_linear(input: Tensor, weight: Tensor, bias: Optional[Tensor]) -> Tensor: ...
16
# Defined at aten/src/ATen/native/mkldnn/MKLDNNConversions.cpp
17
def mkldnn_reorder_conv2d_weight(
24
def mkldnn_reorder_conv3d_weight(
32
# Defined in aten/src/ATen/native/mkldnn/Prelu.cpp
33
def mkldnn_prelu(input: Tensor, weight: Tensor) -> Tensor: ...
35
# Defined at tools/autograd/templates/python_nn_functions.cpp
43
memory_format: memory_format,
44
) -> Tuple[_device, _dtype, _bool, memory_format]: ...
51
memory_format: memory_format,
52
) -> Tuple[_device, _dtype, _bool, memory_format]: ...
59
memory_format: memory_format,
60
) -> Tuple[_device, _dtype, _bool, memory_format]: ...
62
# Defined in aten/src/ATen/native/PackedSequence.cpp
64
sequences: Union[List[Tensor], Tuple[Tensor, ...]],
65
batch_first: bool = False,
66
padding_value: float = 0.0,
67
padding_side: Union[Literal["left", "right"], str] = "right",
69
def flatten_dense_tensors(tensors: List[Tensor]) -> Tensor: ...
70
def unflatten_dense_tensors(flat: Tensor, tensors: List[Tensor]) -> List[Tensor]: ...