From a9919ec08dd0c2c3db9b353400656f85435903b1 Mon Sep 17 00:00:00 2001 From: richagadgil Date: Thu, 23 Jan 2025 00:55:03 +0000 Subject: [PATCH] fix pph --- src/rewrite_rnn.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/rewrite_rnn.cpp b/src/rewrite_rnn.cpp index 308a95d58ee..62532473cb0 100644 --- a/src/rewrite_rnn.cpp +++ b/src/rewrite_rnn.cpp @@ -969,10 +969,11 @@ void rewrite_rnn::apply_lstm(module& m, instruction_ref ins) const // process weight of the peephole instruction_ref pph = m.end(); - // if(args.size() == 8 and not args[7]->is_undefined()) - // { - // pph = args[7]; - // } + if(args.size() == 8 and not args[7]->is_undefined() and + not args[7]->get_shape().lens().empty()) + { + pph = args[7]; + } if(not is_forward and variable_seq_len) {