From cf83e83fe7706e273b56ea37a66f88774acebf03 Mon Sep 17 00:00:00 2001 From: Mourad Gouicem Date: Fri, 28 Jun 2019 10:56:32 -0700 Subject: [PATCH] benchdnn: rnn: fix in dst_layer dereferencing for bidir_concat --- tests/benchdnn/rnn/rnn.hpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/benchdnn/rnn/rnn.hpp b/tests/benchdnn/rnn/rnn.hpp index 0cf466a7b98..32cb4457538 100644 --- a/tests/benchdnn/rnn/rnn.hpp +++ b/tests/benchdnn/rnn/rnn.hpp @@ -406,8 +406,9 @@ inline size_t tnc_off_f(const prb_t *p, int64_t t, int64_t n, int64_t c) { inline void inv_tnc_off_f( const prb_t *p, size_t off, int64_t &t, int64_t &n, int64_t &c) { - c = off % p->sic; - off /= p->sic; + auto cout = p->sic * (1 + (p->direction == mkldnn_bidirectional_concat)); + c = off % cout; + off /= cout; n = off % p->mb; off /= p->mb; t = off % p->n_iter;