pytorch/torch
fduwjj a0c7029a75 [c10d][Reland] Remove Option for ProcessGroup and Expose backend Options to reflect the correct code structure (#132931) (#135653)
We introduced the dispatchable backend for a ProcessGroup and collective in https://github.com/pytorch/pytorch/issues/86225. This PR is a follow-up cleanup to clean up the option of a ProcessGroup and ask users to either set timeout or backend later on or directly create backend after creating a PG.

Also PGNCCL is using option class from ProcessGroup but we actually should use Option from backend class. So this PR is to make the type or name to be aligned with what we are doing in cpp side. I don't change the signature for the public API, so they still use args named "pg_options"

We need to make changes to the test to make it aligned with the change.

This is try to reland D62008954 by fixing internal errors.

Differential Revision: [D62483294](https://our.internmc.facebook.com/intern/diff/D62483294/)

Pull Request resolved: https://github.com/pytorch/pytorch/pull/135653
Approved by: https://github.com/wz337, https://github.com/H-Huang
2024-09-16 19:56:42 +00:00
..
_awaits Remove unused imported names in python files (#134438) 2024-08-27 20:44:04 +00:00
_C [c10d][Reland] Remove Option for ProcessGroup and Expose backend Options to reflect the correct code structure (#132931) (#135653) 2024-09-16 19:56:42 +00:00
_C_flatbuffer
_custom_op
_decomp Add decomposition for squeeze_copy (#130941) 2024-09-16 15:46:57 +00:00
_dispatch
_dynamo [BE]: Update mypy to 1.11.2 (#133816) 2024-09-16 19:44:11 +00:00
_export [BE]: Update mypy to 1.11.2 (#133816) 2024-09-16 19:44:11 +00:00
_functorch [Traceable FSDP2][Partitioner] Must save AC output if output has a backward hook (#135727) 2024-09-14 08:45:58 +00:00
_higher_order_ops [BE]: Update mypy to 1.11.2 (#133816) 2024-09-16 19:44:11 +00:00
_inductor Refactor FxGraphCache.load into separate functions, so that AOTAutogradCache may access it correctly later (#135491) 2024-09-16 19:48:08 +00:00
_lazy Remove unused imported names in python files (#134438) 2024-08-27 20:44:04 +00:00
_library [BE]: Update mypy to 1.11.2 (#133816) 2024-09-16 19:44:11 +00:00
_logging Add torch._logging.scribe (#135224) 2024-09-05 22:37:13 +00:00
_numpy
_prims [hop] require hops to override __call__. (#134352) 2024-08-28 19:56:40 +00:00
_prims_common Allow cross-device copies for cpu scalars in refs (#135140) 2024-09-05 19:08:48 +00:00
_refs Add decomposition for squeeze_copy (#130941) 2024-09-16 15:46:57 +00:00
_strobelight [Pytorch] Cleanup Strobelight URL and shorten for readability (#136102) 2024-09-16 18:10:33 +00:00
_subclasses [BE]: Update mypy to 1.11.2 (#133816) 2024-09-16 19:44:11 +00:00
_vendor
amp [MPS] Add support for autocast in MPS (#99272) 2024-09-05 23:23:17 +00:00
ao [BE]: Update mypy to 1.11.2 (#133816) 2024-09-16 19:44:11 +00:00
autograd fix compiled_autograd deadlock throw (#135795) 2024-09-12 23:24:57 +00:00
backends [sparse] Add cuSPARSELt as a backend (#128534) 2024-08-21 22:06:07 +00:00
compiler [dynamo] simplify polyfill registration for builtins.all and builtins.any (#133769) 2024-08-29 20:56:16 +00:00
contrib
cpu Revise CPU vectorization ISA support API (#135075) 2024-09-05 12:14:56 +00:00
csrc [c10d][Reland] Remove Option for ProcessGroup and Expose backend Options to reflect the correct code structure (#132931) (#135653) 2024-09-16 19:56:42 +00:00
cuda [amdsmi][torch] Update amdsmi API usages (#135504) 2024-09-10 19:15:39 +00:00
distributed [c10d][Reland] Remove Option for ProcessGroup and Expose backend Options to reflect the correct code structure (#132931) (#135653) 2024-09-16 19:56:42 +00:00
distributions [BE]: Update mypy to 1.11.2 (#133816) 2024-09-16 19:44:11 +00:00
export Create export_for_inference API and expose core_aten as public facing API (#135912) 2024-09-15 17:05:07 +00:00
fft
func
futures
fx use a fast expand algorithm (#135999) 2024-09-14 23:09:34 +00:00
jit
legacy
lib
linalg Corrected docstring of `solve_triangular` (#129766) 2024-09-02 13:30:30 +00:00
masked [BE]: Update mypy to 1.11.2 (#133816) 2024-09-16 19:44:11 +00:00
monitor
mps
mtia Improve error msg on _lazy_init() error (#134159) 2024-08-22 15:10:50 +00:00
multiprocessing [BE]: Update mypy to 1.11.2 (#133816) 2024-09-16 19:44:11 +00:00
nested [BE]: Update mypy to 1.11.2 (#133816) 2024-09-16 19:44:11 +00:00
nn [BE]: Update mypy to 1.11.2 (#133816) 2024-09-16 19:44:11 +00:00
onnx [ONNX] Run type promotion test in CI and update the table (#135915) 2024-09-16 16:46:13 +00:00
optim [BE]: Update mypy to 1.11.2 (#133816) 2024-09-16 19:44:11 +00:00
package [3.13] fix 3.13 pickle error in torch/package (#136049) 2024-09-14 14:28:09 +00:00
profiler [Profiler] Torch Profiler distributed info is not JSON serializable (#135548) 2024-09-13 02:22:33 +00:00
quantization
signal Fix docstring for torch.signal.windows.nuttall (#134512) 2024-08-26 22:51:43 +00:00
sparse [BE]: Update mypy to 1.11.2 (#133816) 2024-09-16 19:44:11 +00:00
special
testing Revert "Add CI for Triton CPU backend (#135342)" 2024-09-16 18:33:33 +00:00
utils [BE]: Update mypy to 1.11.2 (#133816) 2024-09-16 19:44:11 +00:00
xpu [Intel GPU] Add XPU memory-related APIs (#129919) 2024-09-07 11:15:17 +00:00
__config__.py
__future__.py
__init__.py [Doc] update max-autotune for CPU (#134986) 2024-09-07 13:42:40 +00:00
_appdirs.py
_classes.py
_compile.py
_custom_ops.py
_deploy.py Remove unused imported names in python files (#134438) 2024-08-27 20:44:04 +00:00
_guards.py [PT2/Profiler] Add Context Info to Torch-Compiled Regions (#132765) 2024-08-27 04:55:04 +00:00
_jit_internal.py
_linalg_utils.py
_lobpcg.py
_lowrank.py
_meta_registrations.py [BE][Ez]: Add full half/bfloat16 dtype for unique and isin (#136114) 2024-09-16 17:49:12 +00:00
_namedtensor_internals.py
_ops.py [hop] require hops to override __call__. (#134352) 2024-08-28 19:56:40 +00:00
_python_dispatcher.py
_size_docs.py
_sources.py
_storage_docs.py
_streambase.py
_tensor_docs.py
_tensor_str.py
_tensor.py [BE]: Update mypy to 1.11.2 (#133816) 2024-09-16 19:44:11 +00:00
_torch_docs.py Fix/torch cat doc attr (#135698) 2024-09-11 22:32:55 +00:00
_utils_internal.py Revert "[Pytorch] Consolidate Strobelight compile time profiler between OSS and fbcode (#135953)" 2024-09-15 05:32:38 +00:00
_utils.py Add torch.serialization.skip_data context manager (#134504) 2024-09-05 16:53:39 +00:00
_VF.py Clean up RemoteCache classes (#134032) 2024-08-31 20:18:59 +00:00
_vmap_internals.py
_weights_only_unpickler.py Clarify error messages for NEWOBJ and BUILD in weights_only unpickler (#134346) 2024-08-27 14:45:39 +00:00
abi-check.cpp
CMakeLists.txt [split build] fix distributed problems (#134502) 2024-08-27 21:12:58 +00:00
custom_class_detail.h
custom_class.h
extension.h
functional.py
hub.py torch.hub: add get_dir/set_dir type hints (#134906) 2024-09-12 03:53:29 +00:00
library.h
library.py Improve opcheck docs. (#134692) 2024-08-28 22:22:04 +00:00
overrides.py Change wrapped_linear_prepack and wrapped_quantized_linear_prepacked to private by adding _ as prefix (#135401) 2024-09-08 04:16:24 +00:00
py.typed
quasirandom.py
random.py
README.txt
return_types.py
script.h
serialization.py [3.13] fix 3.13 pickle error in serialization.py (#136034) 2024-09-14 00:02:40 +00:00
storage.py Add torch.serialization.skip_data context manager (#134504) 2024-09-05 16:53:39 +00:00
torch_version.py
types.py [BE] better type annotation for torch.types (#129559) 2024-09-02 15:35:32 +00:00
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.