pytorch/torch
Jiewen Tan 79c2dfcd8e [c10d] Make send/recv as custom ops (#79779)
Summary:
This patch makes send/recv as custom ops such that it's dispatcher
passable. It's one part of the effort to route comm ops to the dispatcher
such that tracing mechanisms that relies on the dispatcher can trace them,
e.g., LazyTensor and AOTAutograd.

Test Plan:
python test/distributed/test_c10d_nccl.py -k test_send_recv
...and other existing distributed tests.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/79779
Approved by: https://github.com/mrshenli, https://github.com/wanchaol
2022-06-27 22:07:17 +00:00
..
_C add heuristic and idle time computation 2022-06-21 21:02:22 +00:00
_C_flatbuffer
_decomp Revert "Revert "formatted _decomp folder with black"" 2022-06-22 20:47:52 +00:00
_lazy
_masked
_prims Add Div reference (#77936) 2022-06-27 14:46:17 +00:00
_refs Add torch.nn.functional.threshold ref (#79808) 2022-06-27 20:30:42 +00:00
_subclasses [FakeTensor] Use the device of the meta tensor for fallback kernel (#80193) 2022-06-24 20:00:07 +00:00
amp Add __all__ to torch.nn.quantized, fx.passes, ao.nn and amp submodules (#80376) 2022-06-27 21:36:27 +00:00
ao Add __all__ to torch.nn.quantized, fx.passes, ao.nn and amp submodules (#80376) 2022-06-27 21:36:27 +00:00
autograd
backends
contrib
cpu
csrc [c10d] Make send/recv as custom ops (#79779) 2022-06-27 22:07:17 +00:00
cuda
distributed Add __all__ to various submodules in torch.fx, distributions, distributed, package (#80367) 2022-06-27 21:27:30 +00:00
distributions More stable computation of KL between two Bernoulli distributions (#79944) 2022-06-27 21:31:45 +00:00
fft
futures
fx Add __all__ to torch.nn.quantized, fx.passes, ao.nn and amp submodules (#80376) 2022-06-27 21:36:27 +00:00
jit Use generators with all/any in torch/optim (#78142) 2022-06-24 17:23:45 +00:00
legacy
lib
linalg
monitor
multiprocessing
nested
nn Add __all__ to torch.nn.quantized, fx.passes, ao.nn and amp submodules (#80376) 2022-06-27 21:36:27 +00:00
onnx [ONNX] Fix onnx logical functions' dtype (#79339) 2022-06-27 20:50:41 +00:00
optim Add __all__ for torch.optim and torch.nn.modules modules (#80237) 2022-06-24 21:34:10 +00:00
package Add __all__ to various submodules in torch.fx, distributions, distributed, package (#80367) 2022-06-27 21:27:30 +00:00
profiler Add __all__ for torch.nn.modules, torch.distributed.elastic, torch.nn.utils submodules (#80240) 2022-06-27 17:11:12 +00:00
quantization
sparse
special torch.special.spherical_bessel_j0 (#78912) 2022-06-27 20:14:46 +00:00
testing Add support for BSR <-> Strided Conversion (#80354) 2022-06-27 21:09:09 +00:00
utils Fix distributed store to use add for the counter of DL shared seed (#80348) 2022-06-27 21:59:17 +00:00
__config__.py
__future__.py
__init__.py
_appdirs.py
_classes.py
_deploy.py
_jit_internal.py
_linalg_utils.py
_lobpcg.py
_lowrank.py
_meta_registrations.py Ensure torch._refs registrations also get triggered on import torch (#80270) 2022-06-26 02:23:03 +00:00
_namedtensor_internals.py
_ops.py fix submodule imports by importing functions directly (#79368) 2022-06-22 08:01:23 +00:00
_python_dispatcher.py
_six.py
_sources.py
_storage_docs.py
_tensor.py
_tensor_docs.py Fix Tensor.scatter_add_ doc (#80223) 2022-06-27 19:57:53 +00:00
_tensor_str.py Move IPU tensors to the CPU for printing. (#79287) 2022-06-20 16:49:51 +00:00
_torch_docs.py
_utils.py
_utils_internal.py
_VF.py
_vmap_internals.py
abi-check.cpp
CMakeLists.txt
custom_class.h
custom_class_detail.h
deploy.h
extension.h
functional.py
hub.py
library.h
library.py error when registering meta kernels to composite ops in core 2022-06-21 02:17:13 +00:00
overrides.py torch.special.spherical_bessel_j0 (#78912) 2022-06-27 20:14:46 +00:00
py.typed
quasirandom.py
random.py
README.txt
return_types.py
script.h
serialization.py Fix code that triggers BytesWarning (#79868) 2022-06-21 01:12:21 +00:00
storage.py
torch_version.py
types.py

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.