assassinlike commited on
Commit
07dde6a
·
verified ·
1 Parent(s): 7f1e22c

Add files using upload-large-folder tool

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. data/home/.local/lib/python3.8/site-packages/torch/_C/_VariableFunctions.pyi +0 -0
  2. data/home/.local/lib/python3.8/site-packages/torch/_C/__init__.pyi +0 -0
  3. data/home/.local/lib/python3.8/site-packages/torch/_C/_aoti.pyi +21 -0
  4. data/home/.local/lib/python3.8/site-packages/torch/_C/_autograd.pyi +127 -0
  5. data/home/.local/lib/python3.8/site-packages/torch/_C/_cpu.pyi +7 -0
  6. data/home/.local/lib/python3.8/site-packages/torch/_C/_cudnn.pyi +17 -0
  7. data/home/.local/lib/python3.8/site-packages/torch/_C/_distributed_autograd.pyi +27 -0
  8. data/home/.local/lib/python3.8/site-packages/torch/_C/_distributed_c10d.pyi +639 -0
  9. data/home/.local/lib/python3.8/site-packages/torch/_C/_distributed_rpc.pyi +189 -0
  10. data/home/.local/lib/python3.8/site-packages/torch/_C/_distributed_rpc_testing.pyi +35 -0
  11. data/home/.local/lib/python3.8/site-packages/torch/_C/_functions.pyi +11 -0
  12. data/home/.local/lib/python3.8/site-packages/torch/_C/_functorch.pyi +84 -0
  13. data/home/.local/lib/python3.8/site-packages/torch/_C/_itt.pyi +5 -0
  14. data/home/.local/lib/python3.8/site-packages/torch/_C/_lazy.pyi +29 -0
  15. data/home/.local/lib/python3.8/site-packages/torch/_C/_lazy_ts_backend.pyi +12 -0
  16. data/home/.local/lib/python3.8/site-packages/torch/_C/_monitor.pyi +44 -0
  17. data/home/.local/lib/python3.8/site-packages/torch/_C/_nn.pyi +86 -0
  18. data/home/.local/lib/python3.8/site-packages/torch/_C/_nvtx.pyi +7 -0
  19. data/home/.local/lib/python3.8/site-packages/torch/_C/_onnx.pyi +40 -0
  20. data/home/.local/lib/python3.8/site-packages/torch/_C/_profiler.pyi +244 -0
  21. data/home/.local/lib/python3.8/site-packages/torch/_C/_verbose.pyi +3 -0
  22. data/home/.local/lib/python3.8/site-packages/torch/__pycache__/_VF.cpython-38.pyc +0 -0
  23. data/home/.local/lib/python3.8/site-packages/torch/__pycache__/__config__.cpython-38.pyc +0 -0
  24. data/home/.local/lib/python3.8/site-packages/torch/__pycache__/__future__.cpython-38.pyc +0 -0
  25. data/home/.local/lib/python3.8/site-packages/torch/__pycache__/__init__.cpython-38.pyc +0 -0
  26. data/home/.local/lib/python3.8/site-packages/torch/__pycache__/_appdirs.cpython-38.pyc +0 -0
  27. data/home/.local/lib/python3.8/site-packages/torch/__pycache__/_classes.cpython-38.pyc +0 -0
  28. data/home/.local/lib/python3.8/site-packages/torch/__pycache__/_compile.cpython-38.pyc +0 -0
  29. data/home/.local/lib/python3.8/site-packages/torch/__pycache__/_custom_ops.cpython-38.pyc +0 -0
  30. data/home/.local/lib/python3.8/site-packages/torch/__pycache__/_deploy.cpython-38.pyc +0 -0
  31. data/home/.local/lib/python3.8/site-packages/torch/__pycache__/_guards.cpython-38.pyc +0 -0
  32. data/home/.local/lib/python3.8/site-packages/torch/__pycache__/_jit_internal.cpython-38.pyc +0 -0
  33. data/home/.local/lib/python3.8/site-packages/torch/__pycache__/_linalg_utils.cpython-38.pyc +0 -0
  34. data/home/.local/lib/python3.8/site-packages/torch/__pycache__/_lobpcg.cpython-38.pyc +0 -0
  35. data/home/.local/lib/python3.8/site-packages/torch/__pycache__/_lowrank.cpython-38.pyc +0 -0
  36. data/home/.local/lib/python3.8/site-packages/torch/__pycache__/_namedtensor_internals.cpython-38.pyc +0 -0
  37. data/home/.local/lib/python3.8/site-packages/torch/__pycache__/_ops.cpython-38.pyc +0 -0
  38. data/home/.local/lib/python3.8/site-packages/torch/__pycache__/_python_dispatcher.cpython-38.pyc +0 -0
  39. data/home/.local/lib/python3.8/site-packages/torch/__pycache__/_size_docs.cpython-38.pyc +0 -0
  40. data/home/.local/lib/python3.8/site-packages/torch/__pycache__/_sources.cpython-38.pyc +0 -0
  41. data/home/.local/lib/python3.8/site-packages/torch/__pycache__/_storage_docs.cpython-38.pyc +0 -0
  42. data/home/.local/lib/python3.8/site-packages/torch/__pycache__/_streambase.cpython-38.pyc +0 -0
  43. data/home/.local/lib/python3.8/site-packages/torch/__pycache__/_tensor.cpython-38.pyc +0 -0
  44. data/home/.local/lib/python3.8/site-packages/torch/__pycache__/_tensor_str.cpython-38.pyc +0 -0
  45. data/home/.local/lib/python3.8/site-packages/torch/__pycache__/_utils.cpython-38.pyc +0 -0
  46. data/home/.local/lib/python3.8/site-packages/torch/__pycache__/_utils_internal.cpython-38.pyc +0 -0
  47. data/home/.local/lib/python3.8/site-packages/torch/__pycache__/_vmap_internals.cpython-38.pyc +0 -0
  48. data/home/.local/lib/python3.8/site-packages/torch/__pycache__/_weights_only_unpickler.cpython-38.pyc +0 -0
  49. data/home/.local/lib/python3.8/site-packages/torch/__pycache__/functional.cpython-38.pyc +0 -0
  50. data/home/.local/lib/python3.8/site-packages/torch/__pycache__/hub.cpython-38.pyc +0 -0
data/home/.local/lib/python3.8/site-packages/torch/_C/_VariableFunctions.pyi ADDED
The diff for this file is too large to render. See raw diff
 
data/home/.local/lib/python3.8/site-packages/torch/_C/__init__.pyi ADDED
The diff for this file is too large to render. See raw diff
 
data/home/.local/lib/python3.8/site-packages/torch/_C/_aoti.pyi ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from ctypes import c_void_p
2
+ from typing import List
3
+
4
+ from torch import Tensor
5
+
6
+ # Defined in torch/csrc/inductor/aoti_runner/pybind.cpp
7
+
8
+ # Tensor to AtenTensorHandle
9
+ def unsafe_alloc_void_ptrs_from_tensors(tensors: List[Tensor]) -> List[c_void_p]: ...
10
+ def unsafe_alloc_void_ptr_from_tensor(tensor: Tensor) -> c_void_p: ...
11
+
12
+ # AtenTensorHandle to Tensor
13
+ def alloc_tensors_by_stealing_from_void_ptrs(
14
+ handles: List[c_void_p],
15
+ ) -> List[Tensor]: ...
16
+ def alloc_tensor_by_stealing_from_void_ptr(
17
+ handle: c_void_p,
18
+ ) -> Tensor: ...
19
+
20
+ class AOTIModelContainerRunnerCpu: ...
21
+ class AOTIModelContainerRunnerCuda: ...
data/home/.local/lib/python3.8/site-packages/torch/_C/_autograd.pyi ADDED
@@ -0,0 +1,127 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # mypy: allow-untyped-defs
2
+ from enum import Enum
3
+ from typing import Any, Callable, List, Optional, Set
4
+
5
+ import torch
6
+
7
+ from ._profiler import (
8
+ _ProfilerEvent,
9
+ ActiveProfilerType,
10
+ ProfilerActivity,
11
+ ProfilerConfig,
12
+ )
13
+
14
+ # Defined in torch/csrc/autograd/init.cpp
15
+
16
+ class DeviceType(Enum):
17
+ CPU = ...
18
+ CUDA = ...
19
+ XPU = ...
20
+ MKLDNN = ...
21
+ OPENGL = ...
22
+ OPENCL = ...
23
+ IDEEP = ...
24
+ HIP = ...
25
+ FPGA = ...
26
+ MAIA = ...
27
+ XLA = ...
28
+ MTIA = ...
29
+ MPS = ...
30
+ HPU = ...
31
+ Meta = ...
32
+ Vulkan = ...
33
+ Metal = ...
34
+ PrivateUse1 = ...
35
+
36
+ class ProfilerEvent:
37
+ def cpu_elapsed_us(self, other: ProfilerEvent) -> float: ...
38
+ def cpu_memory_usage(self) -> int: ...
39
+ def cuda_elapsed_us(self, other: ProfilerEvent) -> float: ...
40
+ def privateuse1_elapsed_us(self, other: ProfilerEvent) -> float: ...
41
+ def cuda_memory_usage(self) -> int: ...
42
+ def device(self) -> int: ...
43
+ def handle(self) -> int: ...
44
+ def has_cuda(self) -> bool: ...
45
+ def is_remote(self) -> bool: ...
46
+ def kind(self) -> int: ...
47
+ def name(self) -> str: ...
48
+ def node_id(self) -> int: ...
49
+ def sequence_nr(self) -> int: ...
50
+ def shapes(self) -> List[List[int]]: ...
51
+ def thread_id(self) -> int: ...
52
+ def flops(self) -> float: ...
53
+ def is_async(self) -> bool: ...
54
+
55
+ class _KinetoEvent:
56
+ def name(self) -> str: ...
57
+ def device_index(self) -> int: ...
58
+ def device_resource_id(self) -> int: ...
59
+ def start_ns(self) -> int: ...
60
+ def duration_ns(self) -> int: ...
61
+ def is_async(self) -> bool: ...
62
+ def linked_correlation_id(self) -> int: ...
63
+ def shapes(self) -> List[List[int]]: ...
64
+ def dtypes(self) -> List[str]: ...
65
+ def concrete_inputs(self) -> List[Any]: ...
66
+ def device_type(self) -> DeviceType: ...
67
+ def start_thread_id(self) -> int: ...
68
+ def end_thread_id(self) -> int: ...
69
+ def correlation_id(self) -> int: ...
70
+ def fwd_thread_id(self) -> int: ...
71
+ def stack(self) -> List[str]: ...
72
+ def scope(self) -> int: ...
73
+ def sequence_nr(self) -> int: ...
74
+ def flops(self) -> int: ...
75
+ def cuda_elapsed_us(self) -> int: ...
76
+ def privateuse1_elapsed_us(self) -> int: ...
77
+
78
+ class _ProfilerResult:
79
+ def events(self) -> List[_KinetoEvent]: ...
80
+ def legacy_events(self) -> List[List[ProfilerEvent]]: ...
81
+ def save(self, path: str) -> None: ...
82
+ def experimental_event_tree(self) -> List[_ProfilerEvent]: ...
83
+ def trace_start_ns(self) -> int: ...
84
+
85
+ class SavedTensor: ...
86
+
87
+ def _enable_profiler(
88
+ config: ProfilerConfig,
89
+ activities: Set[ProfilerActivity],
90
+ ) -> None: ...
91
+ def _prepare_profiler(
92
+ config: ProfilerConfig,
93
+ activities: Set[ProfilerActivity],
94
+ ) -> None: ...
95
+ def _disable_profiler() -> _ProfilerResult: ...
96
+ def _profiler_enabled() -> bool: ...
97
+ def _add_metadata_json(key: str, value: str) -> None: ...
98
+ def _kineto_step() -> None: ...
99
+ def _get_sequence_nr() -> int: ...
100
+ def kineto_available() -> bool: ...
101
+ def _record_function_with_args_enter(name: str, *args) -> torch.Tensor: ...
102
+ def _record_function_with_args_exit(handle: torch.Tensor) -> None: ...
103
+ def _supported_activities() -> Set[ProfilerActivity]: ...
104
+ def _enable_record_function(enable: bool) -> None: ...
105
+ def _set_empty_test_observer(is_global: bool, sampling_prob: float) -> None: ...
106
+ def _push_saved_tensors_default_hooks(
107
+ pack_hook: Callable[[torch.Tensor], Any],
108
+ unpack_hook: Callable[[Any], torch.Tensor],
109
+ ) -> None: ...
110
+ def _pop_saved_tensors_default_hooks() -> None: ...
111
+ def _unsafe_set_version_counter(t: torch.Tensor, prev_version: int) -> None: ...
112
+ def _enable_profiler_legacy(config: ProfilerConfig) -> None: ...
113
+ def _disable_profiler_legacy() -> List[List[ProfilerEvent]]: ...
114
+ def _profiler_type() -> ActiveProfilerType: ...
115
+ def _saved_tensors_hooks_enable() -> None: ...
116
+ def _saved_tensors_hooks_disable(message: str) -> None: ...
117
+ def _saved_tensors_hooks_get_disabled_error_message() -> Optional[str]: ...
118
+
119
+ class CreationMeta(Enum):
120
+ DEFAULT = ...
121
+ IN_CUSTOM_FUNCTION = ...
122
+ MULTI_OUTPUT_NODE = ...
123
+ NO_GRAD_MODE = ...
124
+ INFERENCE_MODE = ...
125
+
126
+ def _set_creation_meta(t: torch.Tensor, creation_meta: CreationMeta) -> None: ...
127
+ def _get_creation_meta(t: torch.Tensor) -> CreationMeta: ...
data/home/.local/lib/python3.8/site-packages/torch/_C/_cpu.pyi ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ from torch.types import _bool
2
+
3
+ # Defined in torch/csrc/cpu/Module.cpp
4
+
5
+ def _is_cpu_support_avx2() -> _bool: ...
6
+ def _is_cpu_support_avx512() -> _bool: ...
7
+ def _is_cpu_support_vnni() -> _bool: ...
data/home/.local/lib/python3.8/site-packages/torch/_C/_cudnn.pyi ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from enum import Enum
2
+
3
+ from torch.types import _bool, Tuple
4
+
5
+ # Defined in torch/csrc/cuda/shared/cudnn.cpp
6
+ is_cuda: _bool
7
+
8
+ def getRuntimeVersion() -> Tuple[int, int, int]: ...
9
+ def getCompileVersion() -> Tuple[int, int, int]: ...
10
+ def getVersionInt() -> int: ...
11
+
12
+ class RNNMode(int, Enum):
13
+ value: int
14
+ rnn_relu = ...
15
+ rnn_tanh = ...
16
+ lstm = ...
17
+ gru = ...
data/home/.local/lib/python3.8/site-packages/torch/_C/_distributed_autograd.pyi ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # mypy: allow-untyped-defs
2
+ from typing import Any, Dict, List, Set
3
+
4
+ import torch
5
+
6
+ # This module is defined in torch/csrc/distributed/autograd/init.cpp
7
+
8
+ class DistAutogradContext:
9
+ def _context_id(self) -> int: ...
10
+ def _recv_functions(self) -> Dict[int, Any]: ...
11
+ def _send_functions(self) -> Dict[int, Any]: ...
12
+ def _known_worker_ids(self) -> Set[int]: ...
13
+
14
+ def _new_context() -> DistAutogradContext: ...
15
+ def _release_context(context_id: int) -> None: ...
16
+ def _get_max_id() -> int: ...
17
+ def _is_valid_context(worker_id: int) -> bool: ...
18
+ def _retrieve_context(context_id: int) -> DistAutogradContext: ...
19
+ def _current_context() -> DistAutogradContext: ...
20
+ def _init(worker_id: int) -> None: ...
21
+ def _get_debug_info() -> Dict[str, str]: ...
22
+ def backward(
23
+ context_id: int,
24
+ roots: List[torch.Tensor],
25
+ retain_graph=False,
26
+ ) -> None: ...
27
+ def get_gradients(context_id: int) -> Dict[torch.Tensor, torch.Tensor]: ...
data/home/.local/lib/python3.8/site-packages/torch/_C/_distributed_c10d.pyi ADDED
@@ -0,0 +1,639 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # mypy: allow-untyped-defs
2
+ # mypy: disable-error-code="type-arg"
3
+ from datetime import timedelta
4
+ from enum import Enum
5
+ from typing import Any, Dict, List, Optional, overload, Tuple, Union
6
+
7
+ import torch
8
+ from torch import Tensor
9
+ from torch._C import ScriptObject
10
+ from torch.futures import Future
11
+
12
+ # This module is defined in torch/csrc/distributed/c10d/init.cpp
13
+
14
+ _DEFAULT_FIRST_BUCKET_BYTES: int
15
+ _DEFAULT_NO_TIMEOUT: timedelta
16
+ _DEFAULT_PG_TIMEOUT: timedelta
17
+ _DEFAULT_PG_NCCL_TIMEOUT: timedelta
18
+
19
+ class BuiltinCommHookType(Enum):
20
+ ALLREDUCE = ...
21
+ FP16_COMPRESS = ...
22
+
23
+ def _register_comm_hook(reducer: Reducer, state: Any, comm_hook: Any): ...
24
+ def _register_builtin_comm_hook(
25
+ reducer: Reducer,
26
+ comm_hook_type: BuiltinCommHookType,
27
+ ): ...
28
+ def _set_global_rank(rank: int) -> None: ...
29
+ def _hash_tensors(tensors: List[Tensor]) -> int: ...
30
+
31
+ class GradBucket:
32
+ def index(self) -> int: ...
33
+ def buffer(self) -> Tensor: ...
34
+ def gradients(self) -> List[Tensor]: ...
35
+ def is_last(self) -> bool: ...
36
+ def set_buffer(self, tensor: Tensor) -> None: ...
37
+ def parameters(self) -> List[Tensor]: ...
38
+
39
+ class Reducer:
40
+ def __init__(
41
+ self,
42
+ params: List[Tensor],
43
+ bucket_indices: List[List[int]],
44
+ per_bucket_size_limits: List[int],
45
+ process_group: ProcessGroup,
46
+ expect_sparse_gradients: List[bool] = ...,
47
+ bucket_bytes_cap: int = ..., # kDefaultBucketBytesCap in reducer.hpp
48
+ find_unused_parameters: bool = ...,
49
+ gradient_as_bucket_view: bool = ...,
50
+ param_to_name_mapping: Dict[int, str] = ...,
51
+ first_bucket_types_cap: int = ..., # kDefaultFirstBucketBytes in reducer.hpp
52
+ ): ...
53
+ def prepare_for_forward(self) -> None: ...
54
+ def prepare_for_backward(self, output: List[Tensor]) -> None: ...
55
+ def get_backward_stats(self) -> List[int]: ...
56
+ def _install_post_backward_futures(self, futures: List[Future]) -> None: ...
57
+ def _rebuild_buckets(self) -> bool: ...
58
+ def _get_zeros_like_grad_buckets(self) -> List[GradBucket]: ...
59
+ def _push_all_rebuilt_params(self) -> None: ...
60
+ def _set_forward_pass_work_handle(
61
+ self,
62
+ work: Work,
63
+ use_static_world_size: bool,
64
+ ): ...
65
+ def _get_local_used_map(self) -> Tensor: ...
66
+ def _set_ddp_runtime_logging_sample_rate(self, sample_rate: int) -> None: ...
67
+ def _set_static_graph(self) -> None: ...
68
+ def _run_comm_hook(self, bucket: GradBucket) -> Future: ...
69
+ def set_logger(self, logger: Logger) -> None: ...
70
+ def _remove_autograd_hooks(self) -> None: ...
71
+ def _check_reducer_finalized(self) -> None: ...
72
+ def _set_sparse_metadata(self, global_unique_ids: Dict[str, Tensor]) -> None: ...
73
+ def _reset_state(self) -> None: ...
74
+ def _update_process_group(self, new_process_group: ProcessGroup) -> None: ...
75
+
76
+ class DDPLoggingData:
77
+ strs_map: Dict[str, str]
78
+ ints_map: Dict[str, int]
79
+
80
+ class Logger:
81
+ def __init__(self, reducer: Reducer): ...
82
+ def set_construction_data_and_log(
83
+ self,
84
+ module_name: str,
85
+ device_ids: List[int],
86
+ output_device: int,
87
+ broadcast_buffers: bool,
88
+ has_sync_bn: bool,
89
+ static_graph: bool,
90
+ ): ...
91
+ def set_runtime_stats_and_log(self) -> None: ...
92
+ def set_error_and_log(self, error: str) -> None: ...
93
+ def _get_ddp_logging_data(self) -> DDPLoggingData: ...
94
+ def _set_comm_hook_name(self, comm_hook: str) -> None: ...
95
+ def _set_uneven_input_join(self) -> None: ...
96
+ def _set_static_graph(self) -> None: ...
97
+
98
+ class _WorkerServer:
99
+ def __init__(self, socket_path: str) -> None: ...
100
+ def shutdown(self) -> None: ...
101
+
102
+ def get_debug_level(): ...
103
+ def set_debug_level(): ...
104
+ def set_debug_level_from_env(): ...
105
+
106
+ class DebugLevel(Enum):
107
+ OFF = ...
108
+ INFO = ...
109
+ DETAIL = ...
110
+
111
+ class ReduceOp:
112
+ def __init__(self, op: RedOpType): ...
113
+
114
+ SUM: RedOpType = ...
115
+ AVG: RedOpType = ...
116
+ PRODUCT: RedOpType = ...
117
+ MIN: RedOpType = ...
118
+ MAX: RedOpType = ...
119
+ BAND: RedOpType = ...
120
+ BOR: RedOpType = ...
121
+ BXOR: RedOpType = ...
122
+ PREMUL_SUM: RedOpType = ...
123
+ UNUSED: RedOpType = ...
124
+
125
+ class RedOpType(Enum): ...
126
+
127
+ class BroadcastOptions:
128
+ rootRank: int
129
+ rootTensor: int
130
+ timeout: timedelta
131
+ asyncOp: bool
132
+
133
+ class AllreduceOptions:
134
+ reduceOp: ReduceOp
135
+ timeout: timedelta
136
+
137
+ class AllreduceCoalescedOptions(AllreduceOptions): ...
138
+
139
+ class ReduceOptions:
140
+ reduceOp: ReduceOp
141
+ rootRank: int
142
+ rootTensor: int
143
+ timeout: timedelta
144
+
145
+ class AllgatherOptions:
146
+ timeout: timedelta
147
+ asyncOp: bool
148
+
149
+ class GatherOptions:
150
+ rootRank: int
151
+ timeout: timedelta
152
+
153
+ class ScatterOptions:
154
+ rootRank: int
155
+ timeout: timedelta
156
+ asyncOp: bool
157
+
158
+ class ReduceScatterOptions:
159
+ reduceOp: ReduceOp
160
+ timeout: timedelta
161
+ asyncOp: bool
162
+
163
+ class BarrierOptions:
164
+ device_ids: List[int]
165
+ device: torch.device
166
+ timeout: timedelta
167
+
168
+ class AllToAllOptions:
169
+ timeout: timedelta
170
+
171
+ class Store:
172
+ def set(self, key: str, value: str): ...
173
+ def get(self, key: str) -> bytes: ...
174
+ def add(self, key: str, value: int) -> int: ...
175
+ def compare_set(
176
+ self,
177
+ key: str,
178
+ expected_value: str,
179
+ desired_value: str,
180
+ ) -> bytes: ...
181
+ def delete_key(self, key: str) -> bool: ...
182
+ def num_keys(self) -> int: ...
183
+ def set_timeout(self, timeout: timedelta): ...
184
+ @overload
185
+ def wait(self, keys: List[str]): ...
186
+ @overload
187
+ def wait(self, keys: List[str], timeout: timedelta): ...
188
+
189
+ class FileStore(Store):
190
+ def __init__(self, path: str, numWorkers: int = ...): ...
191
+
192
+ class HashStore(Store):
193
+ def __init__(self): ...
194
+
195
+ class TCPStore(Store):
196
+ def __init__(
197
+ self,
198
+ host_name: str,
199
+ port: int,
200
+ world_size: Optional[int] = ...,
201
+ is_master: bool = ...,
202
+ timeout: timedelta = ...,
203
+ wait_for_workers: bool = ...,
204
+ multi_tenant: bool = ...,
205
+ master_listen_fd: Optional[int] = ...,
206
+ use_libuv: Optional[bool] = ...,
207
+ ): ...
208
+ @property
209
+ def host(self) -> str: ...
210
+ @property
211
+ def port(self) -> int: ...
212
+
213
+ class PrefixStore(Store):
214
+ def __init__(self, prefix: str, store: Store): ...
215
+ @property
216
+ def underlying_store(self) -> Store: ...
217
+
218
+ class _ControlCollectives:
219
+ def barrier(self, key: str, timeout: timedelta, blocking: bool) -> None: ...
220
+ def broadcast_send(self, key: str, data: str, timeout: timedelta) -> None: ...
221
+ def broadcast_recv(self, key: str, timeout: timedelta) -> str: ...
222
+ def gather_send(self, key: str, data: str, timeout: timedelta) -> None: ...
223
+ def gather_recv(self, key: str, timeout: timedelta) -> str: ...
224
+ def scatter_send(self, key: str, data: str, timeout: timedelta) -> None: ...
225
+ def scatter_recv(self, key: str, timeout: timedelta) -> str: ...
226
+ def all_gather(self, key: str, data: str, timeout: timedelta) -> str: ...
227
+ def all_sum(self, key: str, data: int, timeout: timedelta) -> int: ...
228
+
229
+ class _StoreCollectives(_ControlCollectives):
230
+ def __init__(self, store: Store, rank: int, world_size: int) -> None: ...
231
+
232
+ class _DistributedBackendOptions:
233
+ def __init__(self): ...
234
+ @property
235
+ def store(self) -> Store: ...
236
+ @store.setter
237
+ def store(self, store: Store) -> None: ...
238
+ @property
239
+ def group_rank(self) -> int: ...
240
+ @group_rank.setter
241
+ def group_rank(self, rank: int) -> None: ...
242
+ @property
243
+ def group_size(self) -> int: ...
244
+ @group_size.setter
245
+ def group_size(self, size: int) -> None: ...
246
+ @property
247
+ def timeout(self) -> timedelta: ...
248
+ @timeout.setter
249
+ def timeout(self, timeout: timedelta) -> None: ...
250
+ @property
251
+ def group_id(self) -> str: ...
252
+ @group_id.setter
253
+ def group_id(self, group_id: str) -> None: ...
254
+ @property
255
+ def global_ranks_in_group(self) -> List[int]: ...
256
+ @global_ranks_in_group.setter
257
+ def global_ranks_in_group(self, ranks: List[int]) -> None: ...
258
+
259
+ class Work:
260
+ def is_completed(self) -> bool: ...
261
+ def is_success(self) -> bool: ...
262
+ def exception(self) -> Any: ...
263
+ def wait(self, timeout: timedelta = ...) -> bool: ...
264
+ def get_future(self) -> Future: ...
265
+ def source_rank(self) -> int: ...
266
+ def _source_rank(self) -> int: ...
267
+ def result(self) -> List[Tensor]: ...
268
+ def synchronize(self): ...
269
+ def boxed(self) -> ScriptObject: ...
270
+ @staticmethod
271
+ def unbox(obj: ScriptObject) -> Work: ...
272
+
273
+ class Backend:
274
+ def __init__(
275
+ self,
276
+ rank: int,
277
+ size: int,
278
+ ): ...
279
+ @property
280
+ def supports_splitting(self) -> bool: ...
281
+ def rank(self) -> int: ...
282
+ def size(self) -> int: ...
283
+ def eager_connect_single_device(self, device: Optional[torch.device]) -> None: ...
284
+ def _set_sequence_number_for_group(self) -> None: ...
285
+
286
+ class ProcessGroup:
287
+ class Options:
288
+ def __init__(self, backend: str, timeout: timedelta = ...): ...
289
+ @property
290
+ def backend(self) -> str: ...
291
+ @property
292
+ def _timeout(self) -> timedelta: ...
293
+ @_timeout.setter
294
+ def _timeout(self, val: timedelta) -> None: ...
295
+
296
+ class BackendType(Enum):
297
+ UNDEFINED = ...
298
+ GLOO = ...
299
+ NCCL = ...
300
+ UCC = ...
301
+ MPI = ...
302
+ CUSTOM = ...
303
+ def __init__(self, store: Store, rank: int, size: int, options: Options): ...
304
+ def rank(self) -> int: ...
305
+ def size(self) -> int: ...
306
+ @overload
307
+ def broadcast(
308
+ self,
309
+ tensors: List[Tensor],
310
+ opts=...,
311
+ ) -> Work: ...
312
+ @overload
313
+ def broadcast(
314
+ self,
315
+ tensor: Tensor,
316
+ root: int,
317
+ ) -> Work: ...
318
+ @overload
319
+ def allreduce(
320
+ self,
321
+ tensors: List[Tensor],
322
+ opts: AllreduceOptions = ...,
323
+ ) -> Work: ...
324
+ @overload
325
+ def allreduce(
326
+ self,
327
+ tensors: List[Tensor],
328
+ op=...,
329
+ ) -> Work: ...
330
+ @overload
331
+ def allreduce(
332
+ self,
333
+ tensor: Tensor,
334
+ op=...,
335
+ ) -> Work: ...
336
+ def allreduce_coalesced(
337
+ self,
338
+ tensors: List[Tensor],
339
+ opts=...,
340
+ ) -> Work: ...
341
+ def reduce_scatter_tensor_coalesced(
342
+ self,
343
+ outputTensors: List[Tensor],
344
+ inputTensors: List[Tensor],
345
+ opts: Optional[ReduceScatterOptions] = None,
346
+ ) -> Work: ...
347
+ @overload
348
+ def reduce(
349
+ self,
350
+ tensors: List[Tensor],
351
+ opts=...,
352
+ ) -> Work: ...
353
+ @overload
354
+ def reduce(
355
+ self,
356
+ tensor: Tensor,
357
+ root: int,
358
+ op=...,
359
+ ) -> Work: ...
360
+ @overload
361
+ def allgather(
362
+ self,
363
+ output_tensors: List[List[Tensor]],
364
+ input_tensors: List[Tensor],
365
+ opts=...,
366
+ ) -> Work: ...
367
+ @overload
368
+ def allgather(
369
+ self,
370
+ output_tensors: List[Tensor],
371
+ input_tensor: Tensor,
372
+ ) -> Work: ...
373
+ def _allgather_base(
374
+ self,
375
+ output: Tensor,
376
+ input: Tensor,
377
+ opts=...,
378
+ ) -> Work: ...
379
+ def allgather_coalesced(
380
+ self,
381
+ output_lists: List[List[Tensor]],
382
+ input_list: List[Tensor],
383
+ opts=...,
384
+ ) -> Work: ...
385
+ def allgather_into_tensor_coalesced(
386
+ self,
387
+ output_lists: List[Tensor],
388
+ input_list: List[Tensor],
389
+ opts=...,
390
+ ) -> Work: ...
391
+ @overload
392
+ def gather(
393
+ self,
394
+ output_tensors: List[List[Tensor]],
395
+ input_tensors: List[Tensor],
396
+ opts=...,
397
+ ) -> Work: ...
398
+ @overload
399
+ def gather(
400
+ self,
401
+ output_tensors: List[Tensor],
402
+ input_tensor: Tensor,
403
+ root: int,
404
+ ) -> Work: ...
405
+ @overload
406
+ def scatter(
407
+ self,
408
+ output_tensors: List[Tensor],
409
+ input_tensors: List[List[Tensor]],
410
+ opts=...,
411
+ ) -> Work: ...
412
+ @overload
413
+ def scatter(
414
+ self,
415
+ output_tensor: Tensor,
416
+ input_tensors: List[Tensor],
417
+ root: int,
418
+ ) -> Work: ...
419
+ @overload
420
+ def reduce_scatter(
421
+ self,
422
+ output_tensors: List[Tensor],
423
+ input_tensors: List[List[Tensor]],
424
+ opts=...,
425
+ ) -> Work: ...
426
+ @overload
427
+ def reduce_scatter(
428
+ self,
429
+ output_tensors: Tensor,
430
+ input_tensor: List[Tensor],
431
+ ) -> Work: ...
432
+ def _reduce_scatter_base(
433
+ self,
434
+ outputTensor: Tensor,
435
+ inputTensor: Tensor,
436
+ opts: Optional[ReduceScatterOptions],
437
+ ) -> Work: ...
438
+ @overload
439
+ def alltoall_base(
440
+ self,
441
+ output_tensor: Tensor,
442
+ input_tensor: Tensor,
443
+ output_split_sizes: List[int],
444
+ input_split_sizes: List[int],
445
+ opts=...,
446
+ ) -> Work: ...
447
+ @overload
448
+ def alltoall_base(
449
+ self,
450
+ output: Tensor,
451
+ input: Tensor,
452
+ output_split_sizes: List[int],
453
+ input_split_sizes: List[int],
454
+ ) -> Work: ...
455
+ @overload
456
+ def alltoall(
457
+ self,
458
+ output_tensor: List[Tensor],
459
+ input_tensor: List[Tensor],
460
+ opts=...,
461
+ ) -> Work: ...
462
+ @overload
463
+ def alltoall(
464
+ self,
465
+ output: List[Tensor],
466
+ input: List[Tensor],
467
+ ) -> Work: ...
468
+ def send(
469
+ self,
470
+ tensors: List[Tensor],
471
+ dstRank: int,
472
+ tag: int,
473
+ ) -> Work: ...
474
+ def recv(
475
+ self,
476
+ tensors: List[Tensor],
477
+ srcRank: int,
478
+ tag: int,
479
+ ) -> Work: ...
480
+ def recv_anysource(self, tensors: List[Tensor], tag: int) -> Work: ...
481
+ def barrier(self, opts=...) -> Work: ...
482
+ def boxed(self) -> ScriptObject: ...
483
+ @staticmethod
484
+ def unbox(obj: ScriptObject) -> ProcessGroup: ...
485
+ def _start_coalescing(self, device: torch.device) -> None: ...
486
+ def _end_coalescing(self, device: torch.device) -> Work: ...
487
+ def _get_backend_name(self) -> str: ...
488
+ def _backend_id(self, backend_type: BackendType) -> int: ...
489
+ @property
490
+ def _device_types(self) -> List[torch.device]: ...
491
+ def _get_backend(self, device: torch.device) -> Backend: ...
492
+ def _register_backend(
493
+ self,
494
+ device: torch.device,
495
+ backend_type: BackendType,
496
+ backend: Optional[Backend],
497
+ ) -> None: ...
498
+ def _set_group_name(self, name: str) -> None: ...
499
+ def _set_group_desc(self, desc: str) -> None: ...
500
+ def name(self) -> str: ...
501
+ def _has_hooks(self) -> bool: ...
502
+ def _wait_for_pending_works(self) -> None: ...
503
+ def _set_sequence_number_for_group(self) -> None: ...
504
+ @property
505
+ def bound_device_id(self) -> Optional[torch.device]: ...
506
+ @bound_device_id.setter
507
+ def bound_device_id(self, device: Optional[torch.device]) -> None: ...
508
+ @property
509
+ def group_name(self) -> str: ...
510
+ @property
511
+ def group_desc(self) -> str: ...
512
+
513
+ class ProcessGroupRoundRobin(ProcessGroup): ...
514
+
515
+ def _round_robin_process_groups(
516
+ process_groups: List[ProcessGroup],
517
+ ) -> ProcessGroupRoundRobin: ...
518
+
519
+ class ProcessGroupGloo(Backend):
520
+ class Device: ...
521
+ class Options: ...
522
+
523
+ def __init__(
524
+ self,
525
+ store: Store,
526
+ rank: int,
527
+ size: int,
528
+ timeout: timedelta,
529
+ ): ...
530
+ @staticmethod
531
+ def create_device(hostname="", interface="") -> Device: ...
532
+ @staticmethod
533
+ def create_default_device() -> Device: ...
534
+ def _set_default_timeout(self, timeout) -> None: ...
535
+
536
+ class _ProcessGroupWrapper(Backend):
537
+ def __init__(self, pg: Backend, gloo_pg: ProcessGroupGloo): ...
538
+ wrapped_pg: Backend
539
+
540
+ class ProcessGroupNCCL(Backend):
541
+ class Options:
542
+ def __init__(self, timeout: Optional[timedelta] = None): ...
543
+ @property
544
+ def backend(self) -> str: ...
545
+ @property
546
+ def _timeout(self) -> timedelta: ...
547
+ @_timeout.setter
548
+ def _timeout(self, val: timedelta) -> None: ...
549
+ @property
550
+ def _is_high_priority_stream(self) -> bool: ...
551
+ @_is_high_priority_stream.setter
552
+ def _is_high_priority_stream(self, val: bool) -> None: ...
553
+
554
+ def __init__(
555
+ self,
556
+ store: Store,
557
+ rank: int,
558
+ size: int,
559
+ timeout: timedelta,
560
+ ): ...
561
+ def _group_start(self) -> None: ...
562
+ def _group_end(self) -> None: ...
563
+ def _set_default_timeout(self, timeout) -> None: ...
564
+ def _shutdown(self) -> None: ...
565
+ @property
566
+ def uid(self) -> int: ...
567
+
568
+ class ProcessGroupUCC(Backend):
569
+ def __init__(
570
+ self,
571
+ store: Store,
572
+ rank: int,
573
+ size: int,
574
+ timeout: timedelta,
575
+ ): ...
576
+
577
+ class ProcessGroupMPI(Backend):
578
+ def __init__(
579
+ self,
580
+ rank: int,
581
+ size: int,
582
+ pgComm: int,
583
+ ): ...
584
+ @staticmethod
585
+ def create(ranks: List[int]) -> ProcessGroupMPI: ...
586
+
587
+ def _compute_bucket_assignment_by_size(
588
+ tensors: List[Tensor],
589
+ bucket_size_limits: List[int],
590
+ expect_sparse_gradient: List[bool] = ...,
591
+ tensor_indices: List[int] = ...,
592
+ ) -> Tuple[List[List[int]], List[int]]: ...
593
+ def _broadcast_coalesced(
594
+ process_group: ProcessGroup,
595
+ tensors: List[Tensor],
596
+ buffer_size: int,
597
+ src: int,
598
+ ): ...
599
+ def _test_python_store(store: Store): ...
600
+ def _verify_params_across_processes(
601
+ process_group: ProcessGroup,
602
+ params: List[Tensor],
603
+ logger: Optional[Logger],
604
+ ): ...
605
+ def _make_nccl_premul_sum(factor: Union[float, List[Tensor]]) -> ReduceOp: ...
606
+ def _register_process_group(
607
+ group_name: str,
608
+ process_group: ProcessGroup,
609
+ ) -> None: ...
610
+ def _resolve_process_group(group_name: str) -> ProcessGroup: ...
611
+ def _unregister_all_process_groups() -> None: ...
612
+ def _unregister_process_group(group_name: str) -> None: ...
613
+
614
+ class ProcessGroupCudaP2P(Backend):
615
+ class Options:
616
+ nccl_options: Optional[ProcessGroupNCCL.Options]
617
+ buffer_size: Optional[int]
618
+
619
+ def __init__(self) -> None: ...
620
+
621
+ def __init__(
622
+ self,
623
+ store: Store,
624
+ rank: int,
625
+ size: int,
626
+ options: ProcessGroupCudaP2P.Options,
627
+ ) -> None: ...
628
+ def is_p2p_available(self) -> bool: ...
629
+ def get_buffer_size(self) -> int: ...
630
+ def stream(self) -> torch.cuda.Stream: ...
631
+ def intra_node_barrier(self) -> Work: ...
632
+ def get_p2p_buffer(
633
+ self,
634
+ rank: int,
635
+ sizes: torch.Size,
636
+ dtype: torch.dtype,
637
+ storage_offset: Optional[int] = 0,
638
+ ) -> torch.Tensor: ...
639
+ def _shutdown(self) -> None: ...
data/home/.local/lib/python3.8/site-packages/torch/_C/_distributed_rpc.pyi ADDED
@@ -0,0 +1,189 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # mypy: allow-untyped-defs
2
+ # mypy: disable-error-code="type-arg"
3
+ from datetime import timedelta
4
+ from typing import Any, Dict, Generic, List, Optional, overload, Tuple, Type, TypeVar
5
+
6
+ import torch
7
+
8
+ from . import Future
9
+ from ._autograd import ProfilerEvent
10
+ from ._distributed_c10d import Store
11
+ from ._profiler import ProfilerConfig
12
+
13
+ # This module is defined in torch/csrc/distributed/rpc/init.cpp
14
+
15
+ _DEFAULT_INIT_METHOD: str
16
+ _DEFAULT_NUM_WORKER_THREADS: int
17
+ _UNSET_RPC_TIMEOUT: float
18
+ _DEFAULT_RPC_TIMEOUT_SEC: float
19
+
20
+ _T = TypeVar("_T")
21
+
22
+ class RpcBackendOptions:
23
+ rpc_timeout: float
24
+ init_method: str
25
+ def __init__(
26
+ self,
27
+ rpc_timeout: float = ...,
28
+ init_method: str = ...,
29
+ ): ...
30
+
31
+ class WorkerInfo:
32
+ def __init__(self, name: str, worker_id: int): ...
33
+ @property
34
+ def name(self) -> str: ...
35
+ @property
36
+ def id(self) -> int: ...
37
+ def __eq__(self, other: object) -> bool: ...
38
+
39
+ class RpcAgent:
40
+ def join(self, shutdown: bool = False, timeout: float = 0): ...
41
+ def sync(self): ...
42
+ def shutdown(self): ...
43
+ @overload
44
+ def get_worker_info(self) -> WorkerInfo: ...
45
+ @overload
46
+ def get_worker_info(self, workerName: str) -> WorkerInfo: ...
47
+ def get_worker_infos(self) -> List[WorkerInfo]: ...
48
+ def _get_device_map(self, dst: WorkerInfo) -> Dict[torch.device, torch.device]: ...
49
+ def get_debug_info(self) -> Dict[str, str]: ...
50
+ def get_metrics(self) -> Dict[str, str]: ...
51
+
52
+ class PyRRef(Generic[_T]):
53
+ def __init__(self, value: _T, type_hint: Any = None) -> None: ...
54
+ def is_owner(self) -> bool: ...
55
+ def confirmed_by_owner(self) -> bool: ...
56
+ def owner(self) -> WorkerInfo: ...
57
+ def owner_name(self) -> str: ...
58
+ def to_here(self, timeout: float = ...) -> _T: ...
59
+ def local_value(self) -> Any: ...
60
+ def rpc_sync(self, timeout: float = ...) -> Any: ...
61
+ def rpc_async(self, timeout: float = ...) -> Any: ...
62
+ def remote(self, timeout: float = ...) -> Any: ...
63
+ def _serialize(self) -> Tuple: ...
64
+ @staticmethod
65
+ def _deserialize(tp: Tuple) -> PyRRef: ...
66
+ def _get_type(self) -> Type[_T]: ...
67
+ def _get_future(self) -> Future[_T]: ...
68
+ def _get_profiling_future(self) -> Future[_T]: ...
69
+ def _set_profiling_future(self, profilingFuture: Future[_T]): ...
70
+
71
+ class _TensorPipeRpcBackendOptionsBase(RpcBackendOptions):
72
+ num_worker_threads: int
73
+ device_maps: Dict[str, Dict[torch.device, torch.device]]
74
+ devices: List[torch.device]
75
+ def __init__(
76
+ self,
77
+ num_worker_threads: int,
78
+ _transports: Optional[List],
79
+ _channels: Optional[List],
80
+ rpc_timeout: float = ...,
81
+ init_method: str = ...,
82
+ device_maps: Dict[str, Dict[torch.device, torch.device]] = {}, # noqa: B006
83
+ devices: List[torch.device] = [], # noqa: B006
84
+ ): ...
85
+ def _set_device_map(
86
+ self,
87
+ to: str,
88
+ device_map: Dict[torch.device, torch.device],
89
+ ): ...
90
+
91
+ class TensorPipeAgent(RpcAgent):
92
+ def __init__(
93
+ self,
94
+ store: Store,
95
+ name: str,
96
+ worker_id: int,
97
+ world_size: Optional[int],
98
+ opts: _TensorPipeRpcBackendOptionsBase,
99
+ reverse_device_maps: Dict[str, Dict[torch.device, torch.device]],
100
+ devices: List[torch.device],
101
+ ): ...
102
+ def join(self, shutdown: bool = False, timeout: float = 0): ...
103
+ def shutdown(self): ...
104
+ @overload
105
+ def get_worker_info(self) -> WorkerInfo: ...
106
+ @overload
107
+ def get_worker_info(self, workerName: str) -> WorkerInfo: ...
108
+ @overload
109
+ def get_worker_info(self, id: int) -> WorkerInfo: ...
110
+ def get_worker_infos(self) -> List[WorkerInfo]: ...
111
+ def _get_device_map(self, dst: WorkerInfo) -> Dict[torch.device, torch.device]: ...
112
+ def _update_group_membership(
113
+ self,
114
+ worker_info: WorkerInfo,
115
+ my_devices: List[torch.device],
116
+ reverse_device_map: Dict[str, Dict[torch.device, torch.device]],
117
+ is_join: bool,
118
+ ): ...
119
+ def _get_backend_options(self) -> _TensorPipeRpcBackendOptionsBase: ...
120
+ @property
121
+ def is_static_group(self) -> bool: ...
122
+ @property
123
+ def store(self) -> Store: ...
124
+
125
+ def _is_current_rpc_agent_set() -> bool: ...
126
+ def _get_current_rpc_agent() -> RpcAgent: ...
127
+ def _set_and_start_rpc_agent(agent: RpcAgent): ...
128
+ def _reset_current_rpc_agent(): ...
129
+ def _delete_all_user_and_unforked_owner_rrefs(timeout: timedelta = ...): ...
130
+ def _destroy_rref_context(ignoreRRefLeak: bool): ...
131
+ def _rref_context_get_debug_info() -> Dict[str, str]: ...
132
+ def _cleanup_python_rpc_handler(): ...
133
+ def _invoke_rpc_builtin(
134
+ dst: WorkerInfo,
135
+ opName: str,
136
+ rpcTimeoutSeconds: float,
137
+ *args: Any,
138
+ **kwargs: Any,
139
+ ): ...
140
+ def _invoke_rpc_python_udf(
141
+ dst: WorkerInfo,
142
+ pickledPythonUDF: str,
143
+ tensors: List[torch.Tensor],
144
+ rpcTimeoutSeconds: float,
145
+ isAsyncExecution: bool,
146
+ ): ...
147
+ def _invoke_rpc_torchscript(
148
+ dstWorkerName: str,
149
+ qualifiedNameStr: str,
150
+ argsTuple: Tuple,
151
+ kwargsDict: Dict,
152
+ rpcTimeoutSeconds: float,
153
+ isAsyncExecution: bool,
154
+ ): ...
155
+ def _invoke_remote_builtin(
156
+ dst: WorkerInfo,
157
+ opName: str,
158
+ rpcTimeoutSeconds: float,
159
+ *args: Any,
160
+ **kwargs: Any,
161
+ ): ...
162
+ def _invoke_remote_python_udf(
163
+ dst: WorkerInfo,
164
+ pickledPythonUDF: str,
165
+ tensors: List[torch.Tensor],
166
+ rpcTimeoutSeconds: float,
167
+ isAsyncExecution: bool,
168
+ ): ...
169
+ def _invoke_remote_torchscript(
170
+ dstWorkerName: WorkerInfo,
171
+ qualifiedNameStr: str,
172
+ rpcTimeoutSeconds: float,
173
+ isAsyncExecution: bool,
174
+ *args: Any,
175
+ **kwargs: Any,
176
+ ): ...
177
+ def get_rpc_timeout() -> float: ...
178
+ def enable_gil_profiling(flag: bool): ...
179
+ def _set_rpc_timeout(rpcTimeoutSeconds: float): ...
180
+
181
+ class RemoteProfilerManager:
182
+ @staticmethod
183
+ def set_current_profiling_key(key: str): ...
184
+
185
+ def _enable_server_process_global_profiler(new_config: ProfilerConfig): ...
186
+ def _disable_server_process_global_profiler() -> List[List[List[ProfilerEvent]]]: ...
187
+ def _set_profiler_node_id(default_node_id: int): ...
188
+ def _enable_jit_rref_pickle(): ...
189
+ def _disable_jit_rref_pickle(): ...
data/home/.local/lib/python3.8/site-packages/torch/_C/_distributed_rpc_testing.pyi ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from typing import Dict, List
2
+
3
+ import torch
4
+
5
+ from ._distributed_c10d import Store
6
+ from ._distributed_rpc import _TensorPipeRpcBackendOptionsBase, TensorPipeAgent
7
+
8
+ # This module is defined in torch/csrc/distributed/rpc/testing/init.cpp
9
+
10
+ class FaultyTensorPipeRpcBackendOptions(_TensorPipeRpcBackendOptionsBase):
11
+ def __init__(
12
+ self,
13
+ num_worker_threads: int,
14
+ rpc_timeout: float,
15
+ init_method: str,
16
+ messages_to_fail: List[str],
17
+ messages_to_delay: Dict[str, float],
18
+ num_fail_sends: int,
19
+ ): ...
20
+ num_send_recv_threads: int
21
+ messages_to_fail: List[str]
22
+ messages_to_delay: Dict[str, float]
23
+ num_fail_sends: int
24
+
25
+ class FaultyTensorPipeAgent(TensorPipeAgent):
26
+ def __init__(
27
+ self,
28
+ store: Store,
29
+ name: str,
30
+ rank: int,
31
+ world_size: int,
32
+ options: FaultyTensorPipeRpcBackendOptions,
33
+ reverse_device_maps: Dict[str, Dict[torch.device, torch.device]],
34
+ devices: List[torch.device],
35
+ ): ...
data/home/.local/lib/python3.8/site-packages/torch/_C/_functions.pyi ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from typing import AnyStr, List
2
+
3
+ from torch import Tensor
4
+
5
+ class UndefinedGrad:
6
+ def __init__(self) -> None: ...
7
+ def __call__(self, *inputs: Tensor) -> List[Tensor]: ...
8
+
9
+ class DelayedError:
10
+ def __init__(self, msg: AnyStr, num_inputs: int) -> None: ...
11
+ def __call__(self, inputs: List[Tensor]) -> List[Tensor]: ...
data/home/.local/lib/python3.8/site-packages/torch/_C/_functorch.pyi ADDED
@@ -0,0 +1,84 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # mypy: allow-untyped-defs
2
+ from enum import Enum
3
+ from typing import Optional, Tuple
4
+
5
+ from torch import Tensor
6
+
7
+ # Defined in torch/csrc/functorch/init.cpp
8
+
9
+ def _set_dynamic_layer_keys_included(included: bool) -> None: ...
10
+ def get_unwrapped(tensor: Tensor) -> Tensor: ...
11
+ def is_batchedtensor(tensor: Tensor) -> bool: ...
12
+ def is_functionaltensor(tensor: Tensor) -> bool: ...
13
+ def is_functorch_wrapped_tensor(tensor: Tensor) -> bool: ...
14
+ def is_gradtrackingtensor(tensor: Tensor) -> bool: ...
15
+ def is_legacy_batchedtensor(tensor: Tensor) -> bool: ...
16
+ def maybe_get_bdim(tensor: Tensor) -> int: ...
17
+ def maybe_get_level(tensor: Tensor) -> int: ...
18
+ def maybe_current_level() -> Optional[int]: ...
19
+ def unwrap_if_dead(tensor: Tensor) -> Tensor: ...
20
+ def _unwrap_for_grad(tensor: Tensor, level: int) -> Tensor: ...
21
+ def _wrap_for_grad(tensor: Tensor, level: int) -> Tensor: ...
22
+ def _unwrap_batched(tensor: Tensor, level: int) -> Tuple[Tensor, Optional[int]]: ...
23
+ def current_level() -> int: ...
24
+ def count_jvp_interpreters() -> int: ...
25
+ def _add_batch_dim(tensor: Tensor, bdim: int, level: int) -> Tensor: ...
26
+ def set_single_level_autograd_function_allowed(allowed: bool) -> None: ...
27
+ def get_single_level_autograd_function_allowed() -> bool: ...
28
+ def _unwrap_functional_tensor(tensor: Tensor, reapply_views: bool) -> Tensor: ...
29
+ def _wrap_functional_tensor(tensor: Tensor, level: int) -> Tensor: ...
30
+ def _vmap_increment_nesting(batch_size: int, randomness: str) -> int: ...
31
+ def _vmap_decrement_nesting() -> int: ...
32
+ def _grad_increment_nesting() -> int: ...
33
+ def _grad_decrement_nesting() -> int: ...
34
+ def _jvp_increment_nesting() -> int: ...
35
+ def _jvp_decrement_nesting() -> int: ...
36
+
37
+ # Defined in aten/src/ATen/functorch/Interpreter.h
38
+ class TransformType(Enum):
39
+ Torch: TransformType = ...
40
+ Vmap: TransformType = ...
41
+ Grad: TransformType = ...
42
+ Jvp: TransformType = ...
43
+ Functionalize: TransformType = ...
44
+
45
+ class RandomnessType(Enum):
46
+ Error: TransformType = ...
47
+ Same: TransformType = ...
48
+ Different: TransformType = ...
49
+
50
+ class CInterpreter:
51
+ def key(self) -> TransformType: ...
52
+ def level(self) -> int: ...
53
+
54
+ class CGradInterpreterPtr:
55
+ def __init__(self, interpreter: CInterpreter): ...
56
+ def lift(self, Tensor) -> Tensor: ...
57
+ def prevGradMode(self) -> bool: ...
58
+
59
+ class CJvpInterpreterPtr:
60
+ def __init__(self, interpreter: CInterpreter): ...
61
+ def lift(self, Tensor) -> Tensor: ...
62
+ def prevFwdGradMode(self) -> bool: ...
63
+
64
+ class CFunctionalizeInterpreterPtr:
65
+ def __init__(self, interpreter: CInterpreter): ...
66
+ def key(self) -> TransformType: ...
67
+ def level(self) -> int: ...
68
+ def functionalizeAddBackViews(self) -> bool: ...
69
+
70
+ class CVmapInterpreterPtr:
71
+ def __init__(self, interpreter: CInterpreter): ...
72
+ def key(self) -> TransformType: ...
73
+ def level(self) -> int: ...
74
+ def batchSize(self) -> int: ...
75
+ def randomness(self) -> RandomnessType: ...
76
+
77
+ class DynamicLayer: ...
78
+
79
+ def get_dynamic_layer_stack_depth() -> int: ...
80
+ def get_interpreter_stack() -> list[CInterpreter]: ...
81
+ def peek_interpreter_stack() -> CInterpreter: ...
82
+ def pop_dynamic_layer_stack() -> DynamicLayer: ...
83
+ def pop_dynamic_layer_stack_and_undo_to_depth(int) -> None: ...
84
+ def push_dynamic_layer_stack(dl: DynamicLayer) -> int: ...
data/home/.local/lib/python3.8/site-packages/torch/_C/_itt.pyi ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ # Defined in torch/csrc/itt.cpp
2
+ def is_available() -> None: ...
3
+ def rangePush(message: str) -> None: ...
4
+ def rangePop() -> None: ...
5
+ def mark(message: str) -> None: ...
data/home/.local/lib/python3.8/site-packages/torch/_C/_lazy.pyi ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # mypy: allow-untyped-defs
2
+ from typing import List
3
+
4
+ from torch import Tensor
5
+
6
+ # defined in torch/csrc/lazy/python/init.cpp
7
+ def _mark_step(device: str, devices: List[str], wait: bool): ...
8
+ def _wait_device_ops(devices: List[str]): ...
9
+ def _reset_metrics(): ...
10
+ def _counter_names() -> List[str]: ...
11
+ def _counter_value(name: str) -> int: ...
12
+ def _metrics_report() -> str: ...
13
+ def _get_graph_hash(tensors: List[Tensor]) -> str: ...
14
+ def _sync_multi(
15
+ tensors: List[Tensor],
16
+ devices: List[str],
17
+ wait: bool = True,
18
+ sync_ltc_data: bool = True,
19
+ ): ...
20
+ def _get_tensor_id(tensor: Tensor) -> int: ...
21
+ def _get_tensors_text(tensors: List[Tensor]) -> str: ...
22
+ def _get_tensors_dot(tensors: List[Tensor]) -> str: ...
23
+ def _get_tensors_backend(tensors: List[Tensor]) -> str: ...
24
+ def _get_force_fallback() -> str: ...
25
+ def _set_force_fallback(newval: str): ...
26
+ def _clear_ir_cache(): ...
27
+ def _dump_ir_cache(filename: str): ...
28
+ def _set_reuse_ir(val: bool): ...
29
+ def _get_default_device_type(): ...
data/home/.local/lib/python3.8/site-packages/torch/_C/_lazy_ts_backend.pyi ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # mypy: allow-untyped-defs
2
+ # defined in torch/csrc/lazy/python/init.cpp
3
+
4
+ from typing import Any, List, Tuple
5
+
6
+ from torch import Tensor
7
+
8
+ def _init(): ...
9
+ def _get_tensors_ts_device_data_node(
10
+ tensors: List[Tensor],
11
+ ) -> Tuple[List[int], List[Any]]: ...
12
+ def _run_cached_graph(hash_str: str, graph_inputs: List[Any]) -> List[Tensor]: ...
data/home/.local/lib/python3.8/site-packages/torch/_C/_monitor.pyi ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Defined in torch/csrc/monitor/python_init.cpp
2
+
3
+ import datetime
4
+ from enum import Enum
5
+ from typing import Callable, Dict, List, Union
6
+
7
+ class Aggregation(Enum):
8
+ VALUE = ...
9
+ MEAN = ...
10
+ COUNT = ...
11
+ SUM = ...
12
+ MAX = ...
13
+ MIN = ...
14
+
15
+ class Stat:
16
+ name: str
17
+ count: int
18
+ def __init__(
19
+ self,
20
+ name: str,
21
+ aggregations: List[Aggregation],
22
+ window_size: int,
23
+ max_samples: int = -1,
24
+ ) -> None: ...
25
+ def add(self, v: float) -> None: ...
26
+ def get(self) -> Dict[Aggregation, float]: ...
27
+
28
+ class Event:
29
+ name: str
30
+ timestamp: datetime.datetime
31
+ data: Dict[str, Union[int, float, bool, str]]
32
+ def __init__(
33
+ self,
34
+ name: str,
35
+ timestamp: datetime.datetime,
36
+ data: Dict[str, Union[int, float, bool, str]],
37
+ ) -> None: ...
38
+
39
+ def log_event(e: Event) -> None: ...
40
+
41
+ class EventHandlerHandle: ...
42
+
43
+ def register_event_handler(handler: Callable[[Event], None]) -> EventHandlerHandle: ...
44
+ def unregister_event_handler(handle: EventHandlerHandle) -> None: ...
data/home/.local/lib/python3.8/site-packages/torch/_C/_nn.pyi ADDED
@@ -0,0 +1,86 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # mypy: disable-error-code="type-arg"
2
+ from typing import List, Optional, overload, Sequence, Tuple, Union
3
+
4
+ from torch import memory_format, Tensor
5
+ from torch.types import _bool, _device, _dtype, _int, _size
6
+
7
+ # Defined in tools/autograd/templates/python_nn_functions.cpp
8
+
9
+ def adaptive_max_pool2d(input: Tensor, output_size: Union[_int, _size]) -> Tuple[Tensor, Tensor]: ...
10
+ def adaptive_max_pool3d(input: Tensor, output_size: Union[_int, _size]) -> Tuple[Tensor, Tensor]: ...
11
+ def avg_pool2d(input: Tensor, kernel_size: Union[_int, _size], stride: Optional[Union[_int, _size]] = None, padding: Union[_int, _size] = 0, ceil_mode: bool = False, count_include_pad: bool = True, divisor_override: Optional[int] = None) -> Tensor: ...
12
+ def avg_pool3d(input: Tensor, kernel_size: Union[_int, _size], stride: Optional[Union[_int, _size]] = None, padding: Union[_int, _size] = 0, ceil_mode: bool = False, count_include_pad: bool = True, divisor_override: Optional[int] = None) -> Tensor: ...
13
+ def elu_(input: Tensor, alpha: float = ...) -> Tensor: ...
14
+ def fractional_max_pool2d(input: Tensor, kernel_size: Union[_int, _size], output_size: Union[_int, _size], _random_samples: Tensor) -> Tuple[Tensor, Tensor]: ...
15
+ def fractional_max_pool3d(input: Tensor, kernel_size: Union[_int, _size], output_size: Union[_int, _size], _random_samples: Tensor) -> Tuple[Tensor, Tensor]: ...
16
+ def gelu(input: Tensor, approximate: str = ...) -> Tensor: ...
17
+ def hardsigmoid(input: Tensor, *, out: Optional[Tensor] = None) -> Tensor: ...
18
+ def hardtanh(input: Tensor, min_val: float = ..., max_val: float = ..., *, out: Optional[Tensor] = None) -> Tensor: ...
19
+ def hardtanh_(input: Tensor, min_val: float = ..., max_val: float = ...) -> Tensor: ...
20
+ def leaky_relu(input: Tensor, negative_slope: float = ..., *, out: Optional[Tensor] = None) -> Tensor: ...
21
+ def leaky_relu_(input: Tensor, negative_slope: float = ...) -> Tensor: ...
22
+ def linear(input: Tensor, weight: Tensor, bias: Optional[Tensor] = None) -> Tensor: ...
23
+ def log_sigmoid(input: Tensor) -> Tensor: ...
24
+ def one_hot(tensor: Tensor, num_classes: int = ...) -> Tensor: ...
25
+ def pad(input: Tensor, pad: Sequence[int], mode: str = ..., value: Optional[float] = None) -> Tensor: ...
26
+ def scaled_dot_product_attention(query: Tensor, key: Tensor, value: Tensor, attn_mask: Optional[Tensor] = None, dropout_p: float = 0.0, is_causal: bool = False, scale: Optional[float] = None) -> Tensor: ...
27
+ def softplus(input: Tensor, beta: float = ..., threshold: float = ...) -> Tensor: ...
28
+ def softshrink(input: Tensor, lambd: float = ...) -> Tensor: ...
29
+
30
+ # Defined in aten/src/ATen/native/mkldnn/Linear.cpp
31
+ def mkldnn_linear(input: Tensor, weight: Tensor, bias: Optional[Tensor]) -> Tensor: ...
32
+
33
+ # Defined at aten/src/ATen/native/mkldnn/MKLDNNConversions.cpp
34
+ def mkldnn_reorder_conv2d_weight(
35
+ self: Tensor,
36
+ padding: List,
37
+ stride: List,
38
+ dilatation: List,
39
+ groups: int,
40
+ ) -> Tensor: ...
41
+ def mkldnn_reorder_conv3d_weight(
42
+ self: Tensor,
43
+ padding: List,
44
+ stride: List,
45
+ dilatation: List,
46
+ groups: int,
47
+ ) -> Tensor: ...
48
+
49
+ # Defined in aten/src/ATen/native/mkldnn/Prelu.cpp
50
+ def mkldnn_prelu(input: Tensor, weight: Tensor) -> Tensor: ...
51
+
52
+ # Defined at tools/autograd/templates/python_nn_functions.cpp
53
+ @overload
54
+ def _parse_to(
55
+ device: _device,
56
+ dtype: _dtype,
57
+ non_blocking: _bool,
58
+ copy: _bool,
59
+ *,
60
+ memory_format: memory_format,
61
+ ) -> Tuple[_device, _dtype, _bool, memory_format]: ...
62
+ @overload
63
+ def _parse_to(
64
+ dtype: _dtype,
65
+ non_blocking: _bool,
66
+ copy: _bool,
67
+ *,
68
+ memory_format: memory_format,
69
+ ) -> Tuple[_device, _dtype, _bool, memory_format]: ...
70
+ @overload
71
+ def _parse_to(
72
+ tensor: Tensor,
73
+ non_blocking: _bool,
74
+ copy: _bool,
75
+ *,
76
+ memory_format: memory_format,
77
+ ) -> Tuple[_device, _dtype, _bool, memory_format]: ...
78
+
79
+ # Defined in aten/src/ATen/native/PadSequence.cpp
80
+ def pad_sequence(
81
+ sequences: List[Tensor],
82
+ batch_first: bool = False,
83
+ padding_value: float = ...,
84
+ ) -> Tensor: ...
85
+ def flatten_dense_tensors(tensors: List[Tensor]) -> Tensor: ...
86
+ def unflatten_dense_tensors(flat: Tensor, tensors: List[Tensor]) -> List[Tensor]: ...
data/home/.local/lib/python3.8/site-packages/torch/_C/_nvtx.pyi ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ # mypy: allow-untyped-defs
2
+ # Defined in torch/csrc/cuda/shared/nvtx.cpp
3
+ def rangePushA(message: str) -> int: ...
4
+ def rangePop() -> int: ...
5
+ def rangeStartA(message: str) -> int: ...
6
+ def rangeEnd(int) -> None: ...
7
+ def markA(message: str) -> None: ...
data/home/.local/lib/python3.8/site-packages/torch/_C/_onnx.pyi ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Defined in torch/csrc/onnx/init.cpp
2
+
3
+ from enum import Enum
4
+
5
+ _CAFFE2_ATEN_FALLBACK: bool
6
+ PRODUCER_VERSION: str
7
+
8
+ class TensorProtoDataType(Enum):
9
+ UNDEFINED = ...
10
+ FLOAT = ...
11
+ UINT8 = ...
12
+ INT8 = ...
13
+ UINT16 = ...
14
+ INT16 = ...
15
+ INT32 = ...
16
+ INT64 = ...
17
+ STRING = ...
18
+ BOOL = ...
19
+ FLOAT16 = ...
20
+ DOUBLE = ...
21
+ UINT32 = ...
22
+ UINT64 = ...
23
+ COMPLEX64 = ...
24
+ COMPLEX128 = ...
25
+ BFLOAT16 = ...
26
+ FLOAT8E5M2 = ...
27
+ FLOAT8E4M3FN = ...
28
+ FLOAT8E5M2FNUZ = ...
29
+ FLOAT8E4M3FNUZ = ...
30
+
31
+ class OperatorExportTypes(Enum):
32
+ ONNX = ...
33
+ ONNX_ATEN = ...
34
+ ONNX_ATEN_FALLBACK = ...
35
+ ONNX_FALLTHROUGH = ...
36
+
37
+ class TrainingMode(Enum):
38
+ EVAL = ...
39
+ PRESERVE = ...
40
+ TRAINING = ...
data/home/.local/lib/python3.8/site-packages/torch/_C/_profiler.pyi ADDED
@@ -0,0 +1,244 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from enum import Enum
2
+ from typing import Any, Dict, List, Literal, Optional, Tuple, Union
3
+ from typing_extensions import TypeAlias
4
+
5
+ from torch._C import device, dtype, layout
6
+
7
+ # defined in torch/csrc/profiler/python/init.cpp
8
+
9
+ class RecordScope(Enum):
10
+ FUNCTION = ...
11
+ BACKWARD_FUNCTION = ...
12
+ TORCHSCRIPT_FUNCTION = ...
13
+ KERNEL_FUNCTION_DTYPE = ...
14
+ CUSTOM_CLASS = ...
15
+ BUILD_FEATURE = ...
16
+ LITE_INTERPRETER = ...
17
+ USER_SCOPE = ...
18
+ STATIC_RUNTIME_OP = ...
19
+ STATIC_RUNTIME_MODEL = ...
20
+
21
+ class ProfilerState(Enum):
22
+ Disable = ...
23
+ CPU = ...
24
+ CUDA = ...
25
+ NVTX = ...
26
+ ITT = ...
27
+ KINETO = ...
28
+ KINETO_GPU_FALLBACK = ...
29
+ KINETO_PRIVATEUSE1_FALLBACK = ...
30
+ KINETO_PRIVATEUSE1 = ...
31
+
32
+ class ActiveProfilerType(Enum):
33
+ NONE = ...
34
+ LEGACY = ...
35
+ KINETO = ...
36
+ NVTX = ...
37
+ ITT = ...
38
+
39
+ class ProfilerActivity(Enum):
40
+ CPU = ...
41
+ CUDA = ...
42
+ XPU = ...
43
+ MTIA = ...
44
+ PrivateUse1 = ...
45
+
46
+ class _EventType(Enum):
47
+ TorchOp = ...
48
+ Backend = ...
49
+ Allocation = ...
50
+ OutOfMemory = ...
51
+ PyCall = ...
52
+ PyCCall = ...
53
+ Kineto = ...
54
+
55
+ class _ExperimentalConfig:
56
+ def __init__(
57
+ self,
58
+ profiler_metrics: List[str] = ...,
59
+ profiler_measure_per_kernel: bool = ...,
60
+ verbose: bool = ...,
61
+ performance_events: List[str] = ...,
62
+ enable_cuda_sync_events: bool = ...,
63
+ ) -> None: ...
64
+
65
+ class ProfilerConfig:
66
+ def __init__(
67
+ self,
68
+ state: ProfilerState,
69
+ report_input_shapes: bool,
70
+ profile_memory: bool,
71
+ with_stack: bool,
72
+ with_flops: bool,
73
+ with_modules: bool,
74
+ experimental_config: _ExperimentalConfig,
75
+ ) -> None: ...
76
+
77
+ class _ProfilerEvent:
78
+ start_tid: int
79
+ start_time_ns: int
80
+ children: List[_ProfilerEvent]
81
+
82
+ # TODO(robieta): remove in favor of `self.typed`
83
+ extra_fields: Union[
84
+ _ExtraFields_TorchOp,
85
+ _ExtraFields_Backend,
86
+ _ExtraFields_Allocation,
87
+ _ExtraFields_OutOfMemory,
88
+ _ExtraFields_PyCall,
89
+ _ExtraFields_PyCCall,
90
+ _ExtraFields_Kineto,
91
+ ]
92
+
93
+ @property
94
+ def typed(
95
+ self,
96
+ ) -> Union[
97
+ Tuple[Literal[_EventType.TorchOp], _ExtraFields_TorchOp],
98
+ Tuple[Literal[_EventType.Backend], _ExtraFields_Backend],
99
+ Tuple[Literal[_EventType.Allocation], _ExtraFields_Allocation],
100
+ Tuple[Literal[_EventType.OutOfMemory], _ExtraFields_OutOfMemory],
101
+ Tuple[Literal[_EventType.PyCall], _ExtraFields_PyCall],
102
+ Tuple[Literal[_EventType.PyCCall], _ExtraFields_PyCCall],
103
+ Tuple[Literal[_EventType.Kineto], _ExtraFields_Kineto],
104
+ ]: ...
105
+ @property
106
+ def name(self) -> str: ...
107
+ @property
108
+ def tag(self) -> _EventType: ...
109
+ @property
110
+ def id(self) -> int: ...
111
+ @property
112
+ def parent(self) -> Optional[_ProfilerEvent]: ...
113
+ @property
114
+ def correlation_id(self) -> int: ...
115
+ @property
116
+ def end_time_ns(self) -> int: ...
117
+ @property
118
+ def duration_time_ns(self) -> int: ...
119
+
120
+ class _TensorMetadata:
121
+ impl_ptr: Optional[int]
122
+ storage_data_ptr: Optional[int]
123
+ id: Optional[int]
124
+
125
+ @property
126
+ def allocation_id(self) -> Optional[int]: ...
127
+ @property
128
+ def layout(self) -> layout: ...
129
+ @property
130
+ def device(self) -> device: ...
131
+ @property
132
+ def dtype(self) -> dtype: ...
133
+ @property
134
+ def sizes(self) -> List[int]: ...
135
+ @property
136
+ def strides(self) -> List[int]: ...
137
+
138
+ Scalar: TypeAlias = Union[int, float, bool, complex]
139
+ Input: TypeAlias = Optional[Union[_TensorMetadata, List[_TensorMetadata], Scalar]]
140
+
141
+ class _ExtraFields_TorchOp:
142
+ name: str
143
+ sequence_number: int
144
+ allow_tf32_cublas: bool
145
+
146
+ @property
147
+ def inputs(self) -> List[Input]: ...
148
+ @property
149
+ def scope(self) -> RecordScope: ...
150
+
151
+ class _ExtraFields_Backend: ...
152
+
153
+ class _ExtraFields_Allocation:
154
+ ptr: int
155
+ id: Optional[int]
156
+ alloc_size: int
157
+ total_allocated: int
158
+ total_reserved: int
159
+
160
+ @property
161
+ def allocation_id(self) -> Optional[int]: ...
162
+ @property
163
+ def device(self) -> device: ...
164
+
165
+ class _ExtraFields_OutOfMemory: ...
166
+
167
+ class _PyFrameState:
168
+ line_number: int
169
+ function_name: str
170
+
171
+ @property
172
+ def file_name(self) -> str: ...
173
+
174
+ class _NNModuleInfo:
175
+ @property
176
+ def self_ptr(self) -> int: ...
177
+ @property
178
+ def cls_ptr(self) -> int: ...
179
+ @property
180
+ def cls_name(self) -> str: ...
181
+ @property
182
+ def parameters(
183
+ self,
184
+ ) -> List[Tuple[str, _TensorMetadata, Optional[_TensorMetadata]]]: ...
185
+
186
+ class _OptimizerInfo:
187
+ @property
188
+ def parameters(
189
+ self,
190
+ ) -> List[
191
+ Tuple[
192
+ # Parameter
193
+ _TensorMetadata,
194
+ #
195
+ # Gradient (if present during optimizer.step())
196
+ Optional[_TensorMetadata],
197
+ #
198
+ # Optimizer state for Parameter as (name, tensor) pairs
199
+ List[Tuple[str, _TensorMetadata]],
200
+ ]
201
+ ]: ...
202
+
203
+ class _ExtraFields_PyCCall:
204
+ @property
205
+ def caller(self) -> _PyFrameState: ...
206
+
207
+ class _ExtraFields_PyCall:
208
+ @property
209
+ def callsite(self) -> _PyFrameState: ...
210
+ @property
211
+ def caller(self) -> _PyFrameState: ...
212
+ @property
213
+ def module(self) -> Optional[_NNModuleInfo]: ...
214
+ @property
215
+ def optimizer(self) -> Optional[_OptimizerInfo]: ...
216
+
217
+ class _ExtraFields_Kineto: ...
218
+
219
+ def _add_execution_trace_observer(output_file_path: str) -> bool: ...
220
+ def _remove_execution_trace_observer() -> None: ...
221
+ def _enable_execution_trace_observer() -> None: ...
222
+ def _disable_execution_trace_observer() -> None: ...
223
+ def _set_record_concrete_inputs_enabled_val(val: bool) -> None: ...
224
+ def _set_fwd_bwd_enabled_val(val: bool) -> None: ...
225
+ def _set_cuda_sync_enabled_val(val: bool) -> None: ...
226
+
227
+ class CapturedTraceback: ...
228
+
229
+ def gather_traceback(python: bool, script: bool, cpp: bool) -> CapturedTraceback: ...
230
+
231
+ # The Dict has name, filename, line
232
+ def symbolize_tracebacks(
233
+ to_symbolize: List[CapturedTraceback],
234
+ ) -> List[List[Dict[str, str]]]: ...
235
+
236
+ class _RecordFunctionFast:
237
+ def __init__(
238
+ self,
239
+ name: str,
240
+ input_values: Optional[Union[list, tuple]] = None,
241
+ keyword_values: Optional[dict] = None,
242
+ ) -> None: ...
243
+ def __enter__(self) -> None: ...
244
+ def __exit__(self, exc_type: Any, exc_value: Any, traceback: Any) -> None: ...
data/home/.local/lib/python3.8/site-packages/torch/_C/_verbose.pyi ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ # Defined in torch/csrc/utils/verbose.cpp
2
+ def mkl_set_verbose(enable: int) -> int: ...
3
+ def mkldnn_set_verbose(level: int) -> int: ...
data/home/.local/lib/python3.8/site-packages/torch/__pycache__/_VF.cpython-38.pyc ADDED
Binary file (1.14 kB). View file
 
data/home/.local/lib/python3.8/site-packages/torch/__pycache__/__config__.cpython-38.pyc ADDED
Binary file (745 Bytes). View file
 
data/home/.local/lib/python3.8/site-packages/torch/__pycache__/__future__.cpython-38.pyc ADDED
Binary file (3.4 kB). View file
 
data/home/.local/lib/python3.8/site-packages/torch/__pycache__/__init__.cpython-38.pyc ADDED
Binary file (76.5 kB). View file
 
data/home/.local/lib/python3.8/site-packages/torch/__pycache__/_appdirs.cpython-38.pyc ADDED
Binary file (22 kB). View file
 
data/home/.local/lib/python3.8/site-packages/torch/__pycache__/_classes.cpython-38.pyc ADDED
Binary file (2.47 kB). View file
 
data/home/.local/lib/python3.8/site-packages/torch/__pycache__/_compile.cpython-38.pyc ADDED
Binary file (1.16 kB). View file
 
data/home/.local/lib/python3.8/site-packages/torch/__pycache__/_custom_ops.cpython-38.pyc ADDED
Binary file (12.8 kB). View file
 
data/home/.local/lib/python3.8/site-packages/torch/__pycache__/_deploy.cpython-38.pyc ADDED
Binary file (2.56 kB). View file
 
data/home/.local/lib/python3.8/site-packages/torch/__pycache__/_guards.cpython-38.pyc ADDED
Binary file (24.4 kB). View file
 
data/home/.local/lib/python3.8/site-packages/torch/__pycache__/_jit_internal.cpython-38.pyc ADDED
Binary file (36.4 kB). View file
 
data/home/.local/lib/python3.8/site-packages/torch/__pycache__/_linalg_utils.cpython-38.pyc ADDED
Binary file (5.24 kB). View file
 
data/home/.local/lib/python3.8/site-packages/torch/__pycache__/_lobpcg.cpython-38.pyc ADDED
Binary file (30.1 kB). View file
 
data/home/.local/lib/python3.8/site-packages/torch/__pycache__/_lowrank.cpython-38.pyc ADDED
Binary file (9.75 kB). View file
 
data/home/.local/lib/python3.8/site-packages/torch/__pycache__/_namedtensor_internals.cpython-38.pyc ADDED
Binary file (4.92 kB). View file
 
data/home/.local/lib/python3.8/site-packages/torch/__pycache__/_ops.cpython-38.pyc ADDED
Binary file (33.3 kB). View file
 
data/home/.local/lib/python3.8/site-packages/torch/__pycache__/_python_dispatcher.cpython-38.pyc ADDED
Binary file (3.46 kB). View file
 
data/home/.local/lib/python3.8/site-packages/torch/__pycache__/_size_docs.cpython-38.pyc ADDED
Binary file (1.1 kB). View file
 
data/home/.local/lib/python3.8/site-packages/torch/__pycache__/_sources.cpython-38.pyc ADDED
Binary file (4.21 kB). View file
 
data/home/.local/lib/python3.8/site-packages/torch/__pycache__/_storage_docs.cpython-38.pyc ADDED
Binary file (1.53 kB). View file
 
data/home/.local/lib/python3.8/site-packages/torch/__pycache__/_streambase.cpython-38.pyc ADDED
Binary file (1.98 kB). View file
 
data/home/.local/lib/python3.8/site-packages/torch/__pycache__/_tensor.cpython-38.pyc ADDED
Binary file (42.7 kB). View file
 
data/home/.local/lib/python3.8/site-packages/torch/__pycache__/_tensor_str.cpython-38.pyc ADDED
Binary file (16.4 kB). View file
 
data/home/.local/lib/python3.8/site-packages/torch/__pycache__/_utils.cpython-38.pyc ADDED
Binary file (27.3 kB). View file
 
data/home/.local/lib/python3.8/site-packages/torch/__pycache__/_utils_internal.cpython-38.pyc ADDED
Binary file (6.62 kB). View file
 
data/home/.local/lib/python3.8/site-packages/torch/__pycache__/_vmap_internals.cpython-38.pyc ADDED
Binary file (6.82 kB). View file
 
data/home/.local/lib/python3.8/site-packages/torch/__pycache__/_weights_only_unpickler.cpython-38.pyc ADDED
Binary file (8.91 kB). View file
 
data/home/.local/lib/python3.8/site-packages/torch/__pycache__/functional.cpython-38.pyc ADDED
Binary file (72.4 kB). View file
 
data/home/.local/lib/python3.8/site-packages/torch/__pycache__/hub.cpython-38.pyc ADDED
Binary file (26.9 kB). View file