Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save emfomenk/19ea93697ea90991539ab17d91de29f1 to your computer and use it in GitHub Desktop.
Save emfomenk/19ea93697ea90991539ab17d91de29f1 to your computer and use it in GitHub Desktop.
Potential fix for #280 and #284
commit 0e73f66fa10dc07961b1b05697e716471b11eb41 (HEAD -> x)
Author: Fomenko, Evarist M <empty@empty.com>
Date: Mon Jul 23 11:39:16 2018 +0700
src: cpu: ncsp bnorm bwd: keep threading params up-to-date
diff --git a/src/cpu/ncsp_batch_normalization.cpp b/src/cpu/ncsp_batch_normalization.cpp
index 1bd7f6a9..1ba1be01 100644
--- a/src/cpu/ncsp_batch_normalization.cpp
+++ b/src/cpu/ncsp_batch_normalization.cpp
@@ -281,6 +281,8 @@ void ncsp_batch_normalization_bwd_t::execute_backward() {
C_ithr, C_nthr, C_blk_s, C_blk_e, N_ithr, N_nthr, N_s,
N_e, S_ithr, S_nthr, S_s, S_e);
balance211(last_iter_blks, nthr, ithr, C_blk_gl_s, C_blk_gl_e);
+ SP_N_ithr = N_ithr * S_nthr + S_ithr;
+ SP_N_nthr = N_nthr * S_nthr;
}
size_t C_off = it * C_blks_per_iter;
data_t *diff_gamma_blk = diff_scaleshift + C_off;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment