Incorrect results in layer fusion (num of layers > 1) in GRU Layer
Summary
When num of layers >2 i was getting incorrect results in GRU Layer, but when num of layers = 1, and ran one after another, i was getting correct results
Version
Version used v1.0 mkldnn
Environment
Steps to reproduce
I have attached the scripts to reproduce.
Observed behavior
Expected behavior
Could you explain why the issue is coming.
Hi @pranathibl,
It was noticed that lbr_gru primitive is created with tnc format, but src_md is created with ntc format, correspondent source memory is created from src_md and passed directly to the primitive. Formats mismatch may cause the issue you observe.
It was also noticed that lstm_recWgt_memory is not used in the reproducer provided, reusing the same memory for both wei_iter and wei_layer may also cause a correctness issue.
If this doesn't help, we need more details on what is expected result, where it comes from, lighter reproducer since it looks like a mix-and-match of test code for LSTM and GRU and VERBOSE output provided.
I've tried the same problem configuration with benchdnn, it passes the validation either on master branch or rls-v1.0 branch.
Yes, I have modified and still found mismatching results.
The actual results when not fused and run one after another would be (Expected Results):-
0.0110416 -0.0196296 0.0183249 -0.0327032 -0.1122443
Hi @pranathibl,
A complete reproducer is available here, which runs LBR_GRU RNN with L=2 and then with two consecutive L=1 with same input data. It was tested against rls-v1.0 and master branches, everything works as expected. Please refer to an example to check if everything matches the example on your side when these two scenarios are compared. It uses a random filling for input data but it shouldn't matter. Thanks.
Closing issue due to lack of activity. Feel free re-open or create a new one.