Unverified Commit a8178684 authored by Kirthi Shankar Sivamani's avatar Kirthi Shankar Sivamani Committed by GitHub
Browse files

Avoid amax roll for non-run modules (#825)


Signed-off-by: default avatarKirthi Shankar Sivamani <ksivamani@nvidia.com>
parent 0757149d
......@@ -197,6 +197,7 @@ kernel_bulk(
const auto last_amax = ((amax_reduction_buffer != nullptr)
&& (amax_reduction_buffer[offset_in_buffer+count] != 0.0f)) ?
amax_reduction_buffer[offset_in_buffer+count] : amax_history[0];
if (last_amax != 0.0f) {
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) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment