pytorch/torch
Aaron Orenstein e4623de4cf typing scheduler.py [2/2]: Apply types (#126656)
Add `# mypy: disallow-untyped-defs` to scheduler.py and then fix the resulting fallout.

We probably should eventually add a new node between BaseSchedulerNode and all the non-FusedSchedulerNode types to indicate the split between nodes that have a valid `self.node` and ones that don't. That would cause a lot of the `assert self.node is not None` churn to go away - but was a bigger change because a lot of code makes assumptions about types that aren't reflected in the types themselves.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/126656
Approved by: https://github.com/eellison
2024-05-22 20:33:31 +00:00
..
_awaits
_C Enable pickling torch._C.Generator (#126271) 2024-05-22 14:38:47 +00:00
_C_flatbuffer
_custom_op Move schema inference to torch._library (#124199) 2024-04-19 17:56:30 +00:00
_decomp [ROCm] Implement forward AD for miopen_batch_norm (#125069) 2024-05-14 19:09:50 +00:00
_dispatch
_dynamo Teach FakeTensor to fill in item_memo when converting scalar CPU tensor (#126245) 2024-05-22 15:25:38 +00:00
_export Teach FakeTensor to fill in item_memo when converting scalar CPU tensor (#126245) 2024-05-22 15:25:38 +00:00
_functorch Prevent partitioner from ever saving views (#126446) 2024-05-22 17:28:46 +00:00
_higher_order_ops Fix flexattention not realizing inputs before lowering (also refactored runtime estimation) (#126615) 2024-05-22 17:28:46 +00:00
_inductor typing scheduler.py [2/2]: Apply types (#126656) 2024-05-22 20:33:31 +00:00
_lazy
_library [custom_op] use new python custom ops API on prims ops (#124665) 2024-05-22 17:48:33 +00:00
_logging [inductor] Add kernel_code logging artifact (#126631) 2024-05-21 23:12:42 +00:00
_numpy Remove removed ruff rule TRY200 (#126256) 2024-05-17 16:31:05 +00:00
_prims [custom_op] use new python custom ops API on prims ops (#124665) 2024-05-22 17:48:33 +00:00
_prims_common Fix 'Could not infer dtype of SymBool' on torch.tensor call (#125656) 2024-05-07 22:41:49 +00:00
_refs Add guard_size_oblivious to vector_norm (#126772) 2024-05-21 19:53:21 +00:00
_subclasses Teach FakeTensor to fill in item_memo when converting scalar CPU tensor (#126245) 2024-05-22 15:25:38 +00:00
_vendor
amp make torch.amp.autocast more generic (#125103) 2024-05-08 12:13:26 +00:00
ao Revert "[Quant][PT2E] enable qlinear post op fusion for dynamic quant & qat (#122667)" 2024-05-21 13:45:07 +00:00
autograd Remove MAX_STACK_ENTRY from _build_table (#126583) 2024-05-21 18:52:04 +00:00
backends Fix public binding to actually traverse modules (#126103) 2024-05-15 19:36:03 +00:00
compiler Fix broken docs (#124940) 2024-04-26 19:24:52 +00:00
contrib
cpu [Doc] Add deprecated autocast comments for doc (#126062) 2024-05-16 05:26:43 +00:00
csrc [AOTI] Add more fallback ops (#126720) 2024-05-22 15:33:24 +00:00
cuda [ROCm] amdsmi library integration (#119182) 2024-05-21 01:59:26 +00:00
distributed [TorchElastic] Option for sharing TCPStore created by rdzv handlers (#125743) 2024-05-22 18:24:11 +00:00
distributions [BE]: Update ruff to 0.4.1 (#124549) 2024-04-21 14:06:23 +00:00
export Teach FakeTensor to fill in item_memo when converting scalar CPU tensor (#126245) 2024-05-22 15:25:38 +00:00
fft
func
futures
fx Teach FakeTensor to fill in item_memo when converting scalar CPU tensor (#126245) 2024-05-22 15:25:38 +00:00
jit [BE][Easy] Remove usage of deprecated ast.Str, ast.Ellipsis and ast.NameConstant (#125912) 2024-05-10 17:35:35 +00:00
legacy
lib [codemod] Fix missing field initializer in caffe2/torch/lib/libshm/core.cpp +2 (#125047) 2024-04-27 15:52:56 +00:00
linalg Fix global flake8 issues (#124771) 2024-04-26 15:35:53 +00:00
masked Fix global flake8 issues (#124771) 2024-04-26 15:35:53 +00:00
monitor
mps Conform torch.mps to device module interface (#124676) 2024-04-23 18:38:48 +00:00
mtia torch.mtia module for MTIA device backend (#123612) 2024-04-26 16:17:54 +00:00
multiprocessing [BE]: Update ruff to v0.4.4 (#125031) 2024-05-12 20:02:37 +00:00
nested [NT] Make NestedTensor register as having symbolic sizes/strides (#124687) 2024-05-13 16:50:25 +00:00
nn Fix flexattention not realizing inputs before lowering (also refactored runtime estimation) (#126615) 2024-05-22 17:28:46 +00:00
onnx [ONNX] Adds Support for Some Bitwise Ops in Onnx Exporter (#126229) 2024-05-22 07:47:43 +00:00
optim [optim] Fix: wrong ASGD implementation (#126375) 2024-05-17 15:46:39 +00:00
package [BE]: Try TCH autofixes on torch/ (#125536) 2024-05-05 23:13:59 +00:00
profiler [Profiler] Clean up deprecated use_cuda by default (#126180) 2024-05-14 21:23:31 +00:00
quantization
signal Fix global flake8 issues (#124771) 2024-04-26 15:35:53 +00:00
sparse Fix a bug in retrieving approximate bsr_dense_addmm kernel meta data (#124371) 2024-04-24 13:59:18 +00:00
special Fix global flake8 issues (#124771) 2024-04-26 15:35:53 +00:00
testing Support dtype kwarg in _foreach_norm (#125665) 2024-05-22 20:27:50 +00:00
utils [SAC] fix ignored ops in eager mode to recompute (#126751) 2024-05-22 06:47:22 +00:00
xpu Add some type annotations to python stream and event classes (#126171) 2024-05-15 04:58:07 +00:00
__config__.py
__future__.py
__init__.py fixed typo in documentation (#125974) 2024-05-13 04:37:51 +00:00
_appdirs.py
_classes.py
_compile.py
_custom_ops.py Replace torch.library.impl_abstract with torch.library.register_fake (#126606) 2024-05-19 13:21:39 +00:00
_deploy.py
_guards.py [BE]: Try TCH autofixes on torch/ (#125536) 2024-05-05 23:13:59 +00:00
_jit_internal.py [BE][Easy] Remove usage of deprecated ast.Str, ast.Ellipsis and ast.NameConstant (#125912) 2024-05-10 17:35:35 +00:00
_linalg_utils.py
_lobpcg.py
_lowrank.py
_meta_registrations.py Support dtype kwarg in _foreach_norm (#125665) 2024-05-22 20:27:50 +00:00
_namedtensor_internals.py
_ops.py Refresh OpOverloadPacket if a new OpOverload gets added (#126863) 2024-05-22 14:13:27 +00:00
_python_dispatcher.py
_size_docs.py Added a docstring for torch.Size.numel. (#124186) 2024-04-19 09:23:02 +00:00
_sources.py
_storage_docs.py
_streambase.py Add some type annotations to python stream and event classes (#126171) 2024-05-15 04:58:07 +00:00
_tensor_docs.py
_tensor_str.py
_tensor.py [BE]: Update ruff to v0.4.4 (#125031) 2024-05-12 20:02:37 +00:00
_torch_docs.py Add usage explanation in torch.dot ducment (#125908) 2024-05-22 20:33:12 +00:00
_utils_internal.py [cprofile] log manifold link instead of raw data to trace_structured (#126451) 2024-05-21 00:44:55 +00:00
_utils.py xpu: implement xpu serialization (#125530) 2024-05-16 20:22:17 +00:00
_VF.py
_vmap_internals.py
_weights_only_unpickler.py Allow tensor subclasses and add torch.serialization.add_safe_globals that allows users to allowlist classes for weights_only load (#124331) 2024-05-17 17:56:57 +00:00
abi-check.cpp
CMakeLists.txt [rfc] opentelemetry in pytorch (#122999) 2024-04-21 15:20:21 +00:00
custom_class_detail.h [codemod] c10:optional -> std::optional (#126135) 2024-05-14 19:35:51 +00:00
custom_class.h
extension.h
functional.py
hub.py [BE]: TRY002 - Ban raising vanilla exceptions (#124570) 2024-04-21 22:26:40 +00:00
library.h [codemod] c10:optional -> std::optional (#126135) 2024-05-14 19:35:51 +00:00
library.py Refresh OpOverloadPacket if a new OpOverload gets added (#126863) 2024-05-22 14:13:27 +00:00
overrides.py torch.mtia module for MTIA device backend (#123612) 2024-04-26 16:17:54 +00:00
py.typed
quasirandom.py Fix SobolEngine default dtype handling (#126781) 2024-05-22 01:55:48 +00:00
random.py [Doc] Update docstrings for torch/random.py (#125265) 2024-05-02 20:55:23 +00:00
README.txt
return_types.py
script.h
serialization.py Allow tensor subclasses and add torch.serialization.add_safe_globals that allows users to allowlist classes for weights_only load (#124331) 2024-05-17 17:56:57 +00:00
storage.py xpu: implement xpu serialization (#125530) 2024-05-16 20:22:17 +00:00
torch_version.py
types.py
version.py.tpl

Note [TH abstraction violation]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

TH/THC provide some hpp headers, which are proper C++ headers rather than
C headers.  These headers serve double duty as *internal implementation
detail* headers, whose contents should largely not be used by external
clients.

Ideally, we would not install these headers at all; instead, you should
use public functions (in headers like `THTensor.h`, NOT `THTensor.hpp`)
to manipulate these structs.  However, there are a few places
in torch/csrc where we violate this abstraction.  They are marked with
a pointer to this note.  Each of those sites will have to be refactored
when we refactor the guts of THTensor and related structures.