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
0426feb6
Unverified
Commit
0426feb6
authored
Jun 20, 2023
by
Kirthi Shankar Sivamani
Committed by
GitHub
Jun 20, 2023
Browse files
Consistent docs for fuse_wgrad_accumulation (#289)
Signed-off-by:
Kirthi Shankar Sivamani
<
ksivamani@nvidia.com
>
parent
918a9ad7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
3 deletions
+12
-3
transformer_engine/pytorch/module/layernorm_linear.py
transformer_engine/pytorch/module/layernorm_linear.py
+4
-1
transformer_engine/pytorch/module/layernorm_mlp.py
transformer_engine/pytorch/module/layernorm_mlp.py
+4
-1
transformer_engine/pytorch/transformer.py
transformer_engine/pytorch/transformer.py
+4
-1
No files found.
transformer_engine/pytorch/module/layernorm_linear.py
View file @
0426feb6
...
@@ -593,7 +593,10 @@ class LayerNormLinear(TransformerEngineBaseModule):
...
@@ -593,7 +593,10 @@ class LayerNormLinear(TransformerEngineBaseModule):
-----------------------
-----------------------
fuse_wgrad_accumulation : bool, default = 'False'
fuse_wgrad_accumulation : bool, default = 'False'
if set to `True`, enables fusing of creation and accumulation of
if set to `True`, enables fusing of creation and accumulation of
the weight gradient.
the weight gradient. When enabled, it is assumed that the weights
have an additional `main_grad` attribute (used instead of the
regular `grad`) which is a pre-allocated buffer of the correct
size to accumulate gradients in.
return_bias : bool, default = `False`
return_bias : bool, default = `False`
when set to `True`, this module will not apply the additive bias itself, but
when set to `True`, this module will not apply the additive bias itself, but
instead return the bias value during the forward pass together with the
instead return the bias value during the forward pass together with the
...
...
transformer_engine/pytorch/module/layernorm_mlp.py
View file @
0426feb6
...
@@ -906,7 +906,10 @@ class LayerNormMLP(TransformerEngineBaseModule):
...
@@ -906,7 +906,10 @@ class LayerNormMLP(TransformerEngineBaseModule):
-----------------------
-----------------------
fuse_wgrad_accumulation : bool, default = 'False'
fuse_wgrad_accumulation : bool, default = 'False'
if set to `True`, enables fusing of creation and accumulation of
if set to `True`, enables fusing of creation and accumulation of
the weight gradient.
the weight gradient. When enabled, it is assumed that the weights
have an additional `main_grad` attribute (used instead of the
regular `grad`) which is a pre-allocated buffer of the correct
size to accumulate gradients in.
return_bias : bool, default = `False`
return_bias : bool, default = `False`
when set to `True`, this module will not apply the additive bias for FC2, but
when set to `True`, this module will not apply the additive bias for FC2, but
instead return the bias value during the forward pass together with the
instead return the bias value during the forward pass together with the
...
...
transformer_engine/pytorch/transformer.py
View file @
0426feb6
...
@@ -161,7 +161,10 @@ class TransformerLayer(torch.nn.Module):
...
@@ -161,7 +161,10 @@ class TransformerLayer(torch.nn.Module):
-----------------------
-----------------------
fuse_wgrad_accumulation : bool, default = 'False'
fuse_wgrad_accumulation : bool, default = 'False'
if set to `True`, enables fusing of creation and accumulation of
if set to `True`, enables fusing of creation and accumulation of
the weight gradient.
the weight gradient. When enabled, it is assumed that the weights
have an additional `main_grad` attribute (used instead of the
regular `grad`) which is a pre-allocated buffer of the correct
size to accumulate gradients in.
params_dtype : torch.dtype, default = `torch.float32`
params_dtype : torch.dtype, default = `torch.float32`
it controls the type used to allocate the initial parameters. Useful when
it controls the type used to allocate the initial parameters. Useful when
the model is trained with lower precision and the original FP32 parameters
the model is trained with lower precision and the original FP32 parameters
...
...
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