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
Megatron-LM
Commits
18c8cf95
Commit
18c8cf95
authored
Jan 10, 2025
by
silencealiang
Browse files
compile融合部分算子,提升性能
parent
38a61e7d
Pipeline
#2201
passed with stage
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
0 deletions
+1
-0
megatron/core/tensor_parallel/cross_entropy.py
megatron/core/tensor_parallel/cross_entropy.py
+1
-0
No files found.
megatron/core/tensor_parallel/cross_entropy.py
View file @
18c8cf95
...
@@ -120,6 +120,7 @@ class VocabParallelCrossEntropy:
...
@@ -120,6 +120,7 @@ class VocabParallelCrossEntropy:
class
_VocabParallelCrossEntropy
(
torch
.
autograd
.
Function
):
class
_VocabParallelCrossEntropy
(
torch
.
autograd
.
Function
):
@
torch
.
compile
(
mode
=
'max-autotune-no-cudagraphs'
)
@
staticmethod
@
staticmethod
def
forward
(
ctx
,
vocab_parallel_logits
,
target
,
label_smoothing
=
0.0
):
def
forward
(
ctx
,
vocab_parallel_logits
,
target
,
label_smoothing
=
0.0
):
"""Vocab parallel cross entropy forward function."""
"""Vocab parallel cross entropy forward function."""
...
...
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