10000 Fix pyi annotation for ProcessGroupNCCL.Options by ezyang · Pull Request #130957 · pytorch/pytorch · GitHub
[go: up one dir, main page]

Skip to content

Fix pyi annotation for ProcessGroupNCCL.Options #130957

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 15 additions & 28 deletions torch/_C/_distributed_c10d.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -544,34 +544,21 @@ class _ProcessGroupWrapper(Backend):
wrapped_pg: Backend

class ProcessGroupNCCL(Backend):
class Options:
def __init__(self, timeout: timedelta | None = None) -> None: ...
@property
def backend(self) -> str: ...
@property
def _timeout(self) -> timedelta: ...
@_timeout.setter
def _timeout(self, val: timedelta) -> None: ...
@property
def is_high_priority_stream(self) -> bool: ...
@is_high_priority_stream.setter
def is_high_priority_stream(self, val: bool) -> None: ...
@property
def split_from(self) -> ProcessGroupNCCL: ...
@split_from.setter
def split_from(self, pg: ProcessGroupNCCL) -> None: ...
@property
def split_color(self) -> int: ...
@split_color.setter
def split_color(self, color: int) -> None: ...
@property
def global_ranks_in_group(self) -> list[int]: ...
@global_ranks_in_group.setter
def global_ranks_in_group(self, ranks: list[int]) -> None: ...
@property
def group_name(self) -> str: ...
@group_name.setter
def group_name(self, name: str) -> None: ...
class NCCLConfig:
blocking: int
cga_cluster_size: int
min_ctas: int
max_ctas: int

class Options(ProcessGroup.Options):
config: ProcessGroupNCCL.NCCLConfig
is_high_priority_stream: bool
split_from: ProcessGroupNCCL
split_color: int
global_ranks_in_group: list[int]
group_name: str

def __init__(self, is_high_priority_stream: bool = False): ...

def __init__(
self,
Expand Down
Loading
0