Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
TransformerEngine
Commits
a207db1d
Commit
a207db1d
authored
Apr 01, 2025
by
yuguo
Browse files
Merge branch 'main' of
https://github.com/NVIDIA/TransformerEngine
parents
fbee8990
69365f88
Changes
101
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
0 deletions
+13
-0
transformer_engine/pytorch/utils.py
transformer_engine/pytorch/utils.py
+13
-0
No files found.
transformer_engine/pytorch/utils.py
View file @
a207db1d
...
...
@@ -411,3 +411,16 @@ def nvtx_range_pop(msg: Optional[str] = None) -> None:
# Pop NVTX range
torch
.
cuda
.
nvtx
.
range_pop
()
def
canonicalize_process_group
(
group
:
Optional
[
torch
.
distributed
.
ProcessGroup
],
)
->
torch
.
distributed
.
ProcessGroup
:
"""Convert to PyTorch process group
If `None`, returns default process group.
"""
if
group
is
None
:
return
torch
.
distributed
.
distributed_c10d
.
_get_default_group
()
return
group
Prev
1
2
3
4
5
6
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment