Skip to content

Commit

Permalink
Documenting the torch.cuda.nccl.version function (pytorch#128022)
Browse files Browse the repository at this point in the history
Fixes pytorch#127892

This PR adds docstring to the torch.cuda.nccl.version function

Pull Request resolved: pytorch#128022
Approved by: https://github.com/malfet
  • Loading branch information
kiszk authored and pytorchmergebot committed Jun 6, 2024
1 parent bf2c053 commit 6adcf21
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions torch/cuda/nccl.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,15 @@ def is_available(tensors):


def version():
"""
Returns the version of the NCCL.
This function returns a tuple containing the major, minor, and patch version numbers of the NCCL.
The suffix is also included in the tuple if a version suffix exists.
Returns:
tuple: The version information of the NCCL.
"""
ver = torch._C._nccl_version()
major = ver >> 32
minor = (ver >> 16) & 65535
Expand Down

0 comments on commit 6adcf21

Please sign in to comment.