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
a8178684
Unverified
Commit
a8178684
authored
Apr 30, 2024
by
Kirthi Shankar Sivamani
Committed by
GitHub
Apr 30, 2024
Browse files
Avoid amax roll for non-run modules (#825)
Signed-off-by:
Kirthi Shankar Sivamani
<
ksivamani@nvidia.com
>
parent
0757149d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
10 deletions
+12
-10
transformer_engine/common/recipe/delayed_scaling.cu
transformer_engine/common/recipe/delayed_scaling.cu
+12
-10
No files found.
transformer_engine/common/recipe/delayed_scaling.cu
View file @
a8178684
...
...
@@ -197,6 +197,7 @@ kernel_bulk(
const
auto
last_amax
=
((
amax_reduction_buffer
!=
nullptr
)
&&
(
amax_reduction_buffer
[
offset_in_buffer
+
count
]
!=
0.0
f
))
?
amax_reduction_buffer
[
offset_in_buffer
+
count
]
:
amax_history
[
0
];
if
(
last_amax
!=
0.0
f
)
{
for
(
size_t
off
=
0
;
off
<
length
;
off
+=
bsize
)
{
const
size_t
i
=
off
+
tid
;
float
a
=
0
;
...
...
@@ -209,6 +210,7 @@ kernel_bulk(
amax_history
[
i
*
stride
]
=
(
i
>
0
)
?
a
:
0
;
}
}
}
// Compute amax to use for scaling factor
switch
(
amax_compute_algo
)
{
...
...
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